2022-03-08 09:36:02 -08:00
/ * *
* Copyright 2022 Google LLC
*
* Licensed under the Apache License , Version 2 . 0 ( the " License " ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* http : //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing , software
* distributed under the License is distributed on an " AS IS " BASIS ,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied .
* See the License for the specific language governing permissions and
* limitations under the License .
* /
variable " billing_account " {
description = " The ID of the billing account to associate this project with "
}
2022-10-20 05:31:40 -07:00
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 {
2022-10-20 10:12:57 -07:00
condition = var . cf_version == " V1 " | | var . cf_version == " V2 "
2022-10-20 05:31:40 -07:00
error_message = " The value of cf_version must be either V1 or V2. "
}
2022-04-12 05:10:14 -07:00
}
2022-10-20 05:31:40 -07:00
variable " monitored_folders_list " {
type = list ( string )
description = " ID of the projects to be monitored (where limits and quotas data will be pulled) "
default = [ ]
2022-03-08 09:36:02 -08:00
}
variable " monitored_projects_list " {
type = list ( string )
description = " ID of the projects to be monitored (where limits and quotas data will be pulled) "
}
2022-10-20 05:31:40 -07:00
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 = " "
2022-09-30 01:51:16 -07:00
}
2022-10-20 05:31:40 -07:00
variable " organization_id " {
description = " The organization id for the associated services "
}
variable " prefix " {
description = " Customer name to use as prefix for monitoring project "
2022-10-28 06:55:47 -07:00
default = " mon "
2022-03-08 09:36:02 -08:00
}
2022-10-28 06:55:47 -07:00
2022-03-08 09:36:02 -08:00
variable " project_monitoring_services " {
2022-04-12 05:10:14 -07:00
description = " Service APIs enabled in the monitoring project if it will be created. "
2022-03-08 09:36:02 -08:00
default = [
2022-10-19 09:59:28 -07:00
" artifactregistry.googleapis.com " ,
2022-04-12 06:31:42 -07:00
" cloudasset.googleapis.com " ,
2022-03-08 09:36:02 -08:00
" cloudbilling.googleapis.com " ,
" cloudbuild.googleapis.com " ,
2022-10-28 06:55:47 -07:00
" cloudfunctions.googleapis.com " ,
2022-03-08 09:36:02 -08:00
" cloudresourcemanager.googleapis.com " ,
" cloudscheduler.googleapis.com " ,
" compute.googleapis.com " ,
" iam.googleapis.com " ,
" iamcredentials.googleapis.com " ,
" logging.googleapis.com " ,
" monitoring.googleapis.com " ,
2022-10-28 06:55:47 -07:00
" pubsub.googleapis.com " ,
2022-10-19 09:59:28 -07:00
" run.googleapis.com " ,
2022-10-28 06:55:47 -07:00
" servicenetworking.googleapis.com " ,
" serviceusage.googleapis.com " ,
" storage-component.googleapis.com "
2022-03-08 09:36:02 -08:00
]
}
2022-10-28 06:55:47 -07:00
2022-03-08 09:36:02 -08:00
variable " region " {
2022-04-12 05:10:14 -07:00
description = " Region used to deploy the cloud functions and scheduler "
2022-03-08 09:36:02 -08:00
default = " europe-west1 "
2022-10-12 23:09:00 -07:00
}
2022-10-20 05:31:40 -07:00
variable " schedule_cron " {
2022-10-20 05:55:08 -07:00
description = " Cron format schedule to run the Cloud Function. Default is every 10 minutes. "
2022-10-20 05:31:40 -07:00
default = " */10 * * * * "
}