fixed proj creation and readme

This commit is contained in:
Maurizio Noseda Pedraglio 2022-10-28 15:55:47 +02:00
parent 5b3262172d
commit fe29b9397a
4 changed files with 13 additions and 10 deletions

View File

@ -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`

View File

@ -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

View File

@ -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"
]
}

View File

@ -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"