diff --git a/blueprints/cloud-operations/network-dashboard/README.md b/blueprints/cloud-operations/network-dashboard/README.md index d592238dad..4253f806df 100644 --- a/blueprints/cloud-operations/network-dashboard/README.md +++ b/blueprints/cloud-operations/network-dashboard/README.md @@ -64,3 +64,21 @@ In a future release, we could support: - Google managed VPCs that are peered with PSA (such as Cloud SQL or Memorystore) If you are interested in this and/or would like to contribute, please contact legranda@google.com. + + +## Variables + +| name | description | type | required | default | +|---|---|:---:|:---:|:---:| +| [billing_account](variables.tf#L17) | The ID of the billing account to associate this project with | | ✓ | | +| [monitored_projects_list](variables.tf#L36) | ID of the projects to be monitored (where limits and quotas data will be pulled) | list(string) | ✓ | | +| [organization_id](variables.tf#L47) | The organization id for the associated services | | ✓ | | +| [prefix](variables.tf#L51) | Customer name to use as prefix for monitoring project | | ✓ | | +| [cf_version](variables.tf#L21) | Cloud Function version 2nd Gen or 1st Gen. Possible options: 'V1' or 'V2'.Use CFv2 if your Cloud Function timeouts after 9 minutes. By default it is using CFv1. | | | V1 | +| [monitored_folders_list](variables.tf#L30) | ID of the projects to be monitored (where limits and quotas data will be pulled) | list(string) | | [] | +| [monitoring_project_id](variables.tf#L41) | Monitoring project where the dashboard will be created and the solution deployed; a project will be created if set to empty string | | | | +| [project_monitoring_services](variables.tf#L55) | Service APIs enabled in the monitoring project if it will be created. | | | […] | +| [region](variables.tf#L75) | Region used to deploy the cloud functions and scheduler | | | europe-west1 | +| [schedule_cron](variables.tf#L80) | Cron format schedule to run the Cloud Function. Default is every 10 minutes. | | | */10 * * * * | + + diff --git a/blueprints/cloud-operations/network-dashboard/variables.tf b/blueprints/cloud-operations/network-dashboard/variables.tf index 0929b69cb4..94803f027e 100644 --- a/blueprints/cloud-operations/network-dashboard/variables.tf +++ b/blueprints/cloud-operations/network-dashboard/variables.tf @@ -14,22 +14,23 @@ * limitations under the License. */ -variable "organization_id" { - description = "The organization id for the associated services" -} - variable "billing_account" { description = "The ID of the billing account to associate this project with" } -variable "monitoring_project_id" { - description = "Monitoring project where the dashboard will be created and the solution deployed; a project will be created if set to empty string" - default = "" +variable "cf_version" { + description = "Cloud Function version 2nd Gen or 1st Gen. Possible options: 'V1' or 'V2'.Use CFv2 if your Cloud Function timeouts after 9 minutes. By default it is using CFv1." + default = "V1" + validation { + condition = var.cf_version == "V1" || var.cf_version == "V2" + error_message = "The value of cf_version must be either V1 or V2." + } } -variable "prefix" { - description = "Customer name to use as prefix for monitoring project" - default = "" +variable "monitored_folders_list" { + type = list(string) + description = "ID of the projects to be monitored (where limits and quotas data will be pulled)" + default = [] } variable "monitored_projects_list" { @@ -37,15 +38,18 @@ variable "monitored_projects_list" { description = "ID of the projects to be monitored (where limits and quotas data will be pulled)" } -variable "monitored_folders_list" { - type = list(string) - description = "ID of the projects to be monitored (where limits and quotas data will be pulled)" - default = [] +variable "monitoring_project_id" { + description = "Monitoring project where the dashboard will be created and the solution deployed; a project will be created if set to empty string" + default = "" } -variable "schedule_cron" { - description = "Cron format schedule to run the Cloud Function. Default is every 5 minutes." - default = "*/10 * * * *" + +variable "organization_id" { + description = "The organization id for the associated services" +} + +variable "prefix" { + description = "Customer name to use as prefix for monitoring project" } variable "project_monitoring_services" { @@ -72,7 +76,8 @@ variable "region" { description = "Region used to deploy the cloud functions and scheduler" default = "europe-west1" } -variable "cf_version" { - description = "Cloud Function version 2nd Gen or 1st Gen. Possible options: 'V1' or 'V2'.Use CFv2 if your Cloud Function timeouts after 9 minutes. By default it is using CFv1." - default = "V1" -} \ No newline at end of file + +variable "schedule_cron" { + description = "Cron format schedule to run the Cloud Function. Default is every 10 minutes." + default = "*/10 * * * *" +}