fixed proj creation and readme
This commit is contained in:
parent
5b3262172d
commit
fe29b9397a
|
@ -17,9 +17,10 @@ Clone this repository, then go through the following steps to create resources:
|
|||
- Create a terraform.tfvars file with the following content:
|
||||
- organization_id = "<YOUR-ORG-ID>"
|
||||
- billing_account = "<YOUR-BILLING-ACCOUNT>"
|
||||
- monitoring_project_id = "project-0" # Monitoring project where the dashboard will be created and the solution deployed
|
||||
- monitoring_project_id = "<YOUR-MONITORING-PROJECT>" # Monitoring project where the dashboard will be created and the solution deployed, a project named "mon-network-dahshboard" will be created if left blank
|
||||
- monitored_projects_list = ["project-1", "project2"] # Projects to be monitored by the solution
|
||||
- monitored_folders_list = ["folder_id"] # Folders to be monitored by the solution
|
||||
- prefix = "<YOUR-PREFIX>" # Monitoring project name prefix, monitoring project name is <YOUR-PREFIX>-network-dashboard, ignored if monitoring_project_id variable is provided
|
||||
- v2 = true|false # Set to true to use V2 Cloud Functions environment
|
||||
- `terraform init`
|
||||
- `terraform apply`
|
||||
|
|
|
@ -30,7 +30,7 @@ locals {
|
|||
module "project-monitoring" {
|
||||
count = var.monitoring_project_id == "" ? 1 : 0
|
||||
source = "../../../modules/project"
|
||||
name = "monitoring"
|
||||
name = "network-dashboards"
|
||||
parent = "organizations/${var.organization_id}"
|
||||
prefix = var.prefix
|
||||
billing_account = var.billing_account
|
||||
|
@ -184,4 +184,4 @@ module "cloud-function" {
|
|||
resource "google_monitoring_dashboard" "dashboard" {
|
||||
dashboard_json = file("${path.module}/dashboards/quotas-utilization.json")
|
||||
project = local.monitoring_project
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,16 +29,11 @@ variable "prefix" {
|
|||
variable "project_vm_services" {
|
||||
description = "Service APIs enabled by default in new projects."
|
||||
default = [
|
||||
"cloudasset.googleapis.com",
|
||||
"cloudbilling.googleapis.com",
|
||||
"cloudfunctions.googleapis.com",
|
||||
"cloudscheduler.googleapis.com",
|
||||
"compute.googleapis.com",
|
||||
"logging.googleapis.com",
|
||||
"monitoring.googleapis.com",
|
||||
"pubsub.googleapis.com",
|
||||
"servicenetworking.googleapis.com",
|
||||
"storage-component.googleapis.com"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -50,8 +50,10 @@ variable "organization_id" {
|
|||
|
||||
variable "prefix" {
|
||||
description = "Customer name to use as prefix for monitoring project"
|
||||
default = "mon"
|
||||
}
|
||||
|
||||
|
||||
variable "project_monitoring_services" {
|
||||
description = "Service APIs enabled in the monitoring project if it will be created."
|
||||
default = [
|
||||
|
@ -59,19 +61,24 @@ variable "project_monitoring_services" {
|
|||
"cloudasset.googleapis.com",
|
||||
"cloudbilling.googleapis.com",
|
||||
"cloudbuild.googleapis.com",
|
||||
"cloudfunctions.googleapis.com",
|
||||
"cloudresourcemanager.googleapis.com",
|
||||
"cloudscheduler.googleapis.com",
|
||||
"compute.googleapis.com",
|
||||
"cloudfunctions.googleapis.com",
|
||||
"iam.googleapis.com",
|
||||
"iamcredentials.googleapis.com",
|
||||
"logging.googleapis.com",
|
||||
"monitoring.googleapis.com",
|
||||
"pubsub.googleapis.com",
|
||||
"run.googleapis.com",
|
||||
"serviceusage.googleapis.com"
|
||||
"servicenetworking.googleapis.com",
|
||||
"serviceusage.googleapis.com",
|
||||
"storage-component.googleapis.com"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
variable "region" {
|
||||
description = "Region used to deploy the cloud functions and scheduler"
|
||||
default = "europe-west1"
|
||||
|
|
Loading…
Reference in New Issue