1414 * limitations under the License.
1515 */
1616
17+ locals {
18+ per_module_services = {
19+ root = [
20+ " cloudresourcemanager.googleapis.com" ,
21+ " storage-api.googleapis.com" ,
22+ " serviceusage.googleapis.com" ,
23+ " compute.googleapis.com" ,
24+ " run.googleapis.com" ,
25+ " iam.googleapis.com" ,
26+ " certificatemanager.googleapis.com" ,
27+ " vpcaccess.googleapis.com" ,
28+ ]
29+ backend = [
30+ " compute.googleapis.com" ,
31+ " run.googleapis.com" ,
32+ " storage-api.googleapis.com" ,
33+ " vpcaccess.googleapis.com" ,
34+ " cloudresourcemanager.googleapis.com" ,
35+ " iap.googleapis.com" ,
36+ ]
37+ dynamic_backends = [
38+ " cloudresourcemanager.googleapis.com" ,
39+ " storage-api.googleapis.com" ,
40+ " serviceusage.googleapis.com" ,
41+ " compute.googleapis.com" ,
42+ " run.googleapis.com" ,
43+ " iam.googleapis.com" ,
44+ " certificatemanager.googleapis.com" ,
45+ " vpcaccess.googleapis.com" ,
46+ ]
47+ frontend = [
48+ " compute.googleapis.com" ,
49+ " storage-api.googleapis.com" ,
50+ " run.googleapis.com" ,
51+ " certificatemanager.googleapis.com" ,
52+ ]
53+ serverless_negs = [
54+ " cloudresourcemanager.googleapis.com" ,
55+ " storage-api.googleapis.com" ,
56+ " serviceusage.googleapis.com" ,
57+ " compute.googleapis.com" ,
58+ " run.googleapis.com" ,
59+ " iam.googleapis.com" ,
60+ " certificatemanager.googleapis.com" ,
61+ " vpcaccess.googleapis.com" ,
62+ ]
63+ }
64+ }
65+
1766module "project-ci-lb-http" {
1867 source = " terraform-google-modules/project-factory/google"
1968 version = " ~> 17.0"
@@ -28,16 +77,7 @@ module "project-ci-lb-http" {
2877 disable_services_on_destroy = false
2978 deletion_policy = " DELETE"
3079
31- activate_apis = [
32- " cloudresourcemanager.googleapis.com" ,
33- " storage-api.googleapis.com" ,
34- " serviceusage.googleapis.com" ,
35- " compute.googleapis.com" ,
36- " run.googleapis.com" ,
37- " iam.googleapis.com" ,
38- " certificatemanager.googleapis.com" ,
39- " vpcaccess.googleapis.com" ,
40- ]
80+ activate_apis = tolist (toset (flatten (values (local. per_module_services ))))
4181}
4282
4383module "project-ci-lb-http-1" {
@@ -54,15 +94,5 @@ module "project-ci-lb-http-1" {
5494 disable_services_on_destroy = false
5595 deletion_policy = " DELETE"
5696
57- activate_apis = [
58- " cloudresourcemanager.googleapis.com" ,
59- " storage-api.googleapis.com" ,
60- " serviceusage.googleapis.com" ,
61- " compute.googleapis.com" ,
62- " run.googleapis.com" ,
63- " iam.googleapis.com" ,
64- " certificatemanager.googleapis.com" ,
65- " vpcaccess.googleapis.com" ,
66- " iap.googleapis.com" ,
67- ]
97+ activate_apis = tolist (toset (flatten (values (local. per_module_services ))))
6898}
0 commit comments