diff --git a/blueprints/apigee/bigquery-analytics/README.md b/blueprints/apigee/bigquery-analytics/README.md index 027f28ea..817c39bb 100644 --- a/blueprints/apigee/bigquery-analytics/README.md +++ b/blueprints/apigee/bigquery-analytics/README.md @@ -76,3 +76,35 @@ Do the following to verify that everything works as expected. | [ip_address](outputs.tf#L17) | IP address. | | +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/apigee/bigquery-analytics" + project_create = { + billing_account_id = "12345-12345-12345" + parent = "folders/123456789" + } + project_id = "my-project" + envgroups = { + test = ["test.cool-demos.space"] + } + environments = { + apis-test = { + envgroups = ["test"] + } + } + instances = { + instance-ew1 = { + region = "europe-west1" + environments = ["apis-test"] + runtime_ip_cidr_range = "10.0.4.0/22" + troubleshooting_ip_cidr_range = "10.1.0.0/28" + } + } + psc_config = { + europe-west1 = "10.0.0.0/28" + } +} +# tftest modules=10 resources=62 +``` diff --git a/blueprints/apigee/hybrid-gke/README.md b/blueprints/apigee/hybrid-gke/README.md index ae5c0364..05614fac 100644 --- a/blueprints/apigee/hybrid-gke/README.md +++ b/blueprints/apigee/hybrid-gke/README.md @@ -25,11 +25,11 @@ The diagram below depicts the architecture. terraform apply ``` - Create an A record in your DNS registrar to point the environment group hostname to the public IP address returned after the terraform configuration was applied. You might need to wait some time until the certificate is provisioned. - + Create an A record in your DNS registrar to point the environment group hostname to the public IP address returned after the terraform configuration was applied. You might need to wait some time until the certificate is provisioned. + 5. Install Apigee hybrid using de ansible playbook that is in the ansible folder by running this command - ansible-playbook playbook.yaml -vvvß + ansible-playbook playbook.yaml -vvv ## Testing the blueprint @@ -67,3 +67,18 @@ The diagram below depicts the architecture. | [ip_address](outputs.tf#L17) | GLB IP address. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/apigee/hybrid-gke" + project_create = { + billing_account_id = "12345-12345-12345" + parent = "folders/123456789" + } + project_id = "my-project" + hostname = "test.myorg.org" +} +# tftest modules=18 resources=59 +``` diff --git a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md index 690458f0..0ec240b0 100644 --- a/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md +++ b/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/README.md @@ -67,3 +67,17 @@ Do the following to verify that everything works as expected. | [ip_address](outputs.tf#L17) | GLB IP address. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg" + billing_account_id = "12345-12345-12345" + parent = "folders/123456789" + apigee_project_id = "my-apigee-project" + onprem_project_id = "my-onprem-project" + hostname = "test.myorg.org" +} +# tftest modules=14 resources=73 +``` diff --git a/blueprints/cloud-operations/adfs/README.md b/blueprints/cloud-operations/adfs/README.md index 36b772f8..b1efb7b7 100644 --- a/blueprints/cloud-operations/adfs/README.md +++ b/blueprints/cloud-operations/adfs/README.md @@ -74,3 +74,20 @@ Once done testing, you can clean up resources by running `terraform destroy`. | [ip_address](outputs.tf#L15) | IP address. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/adfs" + prefix = "test" + project_create = { + billing_account_id = "12345-12345-12345" + parent = "folders/123456789" + } + project_id = "project-1" + ad_dns_domain_name = "example.com" + adfs_dns_domain_name = "adfs.example.com" +} +# tftest modules=5 resources=18 +``` diff --git a/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md b/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md index fdbda73b..1025a6be 100644 --- a/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md +++ b/blueprints/cloud-operations/asset-inventory-feed-remediation/README.md @@ -72,3 +72,15 @@ Run the `subscription_pull` command until it returns nothing, then run the follo | [tag_show](outputs.tf#L49) | Instance add tag command. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/asset-inventory-feed-remediation" + project_create = true + project_id = "project-1" +} + +# tftest modules=7 resources=21 +``` diff --git a/blueprints/cloud-operations/asset-inventory-feed-remediation/main.tf b/blueprints/cloud-operations/asset-inventory-feed-remediation/main.tf index 6fc1948e..163fc0f1 100644 --- a/blueprints/cloud-operations/asset-inventory-feed-remediation/main.tf +++ b/blueprints/cloud-operations/asset-inventory-feed-remediation/main.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ module "cf" { location = var.region } bundle_config = { - source_dir = "cf" + source_dir = "${path.module}/cf" output_path = var.bundle_path } service_account = module.service-account.email diff --git a/blueprints/cloud-operations/dns-fine-grained-iam/README.md b/blueprints/cloud-operations/dns-fine-grained-iam/README.md index adfc769f..8fe402f2 100644 --- a/blueprints/cloud-operations/dns-fine-grained-iam/README.md +++ b/blueprints/cloud-operations/dns-fine-grained-iam/README.md @@ -118,3 +118,15 @@ dig app1.svc.example.org +short | [vms](outputs.tf#L25) | VM names. | | + +## Test + +```hcl +module "test1" { + source = "./fabric/blueprints/cloud-operations/dns-fine-grained-iam" + name = "dns-sd-test" + project_create = true + project_id = "test" +} +# tftest modules=9 resources=25 +``` diff --git a/blueprints/cloud-operations/dns-shared-vpc/README.md b/blueprints/cloud-operations/dns-shared-vpc/README.md index 9dc4c2ea..6d6e627b 100644 --- a/blueprints/cloud-operations/dns-shared-vpc/README.md +++ b/blueprints/cloud-operations/dns-shared-vpc/README.md @@ -39,3 +39,17 @@ Note that Terraform 0.13 at least is required due to the use of `for_each` with | [teams](outputs.tf#L17) | Team resources. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/dns-shared-vpc" + billing_account_id = "111111-222222-333333" + folder_id = "folders/1234567890" + prefix = "test" + shared_vpc_link = "https://www.googleapis.com/compute/v1/projects/test-dns/global/networks/default" + teams = ["team1", "team2"] +} +# tftest modules=9 resources=12 +``` diff --git a/blueprints/cloud-operations/iam-delegated-role-grants/README.md b/blueprints/cloud-operations/iam-delegated-role-grants/README.md index 4c4d227d..62a6af7b 100644 --- a/blueprints/cloud-operations/iam-delegated-role-grants/README.md +++ b/blueprints/cloud-operations/iam-delegated-role-grants/README.md @@ -76,3 +76,15 @@ If you get any warnings, check the roles and remove any of them granting any of | [restricted_role_grant](variables.tf#L78) | Role grant to which the restrictions will apply. | string | | "roles/resourcemanager.projectIamAdmin" | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/iam-delegated-role-grants" + project_create = true + project_id = "project-1" + project_administrators = ["user:user@example.com"] +} +# tftest modules=2 resources=4 +``` diff --git a/blueprints/cloud-operations/onprem-sa-key-management/README.md b/blueprints/cloud-operations/onprem-sa-key-management/README.md index 4d6f3ab2..bcbf661e 100644 --- a/blueprints/cloud-operations/onprem-sa-key-management/README.md +++ b/blueprints/cloud-operations/onprem-sa-key-management/README.md @@ -78,3 +78,14 @@ terraform destroy -var project_id=$GOOGLE_CLOUD_PROJECT | [sa-credentials](outputs.tf#L17) | SA json key templates. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/onprem-sa-key-management" + project_create = true + project_id = "test" +} +# tftest modules=4 resources=7 +``` diff --git a/blueprints/cloud-operations/packer-image-builder/README.md b/blueprints/cloud-operations/packer-image-builder/README.md index 94755e6f..57dd1ba5 100644 --- a/blueprints/cloud-operations/packer-image-builder/README.md +++ b/blueprints/cloud-operations/packer-image-builder/README.md @@ -93,3 +93,27 @@ address for security reasons, Internet connectivity is done with [Cloud NAT](htt | [compute_zone](outputs.tf#L32) | Name of a compute engine zone for Packer's temporary VM. | | + +## Test + +```tpl +# tftest-file id=pkrvars path=packer/build.pkrvars.tpl +# Packer variables file template. +# Used by Terraform to generate Packer variable file. +project_id = "${PROJECT_ID}" +compute_zone = "${COMPUTE_ZONE}" +builder_sa = "${BUILDER_SA}" +compute_sa = "${COMPUTE_SA}" +compute_subnetwork = "${COMPUTE_SUBNETWORK}" +use_iap = ${USE_IAP} +``` + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/packer-image-builder" + project_id = "test-project" + packer_account_users = ["user:john@example.com"] + create_packer_vars = true +} +# tftest modules=7 resources=17 files=pkrvars +``` diff --git a/blueprints/cloud-operations/quota-monitoring/README.md b/blueprints/cloud-operations/quota-monitoring/README.md index adcd89d6..571ffb2b 100644 --- a/blueprints/cloud-operations/quota-monitoring/README.md +++ b/blueprints/cloud-operations/quota-monitoring/README.md @@ -52,3 +52,15 @@ Clone this repository or [open it in cloud shell](https://ssh.cloud.google.com/c | [schedule_config](variables.tf#L66) | Schedule timer configuration in crontab format. | string | | "0 * * * *" | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/quota-monitoring" + name = "name" + project_create = true + project_id = "test" +} +# tftest modules=4 resources=14 +``` diff --git a/blueprints/cloud-operations/quota-monitoring/main.tf b/blueprints/cloud-operations/quota-monitoring/main.tf index fae9af51..23aaf6f2 100644 --- a/blueprints/cloud-operations/quota-monitoring/main.tf +++ b/blueprints/cloud-operations/quota-monitoring/main.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ module "cf" { location = var.region } bundle_config = { - source_dir = "cf" + source_dir = "${path.module}/cf" output_path = var.bundle_path } # https://github.com/hashicorp/terraform-provider-archive/issues/40 diff --git a/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/README.md b/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/README.md index 9e66ba39..6944cc57 100644 --- a/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/README.md +++ b/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/README.md @@ -77,3 +77,29 @@ This is an optional part, created if `cai_gcs_export` is set to `true`. The high | [cloud-function](outputs.tf#L22) | Cloud Function instance details. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/scheduled-asset-inventory-export-bq" + billing_account = "1234-ABCD-1234" + cai_config = { + bq_dataset = "my-dataset" + bq_table = "my_table" + bq_table_overwrite = "true" + target_node = "organization/1234567890" + } + cai_gcs_export = true + file_config = { + bucket = "my-bucket" + filename = "my-folder/myfile.json" + format = "NEWLINE_DELIMITED_JSON" + bq_dataset = "my-dataset" + bq_table = "my_table" + } + project_create = true + project_id = "project-1" +} +# tftest modules=8 resources=34 +``` diff --git a/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/main.tf b/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/main.tf index 1be2d1a9..85326eda 100644 --- a/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/main.tf +++ b/blueprints/cloud-operations/scheduled-asset-inventory-export-bq/main.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ module "cf" { location = var.region } bundle_config = { - source_dir = "cf" + source_dir = "${path.module}/cf" output_path = var.bundle_path } service_account = module.service-account.email @@ -118,7 +118,7 @@ module "cffile" { lifecycle_delete_age_days = null } bundle_config = { - source_dir = "cffile" + source_dir = "${path.module}/cffile" output_path = var.bundle_path_cffile excludes = null } diff --git a/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/README.md b/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/README.md index 3cec722e..46f90ea8 100644 --- a/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/README.md +++ b/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/README.md @@ -120,3 +120,4 @@ terraform apply As a result we have a successfully deployed GCS bucket from Terraform Cloud workflow using Workload Identity Federation. Once done testing, you can clean up resources by running `terraform destroy` first in the `tfc-workflow-using-wif` and then `gcp-workload-identity-provider` folders. + diff --git a/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider/README.md b/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider/README.md index a7dfac57..1cb692d2 100644 --- a/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider/README.md +++ b/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider/README.md @@ -33,3 +33,22 @@ The codebase provisions the following list of resources: | [tfc_workspace_wariables](outputs.tf#L20) | Variables to be set on the TFC workspace. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider" + billing_account = "1234-ABCD-1234" + project_create = true + project_id = "project-1" + parent = "folders/12345" + tfc_organization_id = "org-123" + tfc_workspace_id = "ws-123" + workload_identity_pool_id = "tfe-pool" + workload_identity_pool_provider_id = "tf-provider" + issuer_uri = "https://app.terraform.io/" +} + +# tftest modules=3 resources=12 +``` diff --git a/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md b/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md index a3a21dbd..29721ac1 100644 --- a/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md +++ b/blueprints/cloud-operations/unmanaged-instances-healthcheck/README.md @@ -118,3 +118,15 @@ gcloud compute ssh --zone europe-west1-b nginx-test -- 'uptime' | [pubsub-topic](outputs.tf#L26) | Restarter PubSub topic. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/unmanaged-instances-healthcheck" + project_id = "project-1" + billing_account = "123456-123456-123456" + project_create = true +} +# tftest modules=11 resources=35 +``` diff --git a/blueprints/cloud-operations/vm-migration/host-target-projects/README.md b/blueprints/cloud-operations/vm-migration/host-target-projects/README.md index c1d24182..ae602bda 100644 --- a/blueprints/cloud-operations/vm-migration/host-target-projects/README.md +++ b/blueprints/cloud-operations/vm-migration/host-target-projects/README.md @@ -38,3 +38,30 @@ This sample creates\updates several distinct groups of resources: | [m4ce_gmanaged_service_account](outputs.tf#L15) | Google managed service account created automatically during the migrate connector registration.. It is used by M4CE to perform activities on target projects. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/vm-migration/host-target-projects" + project_create = { + billing_account_id = "1234-ABCD-1234" + parent = "folders/1234563" + } + migration_admin_users = ["user:admin@example.com"] + migration_viewer_users = ["user:viewer@example.com"] + migration_target_projects = [module.test-target-project.name] + depends_on = [ + module.test-target-project + ] +} + +module "test-target-project" { + source = "./fabric/modules/project" + billing_account = "1234-ABCD-1234" + name = "test-target-project" + project_create = true +} + +# tftest modules=5 resources=24 +``` diff --git a/blueprints/cloud-operations/vm-migration/host-target-sharedvpc/README.md b/blueprints/cloud-operations/vm-migration/host-target-sharedvpc/README.md index bb34cf8f..fe5c9e82 100644 --- a/blueprints/cloud-operations/vm-migration/host-target-sharedvpc/README.md +++ b/blueprints/cloud-operations/vm-migration/host-target-sharedvpc/README.md @@ -42,3 +42,39 @@ This sample creates\update several distinct groups of resources: ## Manual Steps Once this blueprint is deployed the M4CE [m4ce_gmanaged_service_account](https://cloud.google.com/migrate/compute-engine/docs/5.0/how-to/target-sa-compute-engine#configuring_the_default_service_account) has to be configured to grant the access to the shared VPC and allow the deploy of Compute Engine instances as the result of the migration. + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/vm-migration/host-target-sharedvpc" + project_create = { + billing_account_id = "1234-ABCD-1234" + parent = "folders/1234563" + } + migration_admin_users = ["user:admin@example.com"] + migration_viewer_users = ["user:viewer@example.com"] + migration_target_projects = [module.test-target-project.name] + sharedvpc_host_projects = [module.test-sharedvpc-host-project.name] + depends_on = [ + module.test-target-project, + module.test-sharedvpc-host-project, + ] +} + +module "test-target-project" { + source = "./fabric/modules/project" + billing_account = "1234-ABCD-1234" + name = "test-target-project" + project_create = true +} + +module "test-sharedvpc-host-project" { + source = "./fabric/modules/project" + billing_account = "1234-ABCD-1234" + name = "test-sharedvpc-host-project" + project_create = true +} + +# tftest modules=7 resources=25 +``` diff --git a/blueprints/cloud-operations/vm-migration/single-project/README.md b/blueprints/cloud-operations/vm-migration/single-project/README.md index 20afd4a9..697d8197 100644 --- a/blueprints/cloud-operations/vm-migration/single-project/README.md +++ b/blueprints/cloud-operations/vm-migration/single-project/README.md @@ -39,3 +39,18 @@ This sample creates several distinct groups of resources: | [m4ce_gmanaged_service_account](outputs.tf#L15) | Google managed service account created automatically during the migrate connector registration. It is used by M4CE to perform activities on target projects. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/cloud-operations/vm-migration/single-project" + project_create = { + billing_account_id = "1234-ABCD-1234" + parent = "folders/1234563" + } + migration_admin_users = ["user:admin@example.com"] + migration_viewer_users = ["user:viewer@example.com"] +} +# tftest modules=5 resources=20 +``` diff --git a/blueprints/data-solutions/cloudsql-multiregion/README.md b/blueprints/data-solutions/cloudsql-multiregion/README.md index d6420d6c..8b8e7e3e 100644 --- a/blueprints/data-solutions/cloudsql-multiregion/README.md +++ b/blueprints/data-solutions/cloudsql-multiregion/README.md @@ -165,3 +165,20 @@ The above command will delete the associated resources so there will be no billa | [service_accounts](outputs.tf#L46) | Service Accounts. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/cloudsql-multiregion/" + data_eng_principals = ["dataeng@example.com"] + postgres_user_password = "my-root-password" + project_id = "project" + project_create = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + prefix = "prefix" +} +# tftest modules=10 resources=50 +``` diff --git a/blueprints/data-solutions/cmek-via-centralized-kms/README.md b/blueprints/data-solutions/cmek-via-centralized-kms/README.md index 3813c90c..ab80d5ff 100644 --- a/blueprints/data-solutions/cmek-via-centralized-kms/README.md +++ b/blueprints/data-solutions/cmek-via-centralized-kms/README.md @@ -54,3 +54,17 @@ This sample creates several distinct groups of resources: | [vm_keys](outputs.tf#L41) | GCE VM Cloud KMS crypto keys. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/cmek-via-centralized-kms/" + project_config = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + prefix = "prefix" +} +# tftest modules=8 resources=27 +``` diff --git a/blueprints/data-solutions/composer-2/README.md b/blueprints/data-solutions/composer-2/README.md index bc51aaa4..6ff0e8b0 100644 --- a/blueprints/data-solutions/composer-2/README.md +++ b/blueprints/data-solutions/composer-2/README.md @@ -113,3 +113,18 @@ service_encryption_keys = { | [composer_dag_gcs](outputs.tf#L22) | The Cloud Storage prefix of the DAGs for the Cloud Composer environment. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/composer-2/" + project_id = "project" + project_create = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + prefix = "prefix" +} +# tftest modules=5 resources=26 +``` diff --git a/blueprints/data-solutions/data-platform-foundations/README.md b/blueprints/data-solutions/data-platform-foundations/README.md index ad087216..5f41e0de 100644 --- a/blueprints/data-solutions/data-platform-foundations/README.md +++ b/blueprints/data-solutions/data-platform-foundations/README.md @@ -289,3 +289,18 @@ Features to add in future releases: - Add example on how to use Cloud Data Loss Prevention - Add solution to handle Tables, Views, and Authorized Views lifecycle - Add solution to handle Metadata lifecycle + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/data-platform-foundations/" + organization_domain = "example.com" + project_config = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + prefix = "prefix" +} +# tftest modules=43 resources=278 +``` diff --git a/blueprints/data-solutions/data-playground/README.md b/blueprints/data-solutions/data-playground/README.md index db7d51fc..2e719445 100644 --- a/blueprints/data-solutions/data-playground/README.md +++ b/blueprints/data-solutions/data-playground/README.md @@ -68,3 +68,18 @@ You can now connect to the Vertex AI notbook to perform your data analysy. | [vpc](outputs.tf#L38) | VPC Network. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/data-playground" + project_id = "sampleproject" + prefix = "tst" + project_create = { + billing_account_id = "123456-123456-123456", + parent = "folders/467898377" + } +} +# tftest modules=8 resources=39 +``` diff --git a/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md b/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md index 54f47eca..eefb5e86 100644 --- a/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md +++ b/blueprints/data-solutions/gcs-to-bq-with-least-privileges/README.md @@ -215,3 +215,18 @@ The above command will delete the associated resources so there will be no billa | [service_accounts](outputs.tf#L69) | Service account. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/gcs-to-bq-with-least-privileges/" + project_create = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + project_id = "project-1" + prefix = "prefix" +} +# tftest modules=12 resources=47 +``` diff --git a/blueprints/data-solutions/shielded-folder/README.md b/blueprints/data-solutions/shielded-folder/README.md index aaf67e6a..5496eaa7 100644 --- a/blueprints/data-solutions/shielded-folder/README.md +++ b/blueprints/data-solutions/shielded-folder/README.md @@ -178,3 +178,33 @@ terraform apply | [folders_sink_writer_identities](outputs.tf#L23) | Folders id. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/shielded-folder" + data_dir = "./fabric/blueprints/data-solutions/shielded-folder/data" + access_policy_config = { + access_policy_create = { + parent = "organizations/1234567890123" + title = "ShieldedMVP" + } + } + folder_config = { + folder_create = { + display_name = "ShieldedMVP" + parent = "organizations/1234567890123" + } + } + organization = { + domain = "example.com" + id = "1122334455" + } + prefix = "prefix" + project_config = { + billing_account_id = "123456-123456-123456" + } +} +# tftest modules=6 resources=38 inventory=simple.yaml +``` diff --git a/blueprints/data-solutions/sqlserver-alwayson/README.md b/blueprints/data-solutions/sqlserver-alwayson/README.md index 1ce4dad7..695c8f0b 100644 --- a/blueprints/data-solutions/sqlserver-alwayson/README.md +++ b/blueprints/data-solutions/sqlserver-alwayson/README.md @@ -69,3 +69,23 @@ and to `C:\GcpSetupLog.txt` file. | [instructions](outputs.tf#L19) | List of steps to follow after applying. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/sqlserver-alwayson/" + project_create = { + billing_account_id = "123456-123456-123456" + parent = "folders/12345678" + } + project_id = "project-1" + prefix = "test" + network = "example-network" + subnetwork = "example-subnetwork" + sql_admin_password = "password" + ad_domain_fqdn = "ad.example.com" + ad_domain_netbios = "ad" +} +# tftest modules=12 resources=38 +``` diff --git a/blueprints/data-solutions/vertex-mlops/README.md b/blueprints/data-solutions/vertex-mlops/README.md index d9f85fd8..8bb3043e 100644 --- a/blueprints/data-solutions/vertex-mlops/README.md +++ b/blueprints/data-solutions/vertex-mlops/README.md @@ -74,6 +74,36 @@ This blueprint can be used as a building block for setting up an end2end ML Ops | [project_id](outputs.tf#L49) | Project ID. | | -# TODO + +## TODO - Add support for User Managed Notebooks, SA permission option and non default SA for Single User mode. -- Improve default naming for local VPC and Cloud NAT \ No newline at end of file +- Improve default naming for local VPC and Cloud NAT + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/vertex-mlops/" + labels = { + "env" : "dev", + "team" : "ml" + } + bucket_name = "test-dev" + dataset_name = "test" + identity_pool_claims = "attribute.repository/ORGANIZATION/REPO" + notebooks = { + "myworkbench" : { + "owner" : "user@example.com", + "region" : "europe-west4", + "subnet" : "default", + } + } + prefix = "pref" + project_id = "test-dev" + project_create = { + billing_account_id = "000000-123456-123456" + parent = "folders/111111111111" + } +} +# tftest modules=12 resources=56 +``` diff --git a/blueprints/factories/bigquery-factory/README.md b/blueprints/factories/bigquery-factory/README.md index 2cba6e01..1e3015ed 100644 --- a/blueprints/factories/bigquery-factory/README.md +++ b/blueprints/factories/bigquery-factory/README.md @@ -71,6 +71,7 @@ module "bq" { | [views_path](variables.tf#L27) | Relative path for the folder storing view data. | string | ✓ | | + ## TODO - [ ] add external table support diff --git a/blueprints/factories/cloud-identity-group-factory/README.md b/blueprints/factories/cloud-identity-group-factory/README.md index b833304e..318eea25 100644 --- a/blueprints/factories/cloud-identity-group-factory/README.md +++ b/blueprints/factories/cloud-identity-group-factory/README.md @@ -9,13 +9,22 @@ Yaml abstraction for Groups can simplify groups creation and members management. ### Terraform code ```hcl -module "prod-firewall" { - source = "./fabric/blueprints/factories/cloud-identity-group-factory" - +module "groups" { + source = "./fabric/blueprints/factories/cloud-identity-group-factory" customer_id = "customers/C0xxxxxxx" data_dir = "data" } -# tftest skip +# tftest modules=2 resources=3 files=group1 inventory=example.yaml +``` + +```yaml +# tftest-file id=group1 path=data/group1@example.com.yaml +display_name: Group 1 +description: Group 1 +members: + - user1@example.com +managers: + - user2@example.com ``` ### Configuration Structure diff --git a/blueprints/factories/net-vpc-firewall-yaml/README.md b/blueprints/factories/net-vpc-firewall-yaml/README.md index 5e7260e9..42cd6fad 100644 --- a/blueprints/factories/net-vpc-firewall-yaml/README.md +++ b/blueprints/factories/net-vpc-firewall-yaml/README.md @@ -17,8 +17,8 @@ module "prod-firewall" { project_id = "my-prod-project" network = "my-prod-network" config_directories = [ - "./prod", - "./common" + "./firewall/prod", + "./firewall/common" ] log_config = { @@ -32,13 +32,86 @@ module "dev-firewall" { project_id = "my-dev-project" network = "my-dev-network" config_directories = [ - "./dev", - "./common" + "./firewall/dev", + "./firewall/common" ] } -# tftest skip +# tftest modules=2 resources=16 files=common,dev,prod inventory=example.yaml ``` +```yaml +# tftest-file id=common path=firewall/common/common.yaml +# allow ingress from GCLB to all instances in the network +lb-health-checks: + allow: + - ports: [] + protocol: tcp + direction: INGRESS + priority: 1001 + source_ranges: + - 35.191.0.0/16 + - 130.211.0.0/22 + +# deny all egress +deny-all: + deny: + - ports: [] + protocol: all + direction: EGRESS + priority: 65535 + destination_ranges: + - 0.0.0.0/0 +``` + +```yaml +# tftest-file id=dev path=firewall/dev/app.yaml +# Myapp egress +web-app-dev-egress: + allow: + - ports: [443] + protocol: tcp + direction: EGRESS + destination_ranges: + - 192.168.0.0/24 + target_service_accounts: + - myapp@myproject-dev.iam.gserviceaccount.com +# Myapp ingress +web-app-dev-ingress: + allow: + - ports: [1234] + protocol: tcp + direction: INGRESS + source_service_accounts: + - frontend-sa@myproject-dev.iam.gserviceaccount.com + target_service_accounts: + - web-app-a@myproject-dev.iam.gserviceaccount.com +``` + +```yaml +# tftest-file id=prod path=firewall/prod/app.yaml +# Myapp egress +web-app-prod-egress: + allow: + - ports: [443] + protocol: tcp + direction: EGRESS + destination_ranges: + - 192.168.10.0/24 + target_service_accounts: + - myapp@myproject-prod.iam.gserviceaccount.com +# Myapp ingress +web-app-prod-ingress: + allow: + - ports: [1234] + protocol: tcp + direction: INGRESS + source_service_accounts: + - frontend-sa@myproject-prod.iam.gserviceaccount.com + target_service_accounts: + - web-app-a@myproject-prod.iam.gserviceaccount.com +``` + + ### Configuration Structure ```bash @@ -86,54 +159,6 @@ rule-name: # descriptive name, naming convention is adjusted by the module - myapp@myproject-id.iam.gserviceaccount.com ``` - -Firewall rules example yaml configuration - -```bash -cat ./prod/core-network/common-rules.yaml -# allow ingress from GCLB to all instances in the network -lb-health-checks: - allow: - - ports: [] - protocol: tcp - direction: INGRESS - priority: 1001 - source_ranges: - - 35.191.0.0/16 - - 130.211.0.0/22 - -# deny all egress -deny-all: - deny: - - ports: [] - protocol: all - direction: EGRESS - priority: 65535 - destination_ranges: - - 0.0.0.0/0 - -cat ./dev/team-a/web-app-a.yaml -# Myapp egress -web-app-a-egress: - allow: - - ports: [443] - protocol: tcp - direction: EGRESS - destination_ranges: - - 192.168.0.0/24 - target_service_accounts: - - myapp@myproject-id.iam.gserviceaccount.com -# Myapp ingress -web-app-a-ingress: - allow: - - ports: [1234] - protocol: tcp - direction: INGRESS - source_service_accounts: - - frontend-sa@myproject-id.iam.gserviceaccount.com - target_service_accounts: - - web-app-a@myproject-id.iam.gserviceaccount.com -``` ## Variables diff --git a/blueprints/factories/net-vpc-firewall-yaml/main.tf b/blueprints/factories/net-vpc-firewall-yaml/main.tf index d478625c..90416faa 100644 --- a/blueprints/factories/net-vpc-firewall-yaml/main.tf +++ b/blueprints/factories/net-vpc-firewall-yaml/main.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,8 @@ locals { for config_path in var.config_directories : concat( [ - for config_file in fileset("${path.root}/${config_path}", "**/*.yaml") : - "${path.root}/${config_path}/${config_file}" + for config_file in fileset(config_path, "**/*.yaml") : + "${config_path}/${config_file}" ] ) diff --git a/blueprints/factories/project-factory/README.md b/blueprints/factories/project-factory/README.md index 68e2e1d0..a86e708e 100644 --- a/blueprints/factories/project-factory/README.md +++ b/blueprints/factories/project-factory/README.md @@ -76,7 +76,7 @@ module "projects" { service_identities_iam = try(each.value.service_identities_iam, {}) vpc = try(each.value.vpc, null) } -# tftest modules=7 resources=29 +# tftest modules=7 resources=30 inventory=example.yaml ``` ### Projects configuration diff --git a/blueprints/factories/project-factory/main.tf b/blueprints/factories/project-factory/main.tf index 518d5a69..9dbe1721 100644 --- a/blueprints/factories/project-factory/main.tf +++ b/blueprints/factories/project-factory/main.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blueprints/factories/project-factory/sample-data/projects/project.yaml b/blueprints/factories/project-factory/sample-data/projects/project.yaml index cd7b1837..d8cf982e 100644 --- a/blueprints/factories/project-factory/sample-data/projects/project.yaml +++ b/blueprints/factories/project-factory/sample-data/projects/project.yaml @@ -44,7 +44,8 @@ kms_service_agents: # [opt] Labels for the project - merged with the ones defined in defaults labels: - environment: dev + environment: dev2 + costcenter: apps # [opt] Org policy overrides defined at project level org_policies: @@ -70,7 +71,7 @@ service_accounts: another-service-account: - roles/compute.admin my-service-account: - - roles/compute.admin + - roles/compute.adminv1 # [opt] APIs to enable on the project. services: @@ -103,4 +104,4 @@ vpc: subnets_iam: europe-west1/dev-default-ew1: - user:foobar@example.com - - serviceAccount:service-account1 + - serviceAccount:my-service-account diff --git a/blueprints/gke/binauthz/README.md b/blueprints/gke/binauthz/README.md index 387ceb09..09eac687 100644 --- a/blueprints/gke/binauthz/README.md +++ b/blueprints/gke/binauthz/README.md @@ -125,3 +125,18 @@ Once done testing, you can clean up resources by running `terraform destroy`. | [image_repo_url](outputs.tf#L22) | Image source repository url. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/gke/binauthz" + prefix = "test" + project_create = { + billing_account_id = "12345-12345-12345" + parent = "folders/123456789" + } + project_id = "my-project" +} +# tftest modules=14 resources=47 +``` diff --git a/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md b/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md index 7d43bd40..f381327a 100644 --- a/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md +++ b/blueprints/gke/multi-cluster-mesh-gke-fleet-api/README.md @@ -75,3 +75,34 @@ Once done testing, you can clean up resources by running `terraform destroy`. | [region](variables.tf#L99) | Region. | string | | "europe-west1" | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/gke/multi-cluster-mesh-gke-fleet-api" + billing_account_id = "123-456-789" + parent = "folders/123456789" + host_project_id = "my-host-project" + fleet_project_id = "my-fleet-project" + mgmt_project_id = "my-mgmt-project" + region = "europe-west1" + clusters_config = { + cluster-a = { + subnet_cidr_block = "10.0.1.0/24" + master_cidr_block = "10.16.0.0/28" + services_cidr_block = "192.168.1.0/24" + pods_cidr_block = "172.16.0.0/20" + } + cluster-b = { + subnet_cidr_block = "10.0.2.0/24" + master_cidr_block = "10.16.0.16/28" + services_cidr_block = "192.168.2.0/24" + pods_cidr_block = "172.16.16.0/20" + } + } + mgmt_subnet_cidr_block = "10.0.0.0/24" + istio_version = "1.14.1-asm.3" +} +# tftest modules=13 resources=57 +``` diff --git a/blueprints/networking/decentralized-firewall/README.md b/blueprints/networking/decentralized-firewall/README.md index 64a3e41c..334fd0f2 100644 --- a/blueprints/networking/decentralized-firewall/README.md +++ b/blueprints/networking/decentralized-firewall/README.md @@ -2,22 +2,22 @@ This example shows how a decentralized firewall management can be organized using the [firewall factory](../../factories/net-vpc-firewall-yaml/README.md). -This approach is a good fit when Shared VPCs are used across multiple application/infrastructure teams. A central repository keeps environment/team -specific folders with firewall definitions in `yaml` format. +This approach is a good fit when Shared VPCs are used across multiple application/infrastructure teams. A central repository keeps environment/team +specific folders with firewall definitions in `yaml` format. -In the current blueprint multiple teams can define their [VPC Firewall Rules](https://cloud.google.com/vpc/docs/firewalls) -for [dev](./firewall/dev) and [prod](./firewall/prod) environments using team specific subfolders. Rules defined in the +In the current blueprint multiple teams can define their [VPC Firewall Rules](https://cloud.google.com/vpc/docs/firewalls) +for [dev](./firewall/dev) and [prod](./firewall/prod) environments using team specific subfolders. Rules defined in the [common](./firewall/common) folder are applied to both dev and prod environments. -> **_NOTE:_** Common rules are meant to be used for situations where [hierarchical rules](https://cloud.google.com/vpc/docs/firewall-policies) -do not map precisely to requirements (e.g. SA, etc.) +> **_NOTE:_** Common rules are meant to be used for situations where [hierarchical rules](https://cloud.google.com/vpc/docs/firewall-policies) +do not map precisely to requirements (e.g. SA, etc.) This is the high level diagram: ![High-level diagram](diagram.png "High-level diagram") -The rules can be validated either using an automated process or a manual process (or a combination of -the two). There is an blueprint of a YAML-based validator using [Yamale](https://github.com/23andMe/Yamale) +The rules can be validated either using an automated process or a manual process (or a combination of +the two). There is an blueprint of a YAML-based validator using [Yamale](https://github.com/23andMe/Yamale) in the [`validator/`](validator/) subdirectory, which can be integrated as part of a CI/CD pipeline. @@ -41,3 +41,15 @@ in the [`validator/`](validator/) subdirectory, which can be integrated as part | [vpc](outputs.tf#L41) | Shared VPCs. | | + +## Test +```hcl +module "test" { + source = "./fabric/blueprints/networking/decentralized-firewall" + billing_account_id = "ABCDE-12345-ABCDE" + prefix = "prefix" + root_node = "organizations/0123456789" +} + +# tftest modules=9 resources=50 +``` diff --git a/blueprints/networking/filtering-proxy-psc/README.md b/blueprints/networking/filtering-proxy-psc/README.md index 61631af5..5efdca02 100644 --- a/blueprints/networking/filtering-proxy-psc/README.md +++ b/blueprints/networking/filtering-proxy-psc/README.md @@ -26,3 +26,19 @@ To simplify the usage of the proxy, a Cloud DNS private zone is created in each | [region](variables.tf#L75) | Default region for resources. | string | | "europe-west1" | + +## Test + + +```hcl +module "test" { + source = "./fabric/blueprints/networking/filtering-proxy-psc" + prefix = "fabric" + project_create = { + billing_account = "123456-ABCDEF-123456" + parent = "folders/1234567890" + } + project_id = "test-project" +} +# tftest modules=13 resources=37 +``` diff --git a/blueprints/networking/filtering-proxy/README.md b/blueprints/networking/filtering-proxy/README.md index 9d7e2c02..1e9df315 100644 --- a/blueprints/networking/filtering-proxy/README.md +++ b/blueprints/networking/filtering-proxy/README.md @@ -36,3 +36,27 @@ You can optionally deploy the Squid server as [Managed Instance Group](https://c | [squid-address](outputs.tf#L17) | IP address of the Squid proxy. | | + +## Test + +```hcl +module "test1" { + source = "./fabric/blueprints/networking/filtering-proxy" + billing_account = "123456-123456-123456" + mig = true + prefix = "fabric" + root_node = "folders/123456789" +} +# tftest modules=14 resources=36 +``` + +```hcl +module "test2" { + source = "./fabric/blueprints/networking/filtering-proxy" + billing_account = "123456-123456-123456" + mig = false + prefix = "fabric" + root_node = "folders/123456789" +} +# tftest modules=12 resources=30 +``` diff --git a/blueprints/networking/glb-and-armor/README.md b/blueprints/networking/glb-and-armor/README.md index 8385beab..25b9e96f 100644 --- a/blueprints/networking/glb-and-armor/README.md +++ b/blueprints/networking/glb-and-armor/README.md @@ -137,3 +137,19 @@ The above command will delete the associated resources so there will be no billa | [vm_siege_external_ip](outputs.tf#L23) | Siege VM external IP address. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/networking/glb-and-armor" + prefix = "test" + project_create = { + billing_account_id = "123456789" + parent = "organizations/123456789" + } + project_id = "project-1" + enforce_security_policy = true +} +# tftest modules=12 resources=26 +``` diff --git a/blueprints/networking/hub-and-spoke-peering/README.md b/blueprints/networking/hub-and-spoke-peering/README.md index d39cb3aa..e9a05cf2 100644 --- a/blueprints/networking/hub-and-spoke-peering/README.md +++ b/blueprints/networking/hub-and-spoke-peering/README.md @@ -100,3 +100,20 @@ The VPN used to connect the GKE masters VPC does not account for HA, upgrading t | [vms](outputs.tf#L20) | GCE VMs. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/networking/hub-and-spoke-peering" + prefix = "prefix" + project_create = { + billing_account = "123456-123456-123456" + oslogin = true + parent = "folders/123456789" + } + project_id = "project-1" +} + +# tftest modules=22 resources=61 +``` diff --git a/blueprints/networking/hub-and-spoke-vpn/README.md b/blueprints/networking/hub-and-spoke-vpn/README.md index bdf877c7..9cfca228 100644 --- a/blueprints/networking/hub-and-spoke-vpn/README.md +++ b/blueprints/networking/hub-and-spoke-vpn/README.md @@ -101,3 +101,18 @@ ping test-r2.dev.example.com | [vms](outputs.tf#L39) | GCE VMs. | | + +## Test +```hcl +module "test" { + source = "./fabric/blueprints/networking/hub-and-spoke-vpn" + prefix = "prefix" + project_create_config = { + billing_account_id = "123456-123456-123456" + parent_id = "folders/123456789" + } + project_id = "project-1" +} + +# tftest modules=20 resources=73 +``` diff --git a/blueprints/networking/ilb-next-hop/README.md b/blueprints/networking/ilb-next-hop/README.md index c3091558..b4b5e6e8 100644 --- a/blueprints/networking/ilb-next-hop/README.md +++ b/blueprints/networking/ilb-next-hop/README.md @@ -86,3 +86,15 @@ A sample testing session using `tmux`: | [ssh_vm_right](outputs.tf#L64) | Command-line login to right VMs. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/networking/ilb-next-hop" + prefix = "test" + project_create = true + project_id = "project-1" +} +# tftest modules=18 resources=42 +``` diff --git a/blueprints/networking/private-cloud-function-from-onprem/README.md b/blueprints/networking/private-cloud-function-from-onprem/README.md index d0d7ffdb..111e82a4 100644 --- a/blueprints/networking/private-cloud-function-from-onprem/README.md +++ b/blueprints/networking/private-cloud-function-from-onprem/README.md @@ -33,3 +33,17 @@ curl https://YOUR_REGION-YOUR_PROJECT_ID.cloudfunctions.net/YOUR_FUNCTION_NAME | [function_url](outputs.tf#L17) | URL of the Cloud Function. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/networking/private-cloud-function-from-onprem/" + project_create = { + billing_account_id = "123456-ABCDEF-123456" + parent = "folders/1234567890" + } + project_id = "test-project" +} +# tftest modules=11 resources=40 +``` diff --git a/blueprints/networking/shared-vpc-gke/README.md b/blueprints/networking/shared-vpc-gke/README.md index 858518bd..f413becf 100644 --- a/blueprints/networking/shared-vpc-gke/README.md +++ b/blueprints/networking/shared-vpc-gke/README.md @@ -70,3 +70,15 @@ There's a minor glitch that can surface running `terraform destroy`, where the s | [vpc](outputs.tf#L40) | Shared VPC. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/gke/shared-vpc-gke" + billing_account_id = "ABCDE-12345-ABCDE" + prefix = "test" + root_node = "organizations/0123456789" +} +# tftest modules=11 resources=43 +``` diff --git a/blueprints/serverless/api-gateway/README.md b/blueprints/serverless/api-gateway/README.md index 9e17b11e..42ae2460 100644 --- a/blueprints/serverless/api-gateway/README.md +++ b/blueprints/serverless/api-gateway/README.md @@ -22,6 +22,8 @@ Clone this repository or [open it in cloud shell](https://ssh.cloud.google.com/c curl -v http:///hello Once done testing, you can clean up resources by running `terraform destroy`. + + ## Variables @@ -39,3 +41,21 @@ Once done testing, you can clean up resources by running `terraform destroy`. | [ip_address](outputs.tf#L17) | The reserved global IP address. | | + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/serverless/api-gateway" + project_create = { + billing_account_id = "123456789" + parent = "organizations/123456789" + } + project_id = "project-1" + regions = [ + "europe-west1", + "europe-west2" + ] +} +# tftest modules=8 resources=34 +``` diff --git a/tests/blueprints/apigee/bigquery-analytics/__init__.py b/tests/blueprints/apigee/bigquery-analytics/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/apigee/bigquery-analytics/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/apigee/bigquery-analytics/basic.tfvars b/tests/blueprints/apigee/bigquery-analytics/basic.tfvars deleted file mode 100644 index 2f9315a4..00000000 --- a/tests/blueprints/apigee/bigquery-analytics/basic.tfvars +++ /dev/null @@ -1,24 +0,0 @@ -project_create = { - billing_account_id = "12345-12345-12345" - parent = "folders/123456789" -} -project_id = "my-project" -envgroups = { - test = ["test.cool-demos.space"] -} -environments = { - apis-test = { - envgroups = ["test"] - } -} -instances = { - instance-ew1 = { - region = "europe-west1" - environments = ["apis-test"] - runtime_ip_cidr_range = "10.0.4.0/22" - troubleshooting_ip_cidr_range = "10.1.0.0/28" - } -} -psc_config = { - europe-west1 = "10.0.0.0/28" -} diff --git a/tests/blueprints/apigee/bigquery-analytics/basic.yaml b/tests/blueprints/apigee/bigquery-analytics/basic.yaml deleted file mode 100644 index 691af456..00000000 --- a/tests/blueprints/apigee/bigquery-analytics/basic.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -counts: - modules: 9 - resources: 62 diff --git a/tests/blueprints/apigee/bigquery-analytics/tftest.yaml b/tests/blueprints/apigee/bigquery-analytics/tftest.yaml deleted file mode 100644 index a3441f55..00000000 --- a/tests/blueprints/apigee/bigquery-analytics/tftest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -module: blueprints/apigee/bigquery-analytics - -tests: - basic: diff --git a/tests/blueprints/apigee/hybrid-gke/__init__.py b/tests/blueprints/apigee/hybrid-gke/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/apigee/hybrid-gke/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/apigee/hybrid-gke/basic.tfvars b/tests/blueprints/apigee/hybrid-gke/basic.tfvars deleted file mode 100644 index 5b2cb4cc..00000000 --- a/tests/blueprints/apigee/hybrid-gke/basic.tfvars +++ /dev/null @@ -1,6 +0,0 @@ -project_create = { - billing_account_id = "12345-12345-12345" - parent = "folders/123456789" -} -project_id = "my-project" -hostname = "test.myorg.org" \ No newline at end of file diff --git a/tests/blueprints/apigee/hybrid-gke/basic.yaml b/tests/blueprints/apigee/hybrid-gke/basic.yaml deleted file mode 100644 index 0bab5641..00000000 --- a/tests/blueprints/apigee/hybrid-gke/basic.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -counts: - modules: 17 - resources: 59 diff --git a/tests/blueprints/apigee/hybrid-gke/tftest.yaml b/tests/blueprints/apigee/hybrid-gke/tftest.yaml deleted file mode 100644 index ebe16e57..00000000 --- a/tests/blueprints/apigee/hybrid-gke/tftest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -module: blueprints/apigee/hybrid-gke - -tests: - basic: diff --git a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/__init__.py b/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.tfvars b/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.tfvars deleted file mode 100644 index ae07c514..00000000 --- a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.tfvars +++ /dev/null @@ -1,5 +0,0 @@ -billing_account_id = "12345-12345-12345" -parent = "folders/123456789" -apigee_project_id = "my-apigee-project" -onprem_project_id = "my-onprem-project" -hostname = "test.myorg.org" diff --git a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.yaml b/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.yaml deleted file mode 100644 index de461ff2..00000000 --- a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/basic.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -counts: - modules: 13 - resources: 73 diff --git a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/tftest.yaml b/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/tftest.yaml deleted file mode 100644 index 5c92fb82..00000000 --- a/tests/blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg/tftest.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -module: blueprints/apigee/network-patterns/nb-glb-psc-neg-sb-psc-ilbl7-hybrid-neg - -tests: - basic: diff --git a/tests/blueprints/cloud_operations/__init__.py b/tests/blueprints/cloud_operations/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/adfs/__init__.py b/tests/blueprints/cloud_operations/adfs/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/adfs/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/adfs/fixture/main.tf b/tests/blueprints/cloud_operations/adfs/fixture/main.tf deleted file mode 100644 index ac5a4133..00000000 --- a/tests/blueprints/cloud_operations/adfs/fixture/main.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/adfs" - prefix = var.prefix - project_create = var.project_create - project_id = var.project_id - ad_dns_domain_name = var.ad_dns_domain_name - adfs_dns_domain_name = var.adfs_dns_domain_name -} diff --git a/tests/blueprints/cloud_operations/adfs/fixture/variables.tf b/tests/blueprints/cloud_operations/adfs/fixture/variables.tf deleted file mode 100644 index 2fb54b54..00000000 --- a/tests/blueprints/cloud_operations/adfs/fixture/variables.tf +++ /dev/null @@ -1,106 +0,0 @@ -# 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 -# -# https://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. - -# 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 -# -# https://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 "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "12345-12345-12345" - parent = "folders/123456789" - } -} - -variable "project_id" { - type = string - default = "my-project" -} - -variable "prefix" { - type = string - default = "test" -} - -variable "network_config" { - type = object({ - network = string - subnet = string - }) - default = null -} - -variable "ad_dns_domain_name" { - type = string - default = "example.com" -} - -variable "adfs_dns_domain_name" { - type = string - default = "adfs.example.com" -} - -variable "disk_size" { - type = number - default = 50 -} - -variable "disk_type" { - type = string - default = "pd-ssd" -} - -variable "image" { - type = string - default = "projects/windows-cloud/global/images/family/windows-2022" -} - -variable "instance_type" { - type = string - default = "n1-standard-2" -} - -variable "region" { - type = string - default = "europe-west1" -} - -variable "zone" { - type = string - default = "europe-west1-c" -} - -variable "ad_ip_cidr_block" { - type = string - default = "10.0.0.0/24" -} - -variable "subnet_ip_cidr_block" { - type = string - default = "10.0.1.0/28" -} diff --git a/tests/blueprints/cloud_operations/adfs/test_plan.py b/tests/blueprints/cloud_operations/adfs/test_plan.py deleted file mode 100644 index c9682f2d..00000000 --- a/tests/blueprints/cloud_operations/adfs/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 4 - assert len(resources) == 15 diff --git a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/__init__.py b/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/cf/README b/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/cf/README deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/main.tf b/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/main.tf deleted file mode 100644 index 83f86c96..00000000 --- a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/main.tf +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/asset-inventory-feed-remediation" - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/variables.tf b/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/variables.tf deleted file mode 100644 index 3d884c25..00000000 --- a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# -# https://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 "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/test_plan.py b/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/test_plan.py deleted file mode 100644 index 497af6be..00000000 --- a/tests/blueprints/cloud_operations/asset_inventory_feed_remediation/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 6 - assert len(resources) == 19 diff --git a/tests/blueprints/cloud_operations/dns_fine_grained_iam/__init__.py b/tests/blueprints/cloud_operations/dns_fine_grained_iam/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/dns_fine_grained_iam/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/main.tf b/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/main.tf deleted file mode 100644 index ed8a914e..00000000 --- a/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/dns-fine-grained-iam" - name = var.name - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/variables.tf b/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/variables.tf deleted file mode 100644 index 4f92d75d..00000000 --- a/tests/blueprints/cloud_operations/dns_fine_grained_iam/fixture/variables.tf +++ /dev/null @@ -1,38 +0,0 @@ -# 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 -# -# https://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 "name" { - type = string - default = "dns-sd-test" -} - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "test" -} - -variable "region" { - type = string - default = "europe-west1" -} - -variable "zone_domain" { - type = string - default = "svc.example.org." -} diff --git a/tests/blueprints/cloud_operations/dns_fine_grained_iam/test_plan.py b/tests/blueprints/cloud_operations/dns_fine_grained_iam/test_plan.py deleted file mode 100644 index 111d753b..00000000 --- a/tests/blueprints/cloud_operations/dns_fine_grained_iam/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 8 - assert len(resources) == 25 diff --git a/tests/blueprints/cloud_operations/dns_shared_vpc/__init__.py b/tests/blueprints/cloud_operations/dns_shared_vpc/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/dns_shared_vpc/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/main.tf b/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/main.tf deleted file mode 100644 index 78ae4281..00000000 --- a/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/main.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/dns-shared-vpc" - billing_account_id = "111111-222222-333333" - folder_id = "folders/1234567890" - prefix = var.prefix - shared_vpc_link = "https://www.googleapis.com/compute/v1/projects/test-dns/global/networks/default" - teams = var.teams -} diff --git a/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/variables.tf b/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/variables.tf deleted file mode 100644 index dd34e4d5..00000000 --- a/tests/blueprints/cloud_operations/dns_shared_vpc/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# -# https://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 "prefix" { - type = string - default = "test" -} - -variable "teams" { - type = list(string) - default = ["team1", "team2"] -} diff --git a/tests/blueprints/cloud_operations/dns_shared_vpc/test_plan.py b/tests/blueprints/cloud_operations/dns_shared_vpc/test_plan.py deleted file mode 100644 index 37e9d5b9..00000000 --- a/tests/blueprints/cloud_operations/dns_shared_vpc/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 8 - assert len(resources) == 12 diff --git a/tests/blueprints/cloud_operations/iam_delegated_role_grants/__init__.py b/tests/blueprints/cloud_operations/iam_delegated_role_grants/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/iam_delegated_role_grants/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/main.tf b/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/main.tf deleted file mode 100644 index 655439cf..00000000 --- a/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/iam-delegated-role-grants" - project_create = true - project_id = var.project_id - project_administrators = ["user:user@example.com"] -} diff --git a/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/variables.tf b/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/variables.tf deleted file mode 100644 index 626af011..00000000 --- a/tests/blueprints/cloud_operations/iam_delegated_role_grants/fixture/variables.tf +++ /dev/null @@ -1,18 +0,0 @@ -# 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 -# -# https://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 "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/cloud_operations/iam_delegated_role_grants/test_plan.py b/tests/blueprints/cloud_operations/iam_delegated_role_grants/test_plan.py deleted file mode 100644 index 291ffe13..00000000 --- a/tests/blueprints/cloud_operations/iam_delegated_role_grants/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(include_bare_resources=True) - assert len(modules) == 1 - assert len(resources) == 4 - -# TODO(jccb): test audit function (requires extending requirement for -# test suite) -# def test_audit(): -# AUDIT_PATH = os.path.join(os.path.dirname(__file__), "../../../cloud-operations/delegated-role-grants/") -# sys.path.append(AUDIT_PATH) -# import audit diff --git a/tests/blueprints/cloud_operations/onprem_sa_key_management/__init__.py b/tests/blueprints/cloud_operations/onprem_sa_key_management/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/onprem_sa_key_management/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/main.tf b/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/main.tf deleted file mode 100644 index 29e473f0..00000000 --- a/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/main.tf +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/onprem-sa-key-management" - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/variables.tf b/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/variables.tf deleted file mode 100644 index ab2117be..00000000 --- a/tests/blueprints/cloud_operations/onprem_sa_key_management/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# -# https://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 "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "test" -} diff --git a/tests/blueprints/cloud_operations/onprem_sa_key_management/test_plan.py b/tests/blueprints/cloud_operations/onprem_sa_key_management/test_plan.py deleted file mode 100644 index 0382fd0e..00000000 --- a/tests/blueprints/cloud_operations/onprem_sa_key_management/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 3 - assert len(resources) == 7 diff --git a/tests/blueprints/cloud_operations/packer_image_builder/__init__.py b/tests/blueprints/cloud_operations/packer_image_builder/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/packer_image_builder/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/packer_image_builder/fixture/main.tf b/tests/blueprints/cloud_operations/packer_image_builder/fixture/main.tf deleted file mode 100644 index 6dec6b25..00000000 --- a/tests/blueprints/cloud_operations/packer_image_builder/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/packer-image-builder" - project_id = "test-project" - packer_account_users = ["user:john@testdomain.com"] - create_packer_vars = var.create_packer_vars -} diff --git a/tests/blueprints/cloud_operations/packer_image_builder/fixture/packer/build.pkrvars.tpl b/tests/blueprints/cloud_operations/packer_image_builder/fixture/packer/build.pkrvars.tpl deleted file mode 100644 index 9864dc2b..00000000 --- a/tests/blueprints/cloud_operations/packer_image_builder/fixture/packer/build.pkrvars.tpl +++ /dev/null @@ -1,8 +0,0 @@ -# Packer variables file template. -# Used by Terraform to generate Packer variable file. -project_id = "${PROJECT_ID}" -compute_zone = "${COMPUTE_ZONE}" -builder_sa = "${BUILDER_SA}" -compute_sa = "${COMPUTE_SA}" -compute_subnetwork = "${COMPUTE_SUBNETWORK}" -use_iap = ${USE_IAP} \ No newline at end of file diff --git a/tests/blueprints/cloud_operations/packer_image_builder/fixture/variables.tf b/tests/blueprints/cloud_operations/packer_image_builder/fixture/variables.tf deleted file mode 100644 index 5320fb69..00000000 --- a/tests/blueprints/cloud_operations/packer_image_builder/fixture/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -/** - * 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 "create_packer_vars" { - type = bool - default = false -} diff --git a/tests/blueprints/cloud_operations/packer_image_builder/test_plan.py b/tests/blueprints/cloud_operations/packer_image_builder/test_plan.py deleted file mode 100644 index c3b9b8f4..00000000 --- a/tests/blueprints/cloud_operations/packer_image_builder/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(include_bare_resources="true") - - assert len(modules) == 6 - assert len(resources) == 16 - - modules, resources = e2e_plan_runner(include_bare_resources="true", - create_packer_vars="true") - assert len(modules) == 6 - assert len(resources) == 17 diff --git a/tests/blueprints/cloud_operations/quota_monitoring/__init__.py b/tests/blueprints/cloud_operations/quota_monitoring/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/quota_monitoring/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/quota_monitoring/fixture/cf/README b/tests/blueprints/cloud_operations/quota_monitoring/fixture/cf/README deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/blueprints/cloud_operations/quota_monitoring/fixture/main.tf b/tests/blueprints/cloud_operations/quota_monitoring/fixture/main.tf deleted file mode 100644 index ef26ea0b..00000000 --- a/tests/blueprints/cloud_operations/quota_monitoring/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/quota-monitoring" - name = var.name - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/quota_monitoring/fixture/variables.tf b/tests/blueprints/cloud_operations/quota_monitoring/fixture/variables.tf deleted file mode 100644 index 4f92d75d..00000000 --- a/tests/blueprints/cloud_operations/quota_monitoring/fixture/variables.tf +++ /dev/null @@ -1,38 +0,0 @@ -# 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 -# -# https://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 "name" { - type = string - default = "dns-sd-test" -} - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "test" -} - -variable "region" { - type = string - default = "europe-west1" -} - -variable "zone_domain" { - type = string - default = "svc.example.org." -} diff --git a/tests/blueprints/cloud_operations/quota_monitoring/test_plan.py b/tests/blueprints/cloud_operations/quota_monitoring/test_plan.py deleted file mode 100644 index 1de0c312..00000000 --- a/tests/blueprints/cloud_operations/quota_monitoring/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 3 - assert len(resources) == 10 diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/__init__.py b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/bundle_cffile.zip b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/bundle_cffile.zip deleted file mode 100644 index 454bc1f7..00000000 Binary files a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/bundle_cffile.zip and /dev/null differ diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/cf/README b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/cf/README deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/cffile/README b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/cffile/README deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/main.tf b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/main.tf deleted file mode 100644 index 05d63253..00000000 --- a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/scheduled-asset-inventory-export-bq" - billing_account = var.billing_account - cai_config = var.cai_config - cai_gcs_export = var.cai_gcs_export - file_config = var.file_config - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/variables.tf b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/variables.tf deleted file mode 100644 index fb30df60..00000000 --- a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/fixture/variables.tf +++ /dev/null @@ -1,66 +0,0 @@ -# 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 -# -# https://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" { - type = string - default = "1234-ABCD-1234" -} - -variable "cai_config" { - type = object({ - bq_dataset = string - bq_table = string - bq_table_overwrite = bool - target_node = string - }) - default = { - bq_dataset = "my-dataset" - bq_table = "my_table" - bq_table_overwrite = "true" - target_node = "organization/1234567890" - } -} - -variable "cai_gcs_export" { - type = bool - default = true -} - -variable "file_config" { - type = object({ - bucket = string - filename = string - format = string - bq_dataset = string - bq_table = string - }) - default = { - bucket = "my-bucket" - filename = "my-folder/myfile.json" - format = "NEWLINE_DELIMITED_JSON" - bq_dataset = "my-dataset" - bq_table = "my_table" - } -} - - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/test_plan.py b/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/test_plan.py deleted file mode 100644 index 3bcc6344..00000000 --- a/tests/blueprints/cloud_operations/scheduled_asset_inventory_export_bq/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 7 - assert len(resources) == 30 diff --git a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/__init__.py b/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/__init__.py b/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/main.tf b/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/main.tf deleted file mode 100644 index 800201f0..00000000 --- a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/main.tf +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright 2023 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. - */ - -module "test" { - source = "../../../../../../blueprints/cloud-operations/terraform-cloud-dynamic-credentials/gcp-workload-identity-provider" - billing_account = var.billing_account - project_create = var.project_create - project_id = var.project_id - parent = var.parent - tfc_organization_id = var.tfc_organization_id - tfc_workspace_id = var.tfc_workspace_id - workload_identity_pool_id = var.workload_identity_pool_id - workload_identity_pool_provider_id = var.workload_identity_pool_provider_id - issuer_uri = var.issuer_uri -} diff --git a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/variables.tf b/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/variables.tf deleted file mode 100644 index 8d7c2719..00000000 --- a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/fixture/variables.tf +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2023 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 -# -# https://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" { - type = string - default = "1234-ABCD-1234" -} - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "project-1" -} - -variable "parent" { - description = "Parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format." - type = string - default = null - validation { - condition = var.parent == null || can(regex("(organizations|folders)/[0-9]+", var.parent)) - error_message = "Parent must be of the form folders/folder_id or organizations/organization_id." - } -} - -variable "tfc_organization_id" { - description = "TFC organization id." - type = string - default = "org-123" -} - -variable "tfc_workspace_id" { - description = "TFC workspace id." - type = string - default = "ws-123" -} - -variable "workload_identity_pool_id" { - description = "Workload identity pool id." - type = string - default = "tfc-pool" -} - -variable "workload_identity_pool_provider_id" { - description = "Workload identity pool provider id." - type = string - default = "tfc-provider" -} - -variable "issuer_uri" { - description = "Terraform Cloud uri. Replace the uri if a self hosted instance is used." - type = string - default = "https://app.terraform.io/" -} diff --git a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/test_plan.py b/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/test_plan.py deleted file mode 100644 index 228e51df..00000000 --- a/tests/blueprints/cloud_operations/terraform_cloud_dynamic_credentials/gcp_workload_identity_provider/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 2 - assert len(resources) == 10 diff --git a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/__init__.py b/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/main.tf b/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/main.tf deleted file mode 100644 index 22b5da3c..00000000 --- a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/cloud-operations/unmanaged-instances-healthcheck" - billing_account = var.billing_account - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/variables.tf b/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/variables.tf deleted file mode 100644 index fb30df60..00000000 --- a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/fixture/variables.tf +++ /dev/null @@ -1,66 +0,0 @@ -# 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 -# -# https://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" { - type = string - default = "1234-ABCD-1234" -} - -variable "cai_config" { - type = object({ - bq_dataset = string - bq_table = string - bq_table_overwrite = bool - target_node = string - }) - default = { - bq_dataset = "my-dataset" - bq_table = "my_table" - bq_table_overwrite = "true" - target_node = "organization/1234567890" - } -} - -variable "cai_gcs_export" { - type = bool - default = true -} - -variable "file_config" { - type = object({ - bucket = string - filename = string - format = string - bq_dataset = string - bq_table = string - }) - default = { - bucket = "my-bucket" - filename = "my-folder/myfile.json" - format = "NEWLINE_DELIMITED_JSON" - bq_dataset = "my-dataset" - bq_table = "my_table" - } -} - - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/test_plan.py b/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/test_plan.py deleted file mode 100644 index b1f0fba3..00000000 --- a/tests/blueprints/cloud_operations/unmanaged_instances_healthcheck/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 10 - assert len(resources) == 32 diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/__init__.py b/tests/blueprints/cloud_operations/vm_migration/host_target_projects/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/fixture/main.tf b/tests/blueprints/cloud_operations/vm_migration/host_target_projects/fixture/main.tf deleted file mode 100644 index 488dd7cc..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/fixture/main.tf +++ /dev/null @@ -1,43 +0,0 @@ -# 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 -# -# https://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. - -module "host-target-projects-test" { - source = "../../../../../../blueprints/cloud-operations/vm-migration/host-target-projects" - project_create = var.project_create - migration_admin_users = ["user:admin@example.com"] - migration_viewer_users = ["user:viewer@example.com"] - migration_target_projects = ["${module.test-target-project.name}"] - depends_on = [ - module.test-target-project - ] -} - -variable "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "1234-ABCD-1234" - parent = "folders/1234563" - } -} - -#This is a dummy project created to run this test. The example, here tested, is expected to run on top of existing foundations. -module "test-target-project" { - source = "../../../../../../modules/project" - billing_account = "1234-ABCD-1234" - name = "test-target-project" - project_create = true -} diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/test_plan.py b/tests/blueprints/cloud_operations/vm_migration/host_target_projects/test_plan.py deleted file mode 100644 index 33f493ba..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_projects/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - - -import os - - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 3 - assert len(resources) == 23 diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/__init__.py b/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/fixture/main.tf b/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/fixture/main.tf deleted file mode 100644 index f8bea07c..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/fixture/main.tf +++ /dev/null @@ -1,51 +0,0 @@ -# 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 -# -# https://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. - -module "host-target-sharedvpc-test" { - source = "../../../../../../blueprints/cloud-operations/vm-migration/host-target-sharedvpc" - project_create = var.project_create - migration_admin_users = ["user:admin@example.com"] - migration_viewer_users = ["user:viewer@example.com"] - migration_target_projects = [module.test-target-project.name] - sharedvpc_host_projects = [module.test-sharedvpc-host-project.name] - depends_on = [ - module.test-target-project, - module.test-sharedvpc-host-project, - ] -} - -variable "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "1234-ABCD-1234" - parent = "folders/1234563" - } -} - -#These are a dummy projects created to run this test. The example, here tested, is expected to run on top of existing foundations. -module "test-target-project" { - source = "../../../../../../modules/project" - billing_account = "1234-ABCD-1234" - name = "test-target-project" - project_create = true -} -module "test-sharedvpc-host-project" { - source = "../../../../../../modules/project" - billing_account = "1234-ABCD-1234" - name = "test-sharedvpc-host-project" - project_create = true -} diff --git a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/test_plan.py b/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/test_plan.py deleted file mode 100644 index 83935711..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/host_target_sharedvpc/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - - -import os - - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 4 - assert len(resources) == 23 diff --git a/tests/blueprints/cloud_operations/vm_migration/single_project/__init__.py b/tests/blueprints/cloud_operations/vm_migration/single_project/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/single_project/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/cloud_operations/vm_migration/single_project/fixture/main.tf b/tests/blueprints/cloud_operations/vm_migration/single_project/fixture/main.tf deleted file mode 100644 index ccb46d54..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/single_project/fixture/main.tf +++ /dev/null @@ -1,31 +0,0 @@ -# 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 -# -# https://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. - -module "single-project-test" { - source = "../../../../../../blueprints/cloud-operations/vm-migration/single-project" - project_create = var.project_create - migration_admin_users = ["user:admin@example.com"] - migration_viewer_users = ["user:viewer@example.com"] -} - -variable "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "1234-ABCD-1234" - parent = "folders/1234563" - } -} diff --git a/tests/blueprints/cloud_operations/vm_migration/single_project/test_plan.py b/tests/blueprints/cloud_operations/vm_migration/single_project/test_plan.py deleted file mode 100644 index 6e2c141d..00000000 --- a/tests/blueprints/cloud_operations/vm_migration/single_project/test_plan.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -import os - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 4 - assert len(resources) == 20 diff --git a/tests/blueprints/data_solutions/__init__.py b/tests/blueprints/data_solutions/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/cloudsql_multiregion/__init__.py b/tests/blueprints/data_solutions/cloudsql_multiregion/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/cloudsql_multiregion/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/cloudsql_multiregion/fixture/main.tf b/tests/blueprints/data_solutions/cloudsql_multiregion/fixture/main.tf deleted file mode 100644 index 3d716149..00000000 --- a/tests/blueprints/data_solutions/cloudsql_multiregion/fixture/main.tf +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/cloudsql-multiregion/" - data_eng_principals = ["dataeng@example.com"] - postgres_user_password = "my-root-password" - project_id = "project" - project_create = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } - prefix = "prefix" -} diff --git a/tests/blueprints/data_solutions/cloudsql_multiregion/test_plan.py b/tests/blueprints/data_solutions/cloudsql_multiregion/test_plan.py deleted file mode 100644 index 90371cf7..00000000 --- a/tests/blueprints/data_solutions/cloudsql_multiregion/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 9 - assert len(resources) == 48 diff --git a/tests/blueprints/data_solutions/cmek_via_centralized_kms/__init__.py b/tests/blueprints/data_solutions/cmek_via_centralized_kms/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/cmek_via_centralized_kms/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/cmek_via_centralized_kms/fixture/main.tf b/tests/blueprints/data_solutions/cmek_via_centralized_kms/fixture/main.tf deleted file mode 100644 index 3fee8af5..00000000 --- a/tests/blueprints/data_solutions/cmek_via_centralized_kms/fixture/main.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/cmek-via-centralized-kms/" - project_config = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } - prefix = "prefix" -} diff --git a/tests/blueprints/data_solutions/cmek_via_centralized_kms/test_plan.py b/tests/blueprints/data_solutions/cmek_via_centralized_kms/test_plan.py deleted file mode 100644 index 22d474b4..00000000 --- a/tests/blueprints/data_solutions/cmek_via_centralized_kms/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 7 - assert len(resources) == 27 diff --git a/tests/blueprints/data_solutions/composer_2/__init__.py b/tests/blueprints/data_solutions/composer_2/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/composer_2/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/composer_2/fixture/main.tf b/tests/blueprints/data_solutions/composer_2/fixture/main.tf deleted file mode 100644 index 4b35e6f8..00000000 --- a/tests/blueprints/data_solutions/composer_2/fixture/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/composer-2/" - project_id = "project" - - project_create = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } - prefix = "prefix" -} diff --git a/tests/blueprints/data_solutions/composer_2/test_plan.py b/tests/blueprints/data_solutions/composer_2/test_plan.py deleted file mode 100644 index 04f4a39f..00000000 --- a/tests/blueprints/data_solutions/composer_2/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 4 - assert len(resources) == 25 diff --git a/tests/blueprints/data_solutions/data_platform_foundations/__init__.py b/tests/blueprints/data_solutions/data_platform_foundations/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf b/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf deleted file mode 100644 index 5acb29e8..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/data-platform-foundations/" - organization_domain = "example.com" - project_config = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } - prefix = "prefix" -} diff --git a/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py b/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py deleted file mode 100644 index 630944f2..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -import os -import pytest - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - - assert len(modules) == 42 - assert len(resources) == 277 diff --git a/tests/blueprints/data_solutions/data_playground/__init__.py b/tests/blueprints/data_solutions/data_playground/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/data_playground/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/data_playground/fixture/main.tf b/tests/blueprints/data_solutions/data_playground/fixture/main.tf deleted file mode 100644 index e9e1d297..00000000 --- a/tests/blueprints/data_solutions/data_playground/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/data-playground/" - project_id = "sampleproject" - prefix = "tst" - project_create = { - billing_account_id = "123456-123456-123456", - parent = "folders/467898377" - } -} diff --git a/tests/blueprints/data_solutions/data_playground/test_plan.py b/tests/blueprints/data_solutions/data_playground/test_plan.py deleted file mode 100644 index daaa57fc..00000000 --- a/tests/blueprints/data_solutions/data_playground/test_plan.py +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -import os -import pytest - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 7 - assert len(resources) == 38 diff --git a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/__init__.py b/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/main.tf b/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/main.tf deleted file mode 100644 index 4fc83c75..00000000 --- a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/gcs-to-bq-with-least-privileges/" - project_create = var.project_create - project_id = var.project_id - prefix = var.prefix -} diff --git a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/variables.tf b/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/variables.tf deleted file mode 100644 index 477dcaf7..00000000 --- a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/fixture/variables.tf +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 "prefix" { - description = "Unique prefix used for resource names. Not used for project if 'project_create' is null." - type = string - default = "prefix" -} - -variable "project_create" { - description = "Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format." - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } -} - -variable "project_id" { - description = "Project id, references existing project if `project_create` is null." - type = string - default = "datalake" -} diff --git a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/test_plan.py b/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/test_plan.py deleted file mode 100644 index 773e80ca..00000000 --- a/tests/blueprints/data_solutions/gcs_to_bq_with_least_privileges/test_plan.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - - -import os -import pytest - - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 11 - assert len(resources) == 47 diff --git a/tests/blueprints/data_solutions/shielded_folder/simple.yaml b/tests/blueprints/data_solutions/shielded_folder/examples/simple.yaml similarity index 78% rename from tests/blueprints/data_solutions/shielded_folder/simple.yaml rename to tests/blueprints/data_solutions/shielded_folder/examples/simple.yaml index 244dcb97..23bc8b7a 100644 --- a/tests/blueprints/data_solutions/shielded_folder/simple.yaml +++ b/tests/blueprints/data_solutions/shielded_folder/examples/simple.yaml @@ -13,18 +13,18 @@ # limitations under the License. values: - module.folder.google_compute_firewall_policy.policy["prefix-fw-policy"]: + module.test.module.folder.google_compute_firewall_policy.policy["prefix-fw-policy"]: short_name: prefix-fw-policy - module.folder.google_folder.folder[0]: + module.test.module.folder.google_folder.folder[0]: display_name: ShieldedMVP parent: organizations/1234567890123 - module.log-export-project[0].google_project.project[0]: + module.test.module.log-export-project[0].google_project.project[0]: billing_account: 123456-123456-123456 project_id: prefix-audit-logs - module.vpc-sc[0].google_access_context_manager_access_policy.default[0]: + module.test.module.vpc-sc[0].google_access_context_manager_access_policy.default[0]: parent: organizations/1122334455 title: shielded-folder - module.vpc-sc[0].google_access_context_manager_service_perimeter.regular["shielded"]: + module.test.module.vpc-sc[0].google_access_context_manager_service_perimeter.regular["shielded"]: description: null perimeter_type: PERIMETER_TYPE_REGULAR title: shielded @@ -47,5 +47,5 @@ counts: google_project_service_identity: 1 google_projects: 1 google_storage_project_service_account: 1 - modules: 5 + modules: 6 resources: 38 diff --git a/tests/blueprints/data_solutions/shielded_folder/simple.tfvars b/tests/blueprints/data_solutions/shielded_folder/simple.tfvars deleted file mode 100644 index 83e8b139..00000000 --- a/tests/blueprints/data_solutions/shielded_folder/simple.tfvars +++ /dev/null @@ -1,20 +0,0 @@ -access_policy_config = { - access_policy_create = { - parent = "organizations/1234567890123" - title = "ShieldedMVP" - } -} -folder_config = { - folder_create = { - display_name = "ShieldedMVP" - parent = "organizations/1234567890123" - } -} -organization = { - domain = "example.com" - id = "1122334455" -} -prefix = "prefix" -project_config = { - billing_account_id = "123456-123456-123456" -} diff --git a/tests/blueprints/data_solutions/sqlserver_alwayson/__init__.py b/tests/blueprints/data_solutions/sqlserver_alwayson/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/sqlserver_alwayson/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/main.tf b/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/main.tf deleted file mode 100644 index 72f7a7d3..00000000 --- a/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/main.tf +++ /dev/null @@ -1,27 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/sqlserver-alwayson/" - project_create = var.project_create - project_id = var.project_id - prefix = var.prefix - network = "example-network" - subnetwork = "example-subnetwork" - sql_admin_password = "password" - ad_domain_fqdn = "ad.example.com" - ad_domain_netbios = "ad" -} diff --git a/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/variables.tf b/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/variables.tf deleted file mode 100644 index e2c50ac2..00000000 --- a/tests/blueprints/data_solutions/sqlserver_alwayson/fixture/variables.tf +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 "prefix" { - description = "Unique prefix used for resource names." - type = string - default = "test" -} - -variable "project_create" { - description = "Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format." - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } -} - -variable "project_id" { - description = "Project id, references existing project if `project_create` is null." - type = string - default = "sqlserver" -} diff --git a/tests/blueprints/data_solutions/sqlserver_alwayson/test_plan.py b/tests/blueprints/data_solutions/sqlserver_alwayson/test_plan.py deleted file mode 100644 index 86314800..00000000 --- a/tests/blueprints/data_solutions/sqlserver_alwayson/test_plan.py +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -import os -import pytest - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - assert len(modules) == 11 - assert len(resources) == 38 diff --git a/tests/blueprints/data_solutions/vertex_mlops/__init__.py b/tests/blueprints/data_solutions/vertex_mlops/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/vertex_mlops/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/data_solutions/vertex_mlops/fixture/main.tf b/tests/blueprints/data_solutions/vertex_mlops/fixture/main.tf deleted file mode 100644 index 0b671f33..00000000 --- a/tests/blueprints/data_solutions/vertex_mlops/fixture/main.tf +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - */ - -module "projects" { - source = "../../../../../blueprints/data-solutions/vertex-mlops/" - labels = { - "env" : "dev", - "team" : "ml" - } - bucket_name = "test-dev" - dataset_name = "test" - identity_pool_claims = "attribute.repository/ORGANIZATION/REPO" - notebooks = { - "myworkbench" : { - "owner" : "user@example.com", - "region" : "europe-west4", - "subnet" : "default", - } - } - prefix = "pref" - project_id = "test-dev" - project_create = { - billing_account_id = "000000-123456-123456" - parent = "folders/111111111111" - } -} diff --git a/tests/blueprints/data_solutions/vertex_mlops/test_plan.py b/tests/blueprints/data_solutions/vertex_mlops/test_plan.py deleted file mode 100644 index eac30ad5..00000000 --- a/tests/blueprints/data_solutions/vertex_mlops/test_plan.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. -import os -import pytest - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - # TODO: to re-enable per-module resource count check print _, then test - assert len(modules) > 0 and len(resources) > 0 \ No newline at end of file diff --git a/tests/blueprints/factories/cloud_identity_group_factory/__init__.py b/tests/blueprints/factories/cloud_identity_group_factory/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/factories/cloud_identity_group_factory/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/factories/cloud_identity_group_factory/examples/example.yaml b/tests/blueprints/factories/cloud_identity_group_factory/examples/example.yaml new file mode 100644 index 00000000..1a8db1b5 --- /dev/null +++ b/tests/blueprints/factories/cloud_identity_group_factory/examples/example.yaml @@ -0,0 +1,42 @@ +# Copyright 2023 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. + +values: + module.groups.module.group["group1@example.com"].google_cloud_identity_group.group: + description: Group 1 + display_name: Group 1 + group_key: + - id: group1@example.com + namespace: null + initial_group_config: EMPTY + labels: + cloudidentity.googleapis.com/groups.discussion_forum: '' + parent: customers/C0xxxxxxx + module.groups.module.group["group1@example.com"].google_cloud_identity_group_membership.managers["user2@example.com"]: + preferred_member_key: + - id: user2@example.com + namespace: null + roles: + - name: MANAGER + - name: MEMBER + module.groups.module.group["group1@example.com"].google_cloud_identity_group_membership.members["user1@example.com"]: + preferred_member_key: + - id: user1@example.com + namespace: null + roles: + - name: MEMBER + +counts: + google_cloud_identity_group: 1 + google_cloud_identity_group_membership: 2 diff --git a/tests/blueprints/factories/cloud_identity_group_factory/fixture/data/group1@example.com.yaml b/tests/blueprints/factories/cloud_identity_group_factory/fixture/data/group1@example.com.yaml deleted file mode 100644 index 98bdcb8e..00000000 --- a/tests/blueprints/factories/cloud_identity_group_factory/fixture/data/group1@example.com.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# skip boilerplate check - -display_name: Group 1 -description: Group 1 -members: - - user1@example.com -managers: - - user2@example.com \ No newline at end of file diff --git a/tests/blueprints/factories/cloud_identity_group_factory/fixture/main.tf b/tests/blueprints/factories/cloud_identity_group_factory/fixture/main.tf deleted file mode 100644 index 4f56c63c..00000000 --- a/tests/blueprints/factories/cloud_identity_group_factory/fixture/main.tf +++ /dev/null @@ -1,21 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/factories/cloud-identity-group-factory/" - customer_id = "customers/C01234567" - data_dir = "data" -} diff --git a/tests/blueprints/factories/cloud_identity_group_factory/test_plan.py b/tests/blueprints/factories/cloud_identity_group_factory/test_plan.py deleted file mode 100644 index 7de10b1a..00000000 --- a/tests/blueprints/factories/cloud_identity_group_factory/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 1 - assert len(resources) == 3 diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/__init__.py b/tests/blueprints/factories/net_vpc_firewall_yaml/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/factories/net_vpc_firewall_yaml/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/examples/example.yaml b/tests/blueprints/factories/net_vpc_firewall_yaml/examples/example.yaml new file mode 100644 index 00000000..c2375ae5 --- /dev/null +++ b/tests/blueprints/factories/net_vpc_firewall_yaml/examples/example.yaml @@ -0,0 +1,188 @@ +# Copyright 2023 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. + +values: + module.dev-firewall.google_compute_firewall.rules["deny-all"]: + allow: [] + deny: + - ports: [] + protocol: all + destination_ranges: + - 0.0.0.0/0 + direction: EGRESS + disabled: null + log_config: [] + name: fwr-my-dev-network-all-e-deny-all + network: my-dev-network + priority: 65535 + project: my-dev-project + source_ranges: null + source_service_accounts: null + source_tags: null + target_service_accounts: null + target_tags: null + timeouts: null + module.dev-firewall.google_compute_firewall.rules["lb-health-checks"]: + allow: + - ports: [] + protocol: tcp + deny: [] + direction: INGRESS + disabled: null + log_config: [] + name: fwr-my-dev-network-all-i-lb-health-checks + network: my-dev-network + priority: 1001 + project: my-dev-project + source_ranges: + - 130.211.0.0/22 + - 35.191.0.0/16 + source_service_accounts: null + source_tags: null + target_service_accounts: null + target_tags: null + timeouts: null + module.dev-firewall.google_compute_firewall.rules["web-app-dev-egress"]: + allow: + - ports: + - '443' + protocol: tcp + deny: [] + destination_ranges: + - 192.168.0.0/24 + direction: EGRESS + disabled: null + log_config: [] + name: fwr-my-dev-network-sac-e-web-app-dev-egress + network: my-dev-network + priority: 1000 + project: my-dev-project + source_ranges: null + source_service_accounts: null + source_tags: null + target_service_accounts: + - myapp@myproject-dev.iam.gserviceaccount.com + target_tags: null + timeouts: null + module.dev-firewall.google_compute_firewall.rules["web-app-dev-ingress"]: + allow: + - ports: + - '1234' + protocol: tcp + deny: [] + direction: INGRESS + disabled: null + log_config: [] + name: fwr-my-dev-network-sac-i-web-app-dev-ingress + network: my-dev-network + priority: 1000 + project: my-dev-project + source_ranges: null + source_service_accounts: + - frontend-sa@myproject-dev.iam.gserviceaccount.com + source_tags: null + target_service_accounts: + - web-app-a@myproject-dev.iam.gserviceaccount.com + target_tags: null + timeouts: null + module.prod-firewall.google_compute_firewall.rules["deny-all"]: + allow: [] + deny: + - ports: [] + protocol: all + destination_ranges: + - 0.0.0.0/0 + direction: EGRESS + disabled: null + log_config: + - metadata: INCLUDE_ALL_METADATA + name: fwr-my-prod-network-all-e-deny-all + network: my-prod-network + priority: 65535 + project: my-prod-project + source_ranges: null + source_service_accounts: null + source_tags: null + target_service_accounts: null + target_tags: null + timeouts: null + module.prod-firewall.google_compute_firewall.rules["lb-health-checks"]: + allow: + - ports: [] + protocol: tcp + deny: [] + direction: INGRESS + disabled: null + log_config: + - metadata: INCLUDE_ALL_METADATA + name: fwr-my-prod-network-all-i-lb-health-checks + network: my-prod-network + priority: 1001 + project: my-prod-project + source_ranges: + - 130.211.0.0/22 + - 35.191.0.0/16 + source_service_accounts: null + source_tags: null + target_service_accounts: null + target_tags: null + timeouts: null + module.prod-firewall.google_compute_firewall.rules["web-app-prod-egress"]: + allow: + - ports: + - '443' + protocol: tcp + deny: [] + destination_ranges: + - 192.168.10.0/24 + direction: EGRESS + disabled: null + log_config: + - metadata: INCLUDE_ALL_METADATA + name: fwr-my-prod-network-sac-e-web-app-prod-egress + network: my-prod-network + priority: 1000 + project: my-prod-project + source_ranges: null + source_service_accounts: null + source_tags: null + target_service_accounts: + - myapp@myproject-prod.iam.gserviceaccount.com + target_tags: null + timeouts: null + module.prod-firewall.google_compute_firewall.rules["web-app-prod-ingress"]: + allow: + - ports: + - '1234' + protocol: tcp + deny: [] + direction: INGRESS + disabled: null + log_config: + - metadata: INCLUDE_ALL_METADATA + name: fwr-my-prod-network-sac-i-web-app-prod-ingress + network: my-prod-network + priority: 1000 + project: my-prod-project + source_ranges: null + source_service_accounts: + - frontend-sa@myproject-prod.iam.gserviceaccount.com + source_tags: null + target_service_accounts: + - web-app-a@myproject-prod.iam.gserviceaccount.com + target_tags: null + timeouts: null + +counts: + google_compute_firewall: 8 diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/main.tf b/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/main.tf deleted file mode 100644 index 22956f40..00000000 --- a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "firewall" { - source = "../../../../../blueprints/factories/net-vpc-firewall-yaml" - project_id = "my-project" - network = "my-network" - config_directories = [ - "./rules" - ] - log_config = var.log_config -} diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/rules/common.yaml b/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/rules/common.yaml deleted file mode 100644 index cbe8466f..00000000 --- a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/rules/common.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -# allow ingress from GCLB to all instances in the network -lb-health-checks: - allow: - - ports: [] - protocol: tcp - direction: INGRESS - priority: 1001 - source_ranges: - - 35.191.0.0/16 - - 130.211.0.0/22 - -# deny all egress -deny-all: - deny: - - ports: [] - protocol: all - direction: EGRESS - priority: 65535 - destination_ranges: - - 0.0.0.0/0 diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/variables.tf b/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/variables.tf deleted file mode 100644 index 018289fe..00000000 --- a/tests/blueprints/factories/net_vpc_firewall_yaml/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 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 "log_config" { - description = "Log configuration. Possible values for `metadata` are `EXCLUDE_ALL_METADATA` and `INCLUDE_ALL_METADATA`. Set to `null` for disabling firewall logging." - type = object({ - metadata = string - }) - default = null -} diff --git a/tests/blueprints/factories/net_vpc_firewall_yaml/test_plan.py b/tests/blueprints/factories/net_vpc_firewall_yaml/test_plan.py deleted file mode 100644 index 80205e57..00000000 --- a/tests/blueprints/factories/net_vpc_firewall_yaml/test_plan.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -def test_firewall_simple(plan_runner): - "Test firewall rules from rules/common.yaml with no extra options." - _, resources = plan_runner() - assert len(resources) == 4 - assert set(r['type'] for r in resources) == set([ - 'google_compute_firewall', 'time_static' - ]) - firewall_values = [r['values'] for r in resources if r['type'] - == 'google_compute_firewall'] - assert set([f['project'] for f in firewall_values]) == set(['my-project']) - assert set([f['network'] for f in firewall_values]) == set(['my-network']) - - -def test_firewall_log_config(plan_runner): - "Test firewall rules log configuration." - log_config = """ { - metadata = "INCLUDE_ALL_METADATA" - } - """ - log_config_value = [{"metadata": "INCLUDE_ALL_METADATA"}] - _, resources = plan_runner(log_config=log_config) - assert len(resources) == 4 - assert set(r['type'] for r in resources) == set([ - 'google_compute_firewall', 'time_static' - ]) - firewall_values = [r['values'] for r in resources if r['type'] - == 'google_compute_firewall'] - assert all(f['log_config'] == log_config_value for f in firewall_values) diff --git a/tests/blueprints/factories/project_factory/__init__.py b/tests/blueprints/factories/project_factory/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/factories/project_factory/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/factories/project_factory/examples/example.yaml b/tests/blueprints/factories/project_factory/examples/example.yaml new file mode 100644 index 00000000..fe33a437 --- /dev/null +++ b/tests/blueprints/factories/project_factory/examples/example.yaml @@ -0,0 +1,235 @@ +# Copyright 2023 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. + +# This is one of the few modules where it actually makes sense to be +# very verbose with values + +values: + module.projects["project"].google_compute_subnetwork_iam_member.default["dev-default-ew1:serviceAccount:my-service-account"]: + condition: [] + member: serviceAccount:my-service-account + project: fast-dev-net-spoke-0 + region: europe-west1 + role: roles/compute.networkUser + subnetwork: projects/fast-dev-net-spoke-0/regions/europe-west1/subnetworks/dev-default-ew1 + module.projects["project"].google_compute_subnetwork_iam_member.default["dev-default-ew1:user:foobar@example.com"]: + condition: [] + member: user:foobar@example.com + project: fast-dev-net-spoke-0 + region: europe-west1 + role: roles/compute.networkUser + subnetwork: projects/fast-dev-net-spoke-0/regions/europe-west1/subnetworks/dev-default-ew1 + module.projects["project"].module.billing-alert["1"].google_billing_budget.budget: + all_updates_rule: + - disable_default_iam_recipients: false + pubsub_topic: null + schema_version: '1.0' + amount: + - last_period_amount: null + specified_amount: + - nanos: null + units: '10' + billing_account: 012345-67890A-BCDEF0 + budget_filter: + - calendar_period: null + credit_types_treatment: INCLUDE_ALL_CREDITS + custom_period: [] + display_name: test1-project budget + threshold_rules: + - spend_basis: CURRENT_SPEND + threshold_percent: 0.5 + - spend_basis: CURRENT_SPEND + threshold_percent: 0.8 + module.projects["project"].module.billing-alert["1"].google_monitoring_notification_channel.email_channels["team-a-contacts@example.com"]: + display_name: test1-project budget budget email notification (team-a-contacts@example.com) + labels: + email_address: team-a-contacts@example.com + project: test1-project + sensitive_labels: [] + type: email + module.projects["project"].module.billing-alert["1"].google_monitoring_notification_channel.email_channels["team-contacts@example.com"]: + display_name: test1-project budget budget email notification (team-contacts@example.com) + labels: + email_address: team-contacts@example.com + project: test1-project + sensitive_labels: [] + type: email + module.projects["project"].module.dns["ipsum"].google_dns_managed_zone.non-public[0]: + dns_name: ipsum.dev.example.org + name: ipsum + private_visibility_config: + - gke_clusters: [] + networks: + - network_url: projects/foo/networks/bar + project: fast-dev-net-spoke-0 + visibility: private + module.projects["project"].module.dns["lorem"].google_dns_managed_zone.non-public[0]: + dns_name: lorem.dev.example.org + name: lorem + private_visibility_config: + - gke_clusters: [] + networks: + - network_url: projects/foo/networks/bar + project: fast-dev-net-spoke-0 + module.projects["project"].module.project.google_compute_shared_vpc_service_project.shared_vpc_service[0]: + host_project: fast-dev-net-spoke-0 + service_project: test1-project + module.projects["project"].module.project.google_essential_contacts_contact.contact["team-a-contacts@example.com"]: + email: team-a-contacts@example.com + language_tag: en + notification_category_subscriptions: + - ALL + parent: projects/test1-project + module.projects["project"].module.project.google_essential_contacts_contact.contact["team-contacts@example.com"]: + email: team-contacts@example.com + language_tag: en + notification_category_subscriptions: + - ALL + parent: projects/test1-project + module.projects["project"].module.project.google_org_policy_policy.default["compute.disableGuestAttributesAccess"]: + name: projects/test1-project/policies/compute.disableGuestAttributesAccess + parent: projects/test1-project + spec: + - inherit_from_parent: null + reset: null + rules: + - allow_all: null + condition: [] + deny_all: null + enforce: 'TRUE' + values: [] + module.projects["project"].module.project.google_org_policy_policy.default["compute.trustedImageProjects"]: + name: projects/test1-project/policies/compute.trustedImageProjects + parent: projects/test1-project + spec: + - inherit_from_parent: null + reset: null + rules: + - allow_all: null + condition: [] + deny_all: null + enforce: null + values: + - allowed_values: + - projects/fast-dev-iac-core-0 + denied_values: null + module.projects["project"].module.project.google_org_policy_policy.default["compute.vmExternalIpAccess"]: + name: projects/test1-project/policies/compute.vmExternalIpAccess + parent: projects/test1-project + spec: + - inherit_from_parent: null + reset: null + rules: + - allow_all: null + condition: [] + deny_all: 'TRUE' + enforce: null + values: [] + module.projects["project"].module.project.google_project.project[0]: + auto_create_network: false + billing_account: 012345-67890A-BCDEF0 + folder_id: 012345678901 + labels: + application: example-app + costcenter: apps + department: accounting + environment: dev + foo: bar + name: test1-project + org_id: null + project_id: test1-project + skip_delete: false + module.projects["project"].module.project.google_project_iam_binding.authoritative["roles/compute.admin"]: + condition: [] + project: test1-project + role: roles/compute.admin + module.projects["project"].module.project.google_project_iam_binding.authoritative["roles/compute.adminv1"]: + condition: [] + project: test1-project + role: roles/compute.adminv1 + module.projects["project"].module.project.google_project_iam_binding.authoritative["roles/storage.objectViewer"]: + condition: [] + project: test1-project + role: roles/storage.objectViewer + module.projects["project"].module.project.google_project_iam_member.shared_vpc_host_robots["roles/compute.networkUser:cloudservices"]: + condition: [] + project: fast-dev-net-spoke-0 + role: roles/compute.networkUser + module.projects["project"].module.project.google_project_iam_member.shared_vpc_host_robots["roles/compute.securityAdmin:container-engine"]: + condition: [] + project: fast-dev-net-spoke-0 + role: roles/compute.securityAdmin + module.projects["project"].module.project.google_project_service.project_services["billingbudgets.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: billingbudgets.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["compute.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: compute.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["container.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: container.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["dns.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: dns.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["essentialcontacts.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: essentialcontacts.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["orgpolicy.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: orgpolicy.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["stackdriver.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: stackdriver.googleapis.com + module.projects["project"].module.project.google_project_service.project_services["storage.googleapis.com"]: + disable_dependent_services: false + disable_on_destroy: false + project: test1-project + service: storage.googleapis.com + module.projects["project"].module.service-accounts["another-service-account"].google_service_account.service_account[0]: + account_id: another-service-account + display_name: Terraform-managed. + project: test1-project + module.projects["project"].module.service-accounts["my-service-account"].google_service_account.service_account[0]: + account_id: my-service-account + display_name: Terraform-managed. + project: test1-project + +counts: + google_billing_budget: 1 + google_compute_shared_vpc_service_project: 1 + google_compute_subnetwork_iam_member: 2 + google_dns_managed_zone: 2 + google_essential_contacts_contact: 2 + google_monitoring_notification_channel: 2 + google_org_policy_policy: 3 + google_project: 1 + google_project_iam_binding: 3 + google_project_iam_member: 2 + google_project_service: 8 + google_service_account: 2 + google_storage_project_service_account: 1 diff --git a/tests/blueprints/factories/project_factory/fixture/defaults.yaml b/tests/blueprints/factories/project_factory/fixture/defaults.yaml deleted file mode 100644 index 61837818..00000000 --- a/tests/blueprints/factories/project_factory/fixture/defaults.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# skip boilerplate check - -billing_account_id: 012345-67890A-BCDEF0 - -# [opt] Setup for billing alerts -billing_alert: - amount: 1000 - thresholds: - current: [0.5, 0.8] - forecasted: [0.5, 0.8] - credit_treatment: INCLUDE_ALL_CREDITS - -# [opt] Contacts for billing alerts and important notifications -essential_contacts: ["team-contacts@example.com"] - -# [opt] Labels set for all projects -labels: - environment: prod - department: accounting - application: example-app - foo: bar - -# [opt] Additional notification channels for billing -notification_channels: [] -prefix: test diff --git a/tests/blueprints/factories/project_factory/fixture/main.tf b/tests/blueprints/factories/project_factory/fixture/main.tf deleted file mode 100644 index ae686b93..00000000 --- a/tests/blueprints/factories/project_factory/fixture/main.tf +++ /dev/null @@ -1,52 +0,0 @@ -/** - * 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. - */ - -locals { - _defaults = yamldecode(file(var.defaults_file)) - _defaults_net = { - billing_account_id = var.billing_account_id - environment_dns_zone = var.environment_dns_zone - shared_vpc_self_link = var.shared_vpc_self_link - vpc_host_project = var.vpc_host_project - } - defaults = merge(local._defaults, local._defaults_net) - projects = { - for f in fileset("${var.data_dir}", "**/*.yaml") : - trimsuffix(f, ".yaml") => yamldecode(file("${var.data_dir}/${f}")) - } -} - -module "projects" { - source = "../../../../../blueprints/factories/project-factory" - for_each = local.projects - defaults = local.defaults - project_id = each.key - billing_account_id = try(each.value.billing_account_id, null) - billing_alert = try(each.value.billing_alert, null) - dns_zones = try(each.value.dns_zones, []) - essential_contacts = try(each.value.essential_contacts, []) - folder_id = each.value.folder_id - group_iam = try(each.value.group_iam, {}) - iam = try(each.value.iam, {}) - kms_service_agents = try(each.value.kms, {}) - labels = try(each.value.labels, {}) - org_policies = try(each.value.org_policies, null) - prefix = each.value.prefix - service_accounts = try(each.value.service_accounts, {}) - services = try(each.value.services, []) - service_identities_iam = try(each.value.service_identities_iam, {}) - vpc = try(each.value.vpc, null) -} diff --git a/tests/blueprints/factories/project_factory/fixture/projects/project.yaml b/tests/blueprints/factories/project_factory/fixture/projects/project.yaml deleted file mode 100644 index b8d6e663..00000000 --- a/tests/blueprints/factories/project_factory/fixture/projects/project.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# skip boilerplate check - -# [opt] Billing account id - overrides default if set -billing_account_id: 012345-67890A-BCDEF0 - -# [opt] Billing alerts config - overrides default if set -billing_alert: - amount: 10 - thresholds: - current: - - 0.5 - - 0.8 - forecasted: [] - credit_treatment: INCLUDE_ALL_CREDITS - -# [opt] DNS zones to be created as children of the environment_dns_zone defined in defaults -dns_zones: - - lorem - - ipsum - -# [opt] Contacts for billing alerts and important notifications -essential_contacts: - - team-a-contacts@example.com - -# Folder the project will be created as children of -folder_id: folders/012345678901 - -# [opt] Authoritative IAM bindings in group => [roles] format -group_iam: - test-team-foobar@fast-lab-0.gcp-pso-italy.net: - - roles/compute.admin - -# [opt] Authoritative IAM bindings in role => [principals] format -# Generally used to grant roles to service accounts external to the project -iam: - roles/compute.admin: - - serviceAccount:service-account - -# [opt] Service robots and keys they will be assigned as cryptoKeyEncrypterDecrypter -# in service => [keys] format -kms_service_agents: - compute: [key1, key2] - storage: [key1, key2] - -# [opt] Labels for the project - merged with the ones defined in defaults -labels: - environment: prod - -# [opt] Org policy overrides defined at project level -org_policies: - compute.disableGuestAttributesAccess: - rules: - - enforce: true - compute.trustedImageProjects: - rules: - - allow: - values: - - projects/fast-prod-iac-core-0 - -# [opt] Prefix - overrides default if set -prefix: test1 - -# [opt] Service account to create for the project and their roles on the project -# in name => [roles] format -service_accounts: - another-service-account: - - roles/compute.admin - my-service-account: - - roles/compute.admin - -# [opt] APIs to enable on the project. -services: - - storage.googleapis.com - - stackdriver.googleapis.com - - compute.googleapis.com - -# [opt] Roles to assign to the service identities in service => [roles] format -service_identities_iam: - compute: - - roles/storage.objectViewer - - # [opt] VPC setup. - # If set enables the `compute.googleapis.com` service and configures - # service project attachment -vpc: - # [opt] If set, enables the container API - gke_setup: - # Grants "roles/container.hostServiceAgentUser" to the container robot if set - enable_host_service_agent: false - - # Grants "roles/compute.securityAdmin" to the container robot if set - enable_security_admin: true - - # Host project the project will be service project of - host_project: fast-prod-net-spoke-0 - - # [opt] Subnets in the host project where principals will be granted networkUser - # in region/subnet-name => [principals] - subnets_iam: - europe-west1/prod-default-ew1: - - user:foobar@example.com - - serviceAccount:service-account1@example.com - - my-service-account diff --git a/tests/blueprints/factories/project_factory/fixture/variables.tf b/tests/blueprints/factories/project_factory/fixture/variables.tf deleted file mode 100644 index d0d6759b..00000000 --- a/tests/blueprints/factories/project_factory/fixture/variables.tf +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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_id" { - description = "Billing account id." - type = string - default = "012345-67890A-BCDEF0" -} - -variable "data_dir" { - description = "Relative path for the folder storing configuration data." - type = string - default = "./projects/" -} - -variable "environment_dns_zone" { - description = "DNS zone suffix for environment." - type = string - default = "prod.gcp.example.com" -} - -variable "defaults_file" { - description = "Relative path for the file storing the project factory configuration." - type = string - default = "./defaults.yaml" -} - -variable "service_accounts" { - description = "Service accounts to be created, and roles assigned them on the project." - type = map(list(string)) - default = {} -} - -variable "service_accounts_iam" { - description = "IAM bindings on service account resources. Format is KEY => {ROLE => [MEMBERS]}" - type = map(map(list(string))) - default = {} - nullable = false -} - -variable "shared_vpc_self_link" { - description = "Self link for the shared VPC." - type = string - default = "self-link" -} - -variable "vpc_host_project" { - description = "Host project for the shared VPC." - type = string - default = "host-project" -} diff --git a/tests/blueprints/factories/project_factory/test_plan.py b/tests/blueprints/factories/project_factory/test_plan.py deleted file mode 100644 index 4c8e8641..00000000 --- a/tests/blueprints/factories/project_factory/test_plan.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - - -def test_plan(e2e_plan_runner): - "Check for a clean plan" - modules, resources = e2e_plan_runner() - assert len(modules) > 0 and len(resources) > 0 - - -def test_plan_service_accounts(e2e_plan_runner): - "Check for a clean plan" - service_accounts = '''{ - sa-001 = [] - sa-002 = ["roles/owner"] - }''' - service_accounts_iam = '''{ - sa-002 = { - "roles/iam.serviceAccountTokenCreator" = ["group:team-1@example.com"] - } - }''' - modules, resources = e2e_plan_runner( - service_accounts=service_accounts, - service_accounts_iam=service_accounts_iam) - assert len(modules) > 0 and len(resources) > 0 diff --git a/tests/blueprints/gke/__init__.py b/tests/blueprints/gke/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/gke/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/gke/binauthz/__init__.py b/tests/blueprints/gke/binauthz/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/gke/binauthz/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/gke/binauthz/fixture/main.tf b/tests/blueprints/gke/binauthz/fixture/main.tf deleted file mode 100644 index 23e1504b..00000000 --- a/tests/blueprints/gke/binauthz/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/gke/binauthz" - prefix = var.prefix - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/gke/binauthz/fixture/variables.tf b/tests/blueprints/gke/binauthz/fixture/variables.tf deleted file mode 100644 index 8a09c75e..00000000 --- a/tests/blueprints/gke/binauthz/fixture/variables.tf +++ /dev/null @@ -1,34 +0,0 @@ -# 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 -# -# https://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 "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "12345-12345-12345" - parent = "folders/123456789" - } -} - -variable "project_id" { - type = string - default = "my-project" -} - -variable "prefix" { - type = string - default = "test" -} diff --git a/tests/blueprints/gke/binauthz/test_plan.py b/tests/blueprints/gke/binauthz/test_plan.py deleted file mode 100644 index b4437b6f..00000000 --- a/tests/blueprints/gke/binauthz/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 13 - assert len(resources) == 44 diff --git a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/__init__.py b/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/main.tf b/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/main.tf deleted file mode 100644 index 47524fa5..00000000 --- a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/main.tf +++ /dev/null @@ -1,28 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/gke/multi-cluster-mesh-gke-fleet-api" - billing_account_id = var.billing_account_id - parent = var.parent - host_project_id = var.host_project_id - fleet_project_id = var.fleet_project_id - mgmt_project_id = var.mgmt_project_id - region = var.region - clusters_config = var.clusters_config - mgmt_subnet_cidr_block = var.mgmt_subnet_cidr_block - istio_version = var.istio_version -} diff --git a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/variables.tf b/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/variables.tf deleted file mode 100644 index 6c6b6c8f..00000000 --- a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/fixture/variables.tf +++ /dev/null @@ -1,107 +0,0 @@ -/** - * 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_id" { - description = "Billing account id." - type = string - default = "123-456-789" -} - -variable "parent" { - description = "Parent." - type = string - default = "folders/123456789" -} - -variable "host_project_id" { - description = "Host project ID." - type = string - default = "my-host-project" -} - -variable "fleet_project_id" { - description = "Fleet project ID." - type = string - default = "my-fleet-project" -} - -variable "mgmt_project_id" { - description = "Management Project ID." - type = string - default = "my-mgmt-project" -} - -variable "mgmt_subnet_cidr_block" { - description = "Management subnet CIDR block." - type = string - default = "10.0.0.0/24" -} - -variable "region" { - description = "Region." - type = string - default = "europe-west1" -} - -variable "clusters_config" { - description = "Clusters configuration." - type = map(object({ - subnet_cidr_block = string - master_cidr_block = string - services_cidr_block = string - pods_cidr_block = string - })) - default = { - cluster-a = { - subnet_cidr_block = "10.0.1.0/24" - master_cidr_block = "10.16.0.0/28" - services_cidr_block = "192.168.1.0/24" - pods_cidr_block = "172.16.0.0/20" - } - cluster-b = { - subnet_cidr_block = "10.0.2.0/24" - master_cidr_block = "10.16.0.16/28" - services_cidr_block = "192.168.2.0/24" - pods_cidr_block = "172.16.16.0/20" - } - } -} - -variable "mgmt_server_config" { - description = "Mgmt server configuration" - type = object({ - disk_size = number - disk_type = string - image = string - instance_type = string - region = string - zone = string - }) - default = { - disk_size = 50 - disk_type = "pd-ssd" - image = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts" - instance_type = "n1-standard-2" - region = "europe-west1" - zone = "europe-west1-c" - } -} - -variable "istio_version" { - description = "ASM version" - type = string - default = "1.14.1-asm.3" -} diff --git a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/test_plan.py b/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/test_plan.py deleted file mode 100644 index 2379849d..00000000 --- a/tests/blueprints/gke/multi_cluster_mesh_gke_fleet_api/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 12 - assert len(resources) == 55 diff --git a/tests/blueprints/gke/multitenant_fleet/__init__.py b/tests/blueprints/gke/multitenant_fleet/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/gke/multitenant_fleet/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/gke/multitenant_fleet/fixture/main.tf b/tests/blueprints/gke/multitenant_fleet/fixture/main.tf deleted file mode 100644 index 394d555d..00000000 --- a/tests/blueprints/gke/multitenant_fleet/fixture/main.tf +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/gke/multitenant-fleet" - project_id = "test-prj" - billing_account_id = "ABCDEF-0123456-ABCDEF" - folder_id = "folders/1234567890" - prefix = "test" - clusters = { - cluster-0 = { - location = "europe-west1" - private_cluster_config = { - enable_private_endpoint = true - master_global_access = true - } - vpc_config = { - subnetwork = "projects/my-host-project-id/regions/europe-west1/subnetworks/mycluster-subnet" - master_ipv4_cidr_block = "172.16.10.0/28" - secondary_range_names = { - pods = "pods" - services = "services" - } - } - } - } - nodepools = { - cluster-0 = { - nodepool-0 = { - node_config = { - disk_type = "pd-balanced" - machine_type = "n2-standard-4" - spot = true - } - } - } - } - vpc_config = { - host_project_id = "my-host-project-id" - vpc_self_link = "projects/my-host-project-id/global/networks/my-network" - } -} diff --git a/tests/blueprints/gke/multitenant_fleet/test_plan.py b/tests/blueprints/gke/multitenant_fleet/test_plan.py deleted file mode 100644 index c8a83694..00000000 --- a/tests/blueprints/gke/multitenant_fleet/test_plan.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 4 - assert len(resources) == 23 diff --git a/tests/blueprints/gke/shared_vpc_gke/__init__.py b/tests/blueprints/gke/shared_vpc_gke/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/gke/shared_vpc_gke/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/gke/shared_vpc_gke/fixture/main.tf b/tests/blueprints/gke/shared_vpc_gke/fixture/main.tf deleted file mode 100644 index ac4e647a..00000000 --- a/tests/blueprints/gke/shared_vpc_gke/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/gke/shared-vpc-gke" - billing_account_id = var.billing_account_id - prefix = var.prefix - root_node = var.root_node -} diff --git a/tests/blueprints/gke/shared_vpc_gke/fixture/variables.tf b/tests/blueprints/gke/shared_vpc_gke/fixture/variables.tf deleted file mode 100644 index 59933f9a..00000000 --- a/tests/blueprints/gke/shared_vpc_gke/fixture/variables.tf +++ /dev/null @@ -1,28 +0,0 @@ -# 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 -# -# https://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_id" { - type = string - default = "ABCDE-12345-ABCDE" -} - -variable "prefix" { - type = string - default = "test" -} - -variable "root_node" { - type = string - default = "organizations/0123456789" -} diff --git a/tests/blueprints/gke/shared_vpc_gke/test_plan.py b/tests/blueprints/gke/shared_vpc_gke/test_plan.py deleted file mode 100644 index 8d0f6bd6..00000000 --- a/tests/blueprints/gke/shared_vpc_gke/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 10 - assert len(resources) == 43 diff --git a/tests/blueprints/networking/decentralized_firewall/__init__.py b/tests/blueprints/networking/decentralized_firewall/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/decentralized_firewall/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/decentralized_firewall/fixture/main.tf b/tests/blueprints/networking/decentralized_firewall/fixture/main.tf deleted file mode 100644 index 92d45041..00000000 --- a/tests/blueprints/networking/decentralized_firewall/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/decentralized-firewall" - billing_account_id = var.billing_account_id - prefix = var.prefix - root_node = var.root_node -} diff --git a/tests/blueprints/networking/decentralized_firewall/fixture/variables.tf b/tests/blueprints/networking/decentralized_firewall/fixture/variables.tf deleted file mode 100644 index 59933f9a..00000000 --- a/tests/blueprints/networking/decentralized_firewall/fixture/variables.tf +++ /dev/null @@ -1,28 +0,0 @@ -# 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 -# -# https://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_id" { - type = string - default = "ABCDE-12345-ABCDE" -} - -variable "prefix" { - type = string - default = "test" -} - -variable "root_node" { - type = string - default = "organizations/0123456789" -} diff --git a/tests/blueprints/networking/decentralized_firewall/test_plan.py b/tests/blueprints/networking/decentralized_firewall/test_plan.py deleted file mode 100644 index 885b9b38..00000000 --- a/tests/blueprints/networking/decentralized_firewall/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 8 - assert len(resources) == 50 diff --git a/tests/blueprints/networking/filtering_proxy/__init__.py b/tests/blueprints/networking/filtering_proxy/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/filtering_proxy/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/filtering_proxy/fixture/main.tf b/tests/blueprints/networking/filtering_proxy/fixture/main.tf deleted file mode 100644 index 2d250c0a..00000000 --- a/tests/blueprints/networking/filtering_proxy/fixture/main.tf +++ /dev/null @@ -1,23 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/filtering-proxy" - billing_account = "123456-123456-123456" - mig = var.mig - prefix = "fabric" - root_node = "folders/123456789" -} diff --git a/tests/blueprints/networking/filtering_proxy/fixture/variables.tf b/tests/blueprints/networking/filtering_proxy/fixture/variables.tf deleted file mode 100644 index f4b4c588..00000000 --- a/tests/blueprints/networking/filtering_proxy/fixture/variables.tf +++ /dev/null @@ -1,18 +0,0 @@ -# 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 -# -# https://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 "mig" { - type = bool - default = false -} diff --git a/tests/blueprints/networking/filtering_proxy/test_plan.py b/tests/blueprints/networking/filtering_proxy/test_plan.py deleted file mode 100644 index c13a5d1a..00000000 --- a/tests/blueprints/networking/filtering_proxy/test_plan.py +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 11 - assert len(resources) == 30 - - modules, resources = e2e_plan_runner(mig="true") - assert len(modules) == 13 - assert len(resources) == 36 diff --git a/tests/blueprints/networking/filtering_proxy_psc/__init__.py b/tests/blueprints/networking/filtering_proxy_psc/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/filtering_proxy_psc/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/filtering_proxy_psc/fixture/main.tf b/tests/blueprints/networking/filtering_proxy_psc/fixture/main.tf deleted file mode 100644 index eb01058d..00000000 --- a/tests/blueprints/networking/filtering_proxy_psc/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/filtering-proxy-psc" - prefix = "fabric" - project_create = { - billing_account = "123456-ABCDEF-123456" - parent = "folders/1234567890" - } - project_id = "test-project" -} diff --git a/tests/blueprints/networking/filtering_proxy_psc/test_plan.py b/tests/blueprints/networking/filtering_proxy_psc/test_plan.py deleted file mode 100644 index 498bb2bf..00000000 --- a/tests/blueprints/networking/filtering_proxy_psc/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 12 - assert len(resources) == 34 diff --git a/tests/blueprints/networking/glb_and_armor/__init__.py b/tests/blueprints/networking/glb_and_armor/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/glb_and_armor/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/glb_and_armor/fixture/main.tf b/tests/blueprints/networking/glb_and_armor/fixture/main.tf deleted file mode 100644 index 2a5a7077..00000000 --- a/tests/blueprints/networking/glb_and_armor/fixture/main.tf +++ /dev/null @@ -1,21 +0,0 @@ -# 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 -# -# https://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. - -module "test" { - source = "../../../../../blueprints/networking/glb-and-armor" - prefix = var.prefix - project_create = var.project_create - project_id = var.project_id - enforce_security_policy = var.enforce_security_policy -} diff --git a/tests/blueprints/networking/glb_and_armor/fixture/variables.tf b/tests/blueprints/networking/glb_and_armor/fixture/variables.tf deleted file mode 100644 index 41090c1c..00000000 --- a/tests/blueprints/networking/glb_and_armor/fixture/variables.tf +++ /dev/null @@ -1,39 +0,0 @@ -# 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 -# -# https://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 "prefix" { - type = string - default = "test" -} - -variable "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "123456789" - parent = "organizations/123456789" - } -} - -variable "project_id" { - type = string - default = "project-1" -} - -variable "enforce_security_policy" { - type = bool - default = true -} diff --git a/tests/blueprints/networking/glb_and_armor/test_plan.py b/tests/blueprints/networking/glb_and_armor/test_plan.py deleted file mode 100644 index dc4a4956..00000000 --- a/tests/blueprints/networking/glb_and_armor/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 11 - assert len(resources) == 25 diff --git a/tests/blueprints/networking/hub_and_spoke_peering/__init__.py b/tests/blueprints/networking/hub_and_spoke_peering/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/hub_and_spoke_peering/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/hub_and_spoke_peering/fixture/main.tf b/tests/blueprints/networking/hub_and_spoke_peering/fixture/main.tf deleted file mode 100644 index c5b105e6..00000000 --- a/tests/blueprints/networking/hub_and_spoke_peering/fixture/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/hub-and-spoke-peering" - prefix = var.prefix - project_create = { - billing_account = "123456-123456-123456" - oslogin = true - parent = "folders/123456789" - } - project_id = var.project_id -} diff --git a/tests/blueprints/networking/hub_and_spoke_peering/fixture/variables.tf b/tests/blueprints/networking/hub_and_spoke_peering/fixture/variables.tf deleted file mode 100644 index b67795f9..00000000 --- a/tests/blueprints/networking/hub_and_spoke_peering/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# -# https://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 "prefix" { - type = string - default = "test" -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/networking/hub_and_spoke_peering/test_plan.py b/tests/blueprints/networking/hub_and_spoke_peering/test_plan.py deleted file mode 100644 index 127a0ba4..00000000 --- a/tests/blueprints/networking/hub_and_spoke_peering/test_plan.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 21 - assert len(resources) == 61 diff --git a/tests/blueprints/networking/hub_and_spoke_vpn/__init__.py b/tests/blueprints/networking/hub_and_spoke_vpn/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/hub_and_spoke_vpn/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/hub_and_spoke_vpn/fixture/main.tf b/tests/blueprints/networking/hub_and_spoke_vpn/fixture/main.tf deleted file mode 100644 index 37558c71..00000000 --- a/tests/blueprints/networking/hub_and_spoke_vpn/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/hub-and-spoke-vpn" - prefix = var.prefix - project_create_config = { - billing_account_id = "ABCDE-123456-ABCDE" - parent_id = null - } - project_id = var.project_id -} diff --git a/tests/blueprints/networking/hub_and_spoke_vpn/fixture/variables.tf b/tests/blueprints/networking/hub_and_spoke_vpn/fixture/variables.tf deleted file mode 100644 index b67795f9..00000000 --- a/tests/blueprints/networking/hub_and_spoke_vpn/fixture/variables.tf +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -# -# https://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 "prefix" { - type = string - default = "test" -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/networking/hub_and_spoke_vpn/test_plan.py b/tests/blueprints/networking/hub_and_spoke_vpn/test_plan.py deleted file mode 100644 index a24aaa59..00000000 --- a/tests/blueprints/networking/hub_and_spoke_vpn/test_plan.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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. - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 19 - assert len(resources) == 73 diff --git a/tests/blueprints/networking/ilb_next_hop/__init__.py b/tests/blueprints/networking/ilb_next_hop/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/ilb_next_hop/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/ilb_next_hop/fixture/main.tf b/tests/blueprints/networking/ilb_next_hop/fixture/main.tf deleted file mode 100644 index acaad22a..00000000 --- a/tests/blueprints/networking/ilb_next_hop/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/ilb-next-hop" - prefix = var.prefix - project_create = var.project_create - project_id = var.project_id -} diff --git a/tests/blueprints/networking/ilb_next_hop/fixture/variables.tf b/tests/blueprints/networking/ilb_next_hop/fixture/variables.tf deleted file mode 100644 index 4eede179..00000000 --- a/tests/blueprints/networking/ilb_next_hop/fixture/variables.tf +++ /dev/null @@ -1,28 +0,0 @@ -# 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 -# -# https://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 "prefix" { - type = string - default = "test" -} - -variable "project_create" { - type = bool - default = true -} - -variable "project_id" { - type = string - default = "project-1" -} diff --git a/tests/blueprints/networking/ilb_next_hop/test_plan.py b/tests/blueprints/networking/ilb_next_hop/test_plan.py deleted file mode 100644 index d2419ddf..00000000 --- a/tests/blueprints/networking/ilb_next_hop/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 17 - assert len(resources) == 42 diff --git a/tests/blueprints/networking/private_cloud_function_from_onprem/__init__.py b/tests/blueprints/networking/private_cloud_function_from_onprem/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/networking/private_cloud_function_from_onprem/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/networking/private_cloud_function_from_onprem/fixture/main.tf b/tests/blueprints/networking/private_cloud_function_from_onprem/fixture/main.tf deleted file mode 100644 index d166a0fc..00000000 --- a/tests/blueprints/networking/private_cloud_function_from_onprem/fixture/main.tf +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/networking/private-cloud-function-from-onprem" - project_create = { - billing_account_id = "123456-ABCDEF-123456" - parent = "folders/1234567890" - } - project_id = "test-project" -} diff --git a/tests/blueprints/networking/private_cloud_function_from_onprem/test_plan.py b/tests/blueprints/networking/private_cloud_function_from_onprem/test_plan.py deleted file mode 100644 index 81225db3..00000000 --- a/tests/blueprints/networking/private_cloud_function_from_onprem/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 10 - assert len(resources) == 39 diff --git a/tests/blueprints/serverless/__init__.py b/tests/blueprints/serverless/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/serverless/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/serverless/api_gateway/__init__.py b/tests/blueprints/serverless/api_gateway/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/serverless/api_gateway/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. diff --git a/tests/blueprints/serverless/api_gateway/fixture/main.tf b/tests/blueprints/serverless/api_gateway/fixture/main.tf deleted file mode 100644 index 094d4697..00000000 --- a/tests/blueprints/serverless/api_gateway/fixture/main.tf +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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. - */ - -module "test" { - source = "../../../../../blueprints/serverless/api-gateway" - project_create = var.project_create - project_id = var.project_id - regions = var.regions -} diff --git a/tests/blueprints/serverless/api_gateway/fixture/variables.tf b/tests/blueprints/serverless/api_gateway/fixture/variables.tf deleted file mode 100644 index dce1579c..00000000 --- a/tests/blueprints/serverless/api_gateway/fixture/variables.tf +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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 "project_create" { - type = object({ - billing_account_id = string - parent = string - }) - default = { - billing_account_id = "123456789" - parent = "organizations/123456789" - } -} - -variable "project_id" { - type = string - default = "project-1" -} - -variable "regions" { - type = list(string) - default = [ - "europe-west1", - "europe-west2" - ] -} diff --git a/tests/blueprints/serverless/api_gateway/test_plan.py b/tests/blueprints/serverless/api_gateway/test_plan.py deleted file mode 100644 index 9d658398..00000000 --- a/tests/blueprints/serverless/api_gateway/test_plan.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner() - assert len(modules) == 7 - assert len(resources) == 32 diff --git a/tests/blueprints/data_solutions/shielded_folder/tftest.yaml b/tests/blueprints/test_empty.py similarity index 77% rename from tests/blueprints/data_solutions/shielded_folder/tftest.yaml rename to tests/blueprints/test_empty.py index 3c0bcb8c..9afb6366 100644 --- a/tests/blueprints/data_solutions/shielded_folder/tftest.yaml +++ b/tests/blueprints/test_empty.py @@ -12,7 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -module: blueprints/data-solutions/shielded-folder -tests: - simple: +def test_dummy(): + """ + Blueprint tests are mostly run from READMEs now. Leave an empty + test so pipelines don't fail because of an empty test suite + """ + assert True diff --git a/tests/examples/test_plan.py b/tests/examples/test_plan.py index 261276f7..b12d82fc 100644 --- a/tests/examples/test_plan.py +++ b/tests/examples/test_plan.py @@ -18,7 +18,7 @@ from pathlib import Path BASE_PATH = Path(__file__).parent COUNT_TEST_RE = re.compile(r'# tftest +modules=(\d+) +resources=(\d+)' + - r'(?: +files=([\w,_-]+))?' + + r'(?: +files=([\w@,_-]+))?' + r'(?: +inventory=([\w\-.]+))?')