diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 8ffc4194e..bb9ef9046 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -88,5 +88,5 @@ body: attributes: label: Additional context description: - To help us understand the issue, please include any relevant screenshots, - Terraform plan/apply output, etc. + To help us understand the issue, please include any relevant screenshots, + Terraform plan/apply output, etc. diff --git a/.github/actions/fabric-tests/action.yml b/.github/actions/fabric-tests/action.yml index 28a085155..05f93fcf7 100644 --- a/.github/actions/fabric-tests/action.yml +++ b/.github/actions/fabric-tests/action.yml @@ -66,6 +66,7 @@ runs: uses: actions/cache@v4 with: path: ${{ env.TF_PLUGIN_CACHE_DIR }} + # yamllint disable-line rule:line-length key: ${{ runner.os }}-${{ inputs.TERRAFORM_FLAVOUR }}-${{ inputs.TERRAFORM_VERSION }}-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }} # avoid conflicts with user-installed providers on local machines - name: Pin provider versions diff --git a/.github/actions/post-fabric-tests/action.yml b/.github/actions/post-fabric-tests/action.yml index 8fe774d6f..9f2cd38c7 100644 --- a/.github/actions/post-fabric-tests/action.yml +++ b/.github/actions/post-fabric-tests/action.yml @@ -26,8 +26,7 @@ runs: sed -e 's/\\n/\n/g' test-results-raw.xml > test-results.xml - name: Test report - uses: pmeier/pytest-results-action@035bda205f160abee0b277db11ac6ca01175ca7d # v0.6.0 + uses: pmeier/pytest-results-action@035bda205f160abee0b277db11ac6ca01175ca7d # v0.6.0 with: path: test-results.xml title: ${{ inputs.MODULE }} Test report - diff --git a/.github/labeler.yml b/.github/labeler.yml index afe3fe90c..eb987acc1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:indentation 'on:blueprints': - changed-files: - any-glob-to-any-file: - - 'blueprints/**' + - 'blueprints/**' 'on:FAST': - changed-files: diff --git a/.github/workflows/daily-tag.yml b/.github/workflows/daily-tag.yml index 6a95e649c..12f4ae11c 100644 --- a/.github/workflows/daily-tag.yml +++ b/.github/workflows/daily-tag.yml @@ -15,6 +15,7 @@ name: | Create daily release tags +# yamllint disable-line rule:truthy on: workflow_dispatch: schedule: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 669e5d67c..cfa8eb5bd 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -14,6 +14,7 @@ name: "Label Pull Requests" +# yamllint disable-line rule:truthy on: # only used for PRs that involve labeler itself # https://github.com/actions/labeler?tab=readme-ov-file#notes-regarding-pull_request_target-event diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index ab892e7d8..f329e33af 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -13,6 +13,7 @@ # limitations under the License. name: "Linting" +# yamllint disable-line rule:truthy on: pull_request: branches: @@ -100,12 +101,16 @@ jobs: - name: Check modules versions id: versions run: | - OUTPUT_TF=$(find . -type f -name 'versions.tf' -exec diff -I '[[:space:]]*module_name' -ub default-versions.tf {} \;) + OUTPUT_TF=$( + find . -type f -name 'versions.tf' -exec diff -I '[[:space:]]*module_name' -ub default-versions.tf {} \; + ) if [[ -n "${OUTPUT_TF}" ]] ; then echo "Terraform versions.tf:" echo "${OUTPUT_TF}" fi - OUTPUT_TOFU=$(find . -type f -name 'versions.tofu' -exec diff -I '[[:space:]]*module_name' -ub default-versions.tofu {} \;) + OUTPUT_TOFU=$( + find . -type f -name 'versions.tofu' -exec diff -I '[[:space:]]*module_name' -ub default-versions.tofu {} \; + ) if [[ -n "${OUTPUT_TOFU}" ]] ; then echo "Terraform versions.tofu:" echo "${OUTPUT_TOFU}" @@ -120,3 +125,6 @@ jobs: id: duplicates run: | python3 tools/duplicate-diff.py + + - name: yaml-lint + uses: ibiqlik/action-yamllint@b74a2626a991d676b6ec243a6458ff86cccf2d2d diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4e30d963..c900e5c39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ name: | Create a new release - +# yamllint disable-line rule:truthy on: workflow_dispatch: inputs: @@ -37,6 +37,7 @@ jobs: - uses: actions/checkout@v4 - name: "Validate input" + # yamllint disable rule:line-length run: | [[ "${{ github.event.inputs.changelog }}" != "true" ]] && { echo 'You didn''t update the changelog.' ; exit 1; } [[ -n "${{ github.event.inputs.version }}" ]] || { echo 'Version not specified!'; exit 1; } diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a18d5ae76..72a49c3c9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,7 @@ # limitations under the License. name: "Tests" +# yamllint disable-line rule:truthy on: push: branches: @@ -82,7 +83,8 @@ jobs: sed -i -e 's/>=\(.*# tftest\)/=\1/g' tools/lockfile/versions.tf tools/lockfile/versions.tofu # change terraform version to the one that is running - sed -i 's/required_version = .*$/required_version = ">= ${{ env.TERRAFORM_VERSION }}"/g' tools/lockfile/versions.tf + sed -i 's/required_version = .*$/required_version = ">= ${{ env.TERRAFORM_VERSION }}"/g' \ + tools/lockfile/versions.tf cd tools/lockfile ${{ matrix.flavour }} init -upgrade=true @@ -91,6 +93,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.TF_PLUGIN_CACHE_DIR }} + # yamllint disable-line rule:line-length key: ${{ runner.os }}-${{ matrix.flavour }}-${{ env.TERRAFORM_VERSION }}-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }} - name: Upload lockfile @@ -156,7 +159,9 @@ jobs: - name: Run tests on documentation examples env: TERRAFORM: ${{ matrix.flavour }} - run: pytest -vv ${{ matrix.flavour == 'terraform' && '-n4' || '-n4' }} --tb=line --junit-xml=test-results-raw.xml -k "terraform and modules/" tests/examples + run: | + pytest -vv ${{ matrix.flavour == 'terraform' && '-n4' || '-n4' }} --tb=line \ + --junit-xml=test-results-raw.xml -k "terraform and modules/" tests/examples - name: Create report uses: ./.github/actions/post-fabric-tests @@ -199,7 +204,9 @@ jobs: - name: Run tests modules env: TERRAFORM: ${{ matrix.flavour }} - run: pytest -vv ${{ matrix.flavour == 'terraform' && '-n4' || '-n4' }} --tb=line --junit-xml=test-results-raw.xml tests/modules + run: | + pytest -vv ${{ matrix.flavour == 'terraform' && '-n4' || '-n4' }} --tb=line \ + --junit-xml=test-results-raw.xml tests/modules - name: Create report uses: ./.github/actions/post-fabric-tests @@ -213,8 +220,8 @@ jobs: strategy: matrix: include: - - flavour: terraform - # - flavour: tofu # tofu fails to find the terraform binary for FAST tests + - flavour: terraform + # - flavour: tofu # tofu fails to find the terraform binary for FAST tests steps: - uses: actions/checkout@v4 - name: Set Terraform versions @@ -258,7 +265,9 @@ jobs: TERRAFORM_FLAVOUR: ${{ env.DEFAULT_TERRAFORM_FLAVOUR }} - name: Run schema tests - run: pytest -vv --tb=line --junit-xml=test-results-raw.xml -k "(tests and schemas) or (fast and schema) or (examples and yaml)" + run: | + pytest -vv --tb=line --junit-xml=test-results-raw.xml \ + -k "(tests and schemas) or (fast and schema) or (examples and yaml)" - name: Create report uses: ./.github/actions/post-fabric-tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c381d3d15..96f226cb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,9 +23,6 @@ repos: - --args=--config=__GIT_WORKING_DIR__/.tflint.hcl files: ^modules/ exclude: (tests/fixtures/|tools/lockfile/|^fast) - # - id: terraform_validate - # args: - # - --hook-config=--retry-once-with-cleanup=true - repo: local hooks: - id: cff-readme @@ -33,17 +30,17 @@ repos: entry: tools/pre-commit-tfdoc.sh language: python additional_dependencies: - - click - - deepdiff - - ghapi - - iso8601 - - marko - - requests - - yamale - - yapf - - jsonschema - - BeautifulSoup4 - #types: [terraform] + - click + - deepdiff + - ghapi + - iso8601 + - marko + - requests + - yamale + - yapf + - jsonschema + - BeautifulSoup4 + # types: [terraform] files: ^(modules|fast).*(tf|README.md)$ pass_filenames: true require_serial: true @@ -52,34 +49,34 @@ repos: language: python entry: tools/check_boilerplate.py additional_dependencies: - - click - - deepdiff - - ghapi - - iso8601 - - marko - - requests - - yamale - - yapf - - jsonschema - - BeautifulSoup4 + - click + - deepdiff + - ghapi + - iso8601 + - marko + - requests + - yamale + - yapf + - jsonschema + - BeautifulSoup4 pass_filenames: true args: - - --scan-files + - --scan-files - id: tflint-fast name: Checking FAST code with tflint entry: tools/tflint-fast.py language: python additional_dependencies: - - click - - deepdiff - - ghapi - - iso8601 - - marko - - requests - - yamale - - yapf - - jsonschema - - BeautifulSoup4 + - click + - deepdiff + - ghapi + - iso8601 + - marko + - requests + - yamale + - yapf + - jsonschema + - BeautifulSoup4 pass_filenames: false require_serial: true files: ^fast/.*tf @@ -99,16 +96,16 @@ repos: name: Check name lengths for FAST language: python additional_dependencies: - - click - - deepdiff - - ghapi - - iso8601 - - marko - - requests - - yamale - - yapf - - jsonschema - - BeautifulSoup4 + - click + - deepdiff + - ghapi + - iso8601 + - marko + - requests + - yamale + - yapf + - jsonschema + - BeautifulSoup4 pass_filenames: false files: ^fast entry: tools/check_names.py --prefix-length=10 --failed-only fast/stages @@ -116,16 +113,16 @@ repos: name: Check links in markdown files language: python additional_dependencies: - - click - - deepdiff - - ghapi - - iso8601 - - marko - - requests - - yamale - - yapf - - jsonschema - - BeautifulSoup4 + - click + - deepdiff + - ghapi + - iso8601 + - marko + - requests + - yamale + - yapf + - jsonschema + - BeautifulSoup4 entry: tools/check_links.py --no-show-summary --scan-files - id: duplicate-diff name: duplicate-diff @@ -136,13 +133,12 @@ repos: pass_filenames: true require_serial: true - -# - repo: https://github.com/adrienverge/yamllint -# rev: v1.34.0 -# hooks: -# - id: yamllint -# args: [-c=.yamllint, --no-warnings] -# exclude: (/templates/|modules/cloud-config-container/) +- repo: https://github.com/adrienverge/yamllint + rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # v1.37.0 + hooks: + - id: yamllint + args: ["-c=.yamllint", "--no-warnings"] + exclude: (/templates/|modules/cloud-config-container/) - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: "3.0.0" diff --git a/.yamllint b/.yamllint index e5f87654f..86134af14 100644 --- a/.yamllint +++ b/.yamllint @@ -5,6 +5,14 @@ yaml-files: - '*.yml' - '.yamllint' +## exclude +ignore: | + fast/stages/0-org-setup/assets/workflow-*.yaml + cloud-config.yaml + *-cloud-config.yaml + modules/cloud-config-container/__need_fixing/onprem/static-vpn-gw-cloud-init.yaml + modules/net-lb-int/recipe-ilb-next-hop/assets/gw.yaml + extends: default rules: @@ -14,3 +22,9 @@ rules: max: 120 level: warning braces: disable + document-start: disable + empty-lines: + max: 2 + max-start: 0 + max-end: 1 + comments-indentation: disable diff --git a/fast/addons/2-networking-test/data/instances/server-0.yaml b/fast/addons/2-networking-test/data/instances/server-0.yaml index c9d2191cc..bc01bda93 100644 --- a/fast/addons/2-networking-test/data/instances/server-0.yaml +++ b/fast/addons/2-networking-test/data/instances/server-0.yaml @@ -21,4 +21,4 @@ project_id: dev-spoke-0 service_account: server-0 subnet_id: primary/default image: projects/cos-cloud/global/images/family/cos-stable -user_data_file: assets/server-nginx-cloud-config.yaml \ No newline at end of file +user_data_file: assets/server-nginx-cloud-config.yaml diff --git a/fast/addons/2-networking-test/data/service-accounts/client-0.yaml b/fast/addons/2-networking-test/data/service-accounts/client-0.yaml index f6a79c8cb..7835af0b2 100644 --- a/fast/addons/2-networking-test/data/service-accounts/client-0.yaml +++ b/fast/addons/2-networking-test/data/service-accounts/client-0.yaml @@ -17,4 +17,4 @@ # file name can be overridden via 'name' property if needed # name: client-0 project_id: dev-spoke-0 -display_name: Test client instances service account. \ No newline at end of file +display_name: Test client instances service account. diff --git a/fast/addons/2-networking-test/data/service-accounts/server-0.yaml b/fast/addons/2-networking-test/data/service-accounts/server-0.yaml index 573311380..151f4cc47 100644 --- a/fast/addons/2-networking-test/data/service-accounts/server-0.yaml +++ b/fast/addons/2-networking-test/data/service-accounts/server-0.yaml @@ -17,4 +17,4 @@ # file name can be overridden via 'name' property if needed # name: server-0 project_id: dev-spoke-0 -display_name: Test server instances service account. \ No newline at end of file +display_name: Test server instances service account. diff --git a/fast/stages/0-org-setup/datasets/classic/folders/networking/.config.yaml b/fast/stages/0-org-setup/datasets/classic/folders/networking/.config.yaml index 06a6664a7..00f5fe989 100644 --- a/fast/stages/0-org-setup/datasets/classic/folders/networking/.config.yaml +++ b/fast/stages/0-org-setup/datasets/classic/folders/networking/.config.yaml @@ -59,4 +59,4 @@ iam_bindings: api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly([ 'roles/compute.networkUser', 'roles/composer.sharedVpcAgent', 'roles/container.hostServiceAgentUser', 'roles/vpcaccess.user' - ]) \ No newline at end of file + ]) diff --git a/fast/stages/0-org-setup/datasets/classic/folders/security/.config.yaml b/fast/stages/0-org-setup/datasets/classic/folders/security/.config.yaml index e97c5d9f9..21ae02ac9 100644 --- a/fast/stages/0-org-setup/datasets/classic/folders/security/.config.yaml +++ b/fast/stages/0-org-setup/datasets/classic/folders/security/.config.yaml @@ -41,4 +41,4 @@ iam_bindings: expression: | api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly([ 'roles/cloudkms.cryptoKeyEncrypterDecrypter' - ]) \ No newline at end of file + ]) diff --git a/fast/stages/0-org-setup/datasets/classic/organization/org-policies/compute.yaml b/fast/stages/0-org-setup/datasets/classic/organization/org-policies/compute.yaml index 24debd58f..af470445f 100644 --- a/fast/stages/0-org-setup/datasets/classic/organization/org-policies/compute.yaml +++ b/fast/stages/0-org-setup/datasets/classic/organization/org-policies/compute.yaml @@ -20,7 +20,7 @@ compute.disableGuestAttributesAccess: rules: - - enforce: true + - enforce: true compute.disableInternetNetworkEndpointGroup: rules: @@ -40,17 +40,17 @@ compute.disableVpcExternalIpv6: compute.requireOsLogin: rules: - - enforce: true + - enforce: true compute.restrictLoadBalancerCreationForTypes: rules: - - allow: - values: - - in:INTERNAL + - allow: + values: + - in:INTERNAL compute.skipDefaultNetworkCreation: rules: - - enforce: true + - enforce: true compute.setNewProjectDefaultToZonalDNSOnly: rules: @@ -61,35 +61,35 @@ compute.trustedImageProjects: rules: - allow: values: - - "is:projects/centos-cloud" - - "is:projects/cos-cloud" - - "is:projects/debian-cloud" - - "is:projects/fedora-cloud" - - "is:projects/fedora-coreos-cloud" - - "is:projects/opensuse-cloud" - - "is:projects/rhel-cloud" - - "is:projects/rhel-sap-cloud" - - "is:projects/rocky-linux-cloud" - - "is:projects/suse-cloud" - - "is:projects/suse-sap-cloud" - - "is:projects/ubuntu-os-cloud" - - "is:projects/ubuntu-os-pro-cloud" - - "is:projects/windows-cloud" - - "is:projects/windows-sql-cloud" - - "is:projects/confidential-vm-images" - - "is:projects/confidential-space-images" - - "is:projects/backupdr-images" - - "is:projects/deeplearning-platform-release" - - "is:projects/serverless-vpc-access-images" - - "is:projects/gke-node-images" - - "is:projects/gke-windows-node-images" - - "is:projects/ubuntu-os-gke-cloud" + - "is:projects/centos-cloud" + - "is:projects/cos-cloud" + - "is:projects/debian-cloud" + - "is:projects/fedora-cloud" + - "is:projects/fedora-coreos-cloud" + - "is:projects/opensuse-cloud" + - "is:projects/rhel-cloud" + - "is:projects/rhel-sap-cloud" + - "is:projects/rocky-linux-cloud" + - "is:projects/suse-cloud" + - "is:projects/suse-sap-cloud" + - "is:projects/ubuntu-os-cloud" + - "is:projects/ubuntu-os-pro-cloud" + - "is:projects/windows-cloud" + - "is:projects/windows-sql-cloud" + - "is:projects/confidential-vm-images" + - "is:projects/confidential-space-images" + - "is:projects/backupdr-images" + - "is:projects/deeplearning-platform-release" + - "is:projects/serverless-vpc-access-images" + - "is:projects/gke-node-images" + - "is:projects/gke-windows-node-images" + - "is:projects/ubuntu-os-gke-cloud" compute.vmExternalIpAccess: rules: - - deny: - all: true + - deny: + all: true # compute.disableInternetNetworkEndpointGroup: # rules: @@ -112,9 +112,9 @@ compute.vmExternalIpAccess: compute.restrictProtocolForwardingCreationForTypes: rules: - - allow: - values: - - is:INTERNAL + - allow: + values: + - is:INTERNAL # compute.restrictSharedVpcHostProjects: # rules: diff --git a/fast/stages/2-networking-legacy-a-simple/data/subnets/dev/dev-dataplatform.yaml b/fast/stages/2-networking-legacy-a-simple/data/subnets/dev/dev-dataplatform.yaml index 13508658e..76ace5082 100644 --- a/fast/stages/2-networking-legacy-a-simple/data/subnets/dev/dev-dataplatform.yaml +++ b/fast/stages/2-networking-legacy-a-simple/data/subnets/dev/dev-dataplatform.yaml @@ -7,7 +7,7 @@ region: $regions:primary description: Default subnet for dev Data Platform ip_cidr_range: 10.68.2.0/24 secondary_ip_ranges: - pods: + pods: ip_cidr_range: 100.69.0.0/16 services: ip_cidr_range: 100.71.2.0/24 diff --git a/fast/stages/2-project-factory/data/defaults.yaml b/fast/stages/2-project-factory/data/defaults.yaml index 9a77eb222..668d8bec4 100644 --- a/fast/stages/2-project-factory/data/defaults.yaml +++ b/fast/stages/2-project-factory/data/defaults.yaml @@ -33,4 +33,4 @@ context: # iam_principals: # foo: group:foo@example.com locations: - primary: europe-west1 \ No newline at end of file + primary: europe-west1 diff --git a/fast/stages/2-project-factory/data/folders/team-a/prod/.config.yaml b/fast/stages/2-project-factory/data/folders/team-a/prod/.config.yaml index 09a87c7c8..4b0b318d4 100644 --- a/fast/stages/2-project-factory/data/folders/team-a/prod/.config.yaml +++ b/fast/stages/2-project-factory/data/folders/team-a/prod/.config.yaml @@ -16,4 +16,4 @@ name: Production tag_bindings: - environment: $tag_values:environment/production \ No newline at end of file + environment: $tag_values:environment/production diff --git a/fast/stages/2-project-factory/data/projects/prod-app-a-0.yaml b/fast/stages/2-project-factory/data/projects/prod-app-a-0.yaml index 45b1ee8c3..50df7cc98 100644 --- a/fast/stages/2-project-factory/data/projects/prod-app-a-0.yaml +++ b/fast/stages/2-project-factory/data/projects/prod-app-a-0.yaml @@ -18,4 +18,4 @@ parent: $folder_ids:team-a/prod shared_vpc_service_config: host_project: $project_ids:prod-spoke-0 # network_users: - # - group:team-a-admins@example.com \ No newline at end of file + # - group:team-a-admins@example.com diff --git a/fast/stages/2-security/data/certificate-authorities/prod-ca-0.yaml b/fast/stages/2-security/data/certificate-authorities/prod-ca-0.yaml index b30b6b6dd..724bd8f13 100644 --- a/fast/stages/2-security/data/certificate-authorities/prod-ca-0.yaml +++ b/fast/stages/2-security/data/certificate-authorities/prod-ca-0.yaml @@ -20,5 +20,3 @@ ca_pool_config: create_pool: {} ca_configs: prod-ca-0-0: {} - - diff --git a/fast/stages/2-security/data/defaults.yaml b/fast/stages/2-security/data/defaults.yaml index 30ba51145..30b8926bc 100644 --- a/fast/stages/2-security/data/defaults.yaml +++ b/fast/stages/2-security/data/defaults.yaml @@ -22,4 +22,4 @@ context: projects: defaults: locations: - storage: $locations:storage-default \ No newline at end of file + storage: $locations:storage-default diff --git a/fast/stages/2-security/data/folders/prod/.config.yaml b/fast/stages/2-security/data/folders/prod/.config.yaml index 5c09cdc93..3dc1b6a76 100644 --- a/fast/stages/2-security/data/folders/prod/.config.yaml +++ b/fast/stages/2-security/data/folders/prod/.config.yaml @@ -17,4 +17,4 @@ name: Production parent: $folder_ids:security tag_bindings: - environment: $tag_values:environment/production \ No newline at end of file + environment: $tag_values:environment/production diff --git a/fast/stages/3-secops-dev/data/secops_reference_lists.yaml b/fast/stages/3-secops-dev/data/secops_reference_lists.yaml index c59ec64bb..9885b215f 100644 --- a/fast/stages/3-secops-dev/data/secops_reference_lists.yaml +++ b/fast/stages/3-secops-dev/data/secops_reference_lists.yaml @@ -14,4 +14,4 @@ private_ip_addresses: description: "Private CIDR ranges" - type: CIDR # either CIDR, STRING, REGEX + type: CIDR # either CIDR, STRING, REGEX diff --git a/fast/stages/3-secops-dev/data/secops_rules.yaml b/fast/stages/3-secops-dev/data/secops_rules.yaml index 4afc35633..531a92bc5 100644 --- a/fast/stages/3-secops-dev/data/secops_rules.yaml +++ b/fast/stages/3-secops-dev/data/secops_rules.yaml @@ -1,4 +1,3 @@ - # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,4 +16,4 @@ network_traffic_to_specific_country: enabled: true alerting: true archived: false - run_frequency: "LIVE" \ No newline at end of file + run_frequency: "LIVE" diff --git a/modules/api-gateway/recipe-multi-region/spec.yaml b/modules/api-gateway/recipe-multi-region/spec.yaml index 2bae7f239..9c7221518 100644 --- a/modules/api-gateway/recipe-multi-region/spec.yaml +++ b/modules/api-gateway/recipe-multi-region/spec.yaml @@ -32,4 +32,4 @@ paths: '200': description: A successful response schema: - type: string \ No newline at end of file + type: string diff --git a/modules/cloud-config-container/envoy-traffic-director/files/envoy.yaml b/modules/cloud-config-container/envoy-traffic-director/files/envoy.yaml index 981837c5c..3e1c84920 100644 --- a/modules/cloud-config-container/envoy-traffic-director/files/envoy.yaml +++ b/modules/cloud-config-container/envoy-traffic-director/files/envoy.yaml @@ -15,7 +15,7 @@ node: # The id must be in the following format: projects//networks//nodes/ id: "projects/CONFIG_PROJECT_NUMBER/networks/VPC_NETWORK_NAME/nodes/ENVOY_NODE_ID" - cluster: cluster # unused + cluster: cluster # unused locality: zone: "ENVOY_ZONE" metadata: @@ -80,7 +80,7 @@ admin: access_log_path: /dev/stdout address: socket_address: - address: 127.0.0.1 # Admin page is only accessible locally. + address: 127.0.0.1 # Admin page is only accessible locally. port_value: 15000 tracing: diff --git a/modules/project-factory/sample-data-1/folders/applications/.config.yaml b/modules/project-factory/sample-data-1/folders/applications/.config.yaml index 47113b9ca..4691e54a4 100644 --- a/modules/project-factory/sample-data-1/folders/applications/.config.yaml +++ b/modules/project-factory/sample-data-1/folders/applications/.config.yaml @@ -20,4 +20,4 @@ iam_by_principals: "$iam_principals:devops": - roles/owner - roles/resourcemanager.folderAdmin - - roles/resourcemanager.projectCreator \ No newline at end of file + - roles/resourcemanager.projectCreator diff --git a/modules/project-factory/sample-data-1/projects/app-0/dev-app0-be-0.yaml b/modules/project-factory/sample-data-1/projects/app-0/dev-app0-be-0.yaml index b566b9a77..600fd5190 100644 --- a/modules/project-factory/sample-data-1/projects/app-0/dev-app0-be-0.yaml +++ b/modules/project-factory/sample-data-1/projects/app-0/dev-app0-be-0.yaml @@ -46,4 +46,4 @@ automation: rw: iam_sa_roles: $service_account_ids:dev-app0-be-0/automation/ro: - - roles.iam.serviceAccountTokenCreator \ No newline at end of file + - roles.iam.serviceAccountTokenCreator diff --git a/modules/project/sharedvpc-agent-iam.yaml b/modules/project/sharedvpc-agent-iam.yaml index 096c6ff85..cb91e81ae 100644 --- a/modules/project/sharedvpc-agent-iam.yaml +++ b/modules/project/sharedvpc-agent-iam.yaml @@ -34,7 +34,7 @@ container: - roles/compute.networkUser - roles/container.hostServiceAgentUser - - roles/compute.securityAdmin # to manage firewall rules + - roles/compute.securityAdmin # to manage firewall rules cloudservices: - roles/compute.networkUser diff --git a/modules/vpc-sc/perimeters.tf b/modules/vpc-sc/perimeters.tf index 601efb329..c3358cb7a 100644 --- a/modules/vpc-sc/perimeters.tf +++ b/modules/vpc-sc/perimeters.tf @@ -74,8 +74,8 @@ resource "google_access_context_manager_service_perimeter" "regular" { for_each = policy.value.from == null ? [] : [""] content { identity_type = policy.value.from.identity_type - identities = flatten([ - for i in policy.value.from.identities : ( + identities = policy.value.from.identities == null ? null : flatten([ + for i in coalesce(policy.value.from.identities, []) : ( startswith(i, "$identity_sets:") ? lookup(local.ctx.identity_sets, i, [i]) : lookup(local.ctx.iam_principals_list, i, [i]) @@ -159,8 +159,8 @@ resource "google_access_context_manager_service_perimeter" "regular" { for_each = policy.value.from == null ? [] : [""] content { identity_type = policy.value.from.identity_type - identities = flatten([ - for i in policy.value.from.identities : ( + identities = policy.value.from.identities == null ? null : flatten([ + for i in coalesce(policy.value.from.identities, []) : ( startswith(i, "$identity_sets:") ? lookup(local.ctx.identity_sets, i, [i]) : lookup(local.ctx.iam_principals_list, i, [i]) @@ -271,8 +271,8 @@ resource "google_access_context_manager_service_perimeter" "regular" { for_each = policy.value.from == null ? [] : [""] content { identity_type = policy.value.from.identity_type - identities = flatten([ - for i in policy.value.from.identities : ( + identities = policy.value.from.identities == null ? null : flatten([ + for i in coalesce(policy.value.from.identities, []) : ( startswith(i, "$identity_sets:") ? lookup(local.ctx.identity_sets, i, [i]) : lookup(local.ctx.iam_principals_list, i, [i]) @@ -356,8 +356,8 @@ resource "google_access_context_manager_service_perimeter" "regular" { for_each = policy.value.from == null ? [] : [""] content { identity_type = policy.value.from.identity_type - identities = flatten([ - for i in policy.value.from.identities : ( + identities = policy.value.from.identities == null ? null : flatten([ + for i in coalesce(policy.value.from.identities, []) : ( startswith(i, "$identity_sets:") ? lookup(local.ctx.identity_sets, i, [i]) : lookup(local.ctx.iam_principals_list, i, [i]) diff --git a/tests/fast/stages/s0_org_setup/not-simple.yaml b/tests/fast/stages/s0_org_setup/not-simple.yaml index 7f2fe7b2f..2e1a7a375 100644 --- a/tests/fast/stages/s0_org_setup/not-simple.yaml +++ b/tests/fast/stages/s0_org_setup/not-simple.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: google_iam_workload_identity_pool.default[0]: description: null diff --git a/tests/fast/stages/s1_vpcsc/data/vpc-sc/access-levels/identity_me.yaml b/tests/fast/stages/s1_vpcsc/data/vpc-sc/access-levels/identity_me.yaml index 6b18e4841..69a3ccd04 100644 --- a/tests/fast/stages/s1_vpcsc/data/vpc-sc/access-levels/identity_me.yaml +++ b/tests/fast/stages/s1_vpcsc/data/vpc-sc/access-levels/identity_me.yaml @@ -14,6 +14,7 @@ # yaml-language-server: $schema=../../../../../../../modules/vpc-sc/schemas/access-level.schema.json +# yamllint disable rule:indentation conditions: - members: - user:user@fast.example.com diff --git a/tests/fast/stages/s2_security/data-simple/certificate-authorities/prod-ca-0.yaml b/tests/fast/stages/s2_security/data-simple/certificate-authorities/prod-ca-0.yaml index b30b6b6dd..724bd8f13 100644 --- a/tests/fast/stages/s2_security/data-simple/certificate-authorities/prod-ca-0.yaml +++ b/tests/fast/stages/s2_security/data-simple/certificate-authorities/prod-ca-0.yaml @@ -20,5 +20,3 @@ ca_pool_config: create_pool: {} ca_configs: prod-ca-0-0: {} - - diff --git a/tests/fast/stages/s2_security/not-simple.yaml b/tests/fast/stages/s2_security/not-simple.yaml index 7c8868a35..a9292d6e2 100644 --- a/tests/fast/stages/s2_security/not-simple.yaml +++ b/tests/fast/stages/s2_security/not-simple.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: google_storage_bucket_object.version[0]: bucket: test diff --git a/tests/fast/stages/s3_secops_dev/simple.yaml b/tests/fast/stages/s3_secops_dev/simple.yaml index 7a1da6298..066ba34eb 100644 --- a/tests/fast/stages/s3_secops_dev/simple.yaml +++ b/tests/fast/stages/s3_secops_dev/simple.yaml @@ -35,4 +35,4 @@ counts: restful_resource: 6 outputs: - project_id: fast-dev-secops-0 \ No newline at end of file + project_id: fast-dev-secops-0 diff --git a/tests/fixtures.py b/tests/fixtures.py index 493725408..ec01959f2 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -281,7 +281,13 @@ def validate_plan_object(expected_value, plan_value, relative_path, # all other objects else: - assert plan_value == expected_value, \ + if isinstance(plan_value, str) and isinstance(expected_value, str): + # plan_value may contain newline at the end which is hard to replicate in + # expected_value YAML + is_ok = plan_value.strip() == expected_value.strip() + else: + is_ok = plan_value == expected_value + assert is_ok, \ f'{relative_path}: {relative_address} failed. Got `{plan_value}`, expected `{expected_value}`' diff --git a/tests/modules/alloydb/examples/psc.yaml b/tests/modules/alloydb/examples/psc.yaml index 3edf96808..988323e04 100644 --- a/tests/modules/alloydb/examples/psc.yaml +++ b/tests/modules/alloydb/examples/psc.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:indentation values: module.alloydb.google_alloydb_cluster.primary: annotations: null diff --git a/tests/modules/analytics_hub/examples/iam_exchange.yaml b/tests/modules/analytics_hub/examples/iam_exchange.yaml index 4ba691200..4c5672736 100644 --- a/tests/modules/analytics_hub/examples/iam_exchange.yaml +++ b/tests/modules/analytics_hub/examples/iam_exchange.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.analytics-hub.google_bigquery_analytics_hub_data_exchange.data_exchange: data_exchange_id: exchange diff --git a/tests/modules/analytics_hub/examples/iam_listing.yaml b/tests/modules/analytics_hub/examples/iam_listing.yaml index 604cb9bb0..7cd5bb82c 100644 --- a/tests/modules/analytics_hub/examples/iam_listing.yaml +++ b/tests/modules/analytics_hub/examples/iam_listing.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.analytics-hub.google_bigquery_analytics_hub_data_exchange.data_exchange: data_exchange_id: exchange @@ -74,4 +75,4 @@ counts: modules: 1 resources: 5 -outputs: {} \ No newline at end of file +outputs: {} diff --git a/tests/modules/apigee/all_psc_mode.yaml b/tests/modules/apigee/all_psc_mode.yaml index e70282138..9ac18b69e 100644 --- a/tests/modules/apigee/all_psc_mode.yaml +++ b/tests/modules/apigee/all_psc_mode.yaml @@ -79,4 +79,4 @@ counts: google_apigee_environment_iam_binding: 1 google_apigee_instance: 2 google_apigee_instance_attachment: 2 - google_apigee_organization: 1 \ No newline at end of file + google_apigee_organization: 1 diff --git a/tests/modules/apigee/all_vpc_mode.yaml b/tests/modules/apigee/all_vpc_mode.yaml index b5ebdec1b..415c809e9 100644 --- a/tests/modules/apigee/all_vpc_mode.yaml +++ b/tests/modules/apigee/all_vpc_mode.yaml @@ -82,4 +82,4 @@ counts: google_apigee_environment_iam_binding: 1 google_apigee_instance: 2 google_apigee_instance_attachment: 2 - google_apigee_organization: 1 \ No newline at end of file + google_apigee_organization: 1 diff --git a/tests/modules/apigee/instance_only_psc_mode.yaml b/tests/modules/apigee/instance_only_psc_mode.yaml index 4583d7b49..95ddaa0cb 100644 --- a/tests/modules/apigee/instance_only_psc_mode.yaml +++ b/tests/modules/apigee/instance_only_psc_mode.yaml @@ -32,4 +32,4 @@ values: counts: google_apigee_instance: 1 - google_apigee_organization: 1 \ No newline at end of file + google_apigee_organization: 1 diff --git a/tests/modules/apigee/instance_only_vpc_mode.yaml b/tests/modules/apigee/instance_only_vpc_mode.yaml index cf5e78414..a3aa5b154 100644 --- a/tests/modules/apigee/instance_only_vpc_mode.yaml +++ b/tests/modules/apigee/instance_only_vpc_mode.yaml @@ -23,4 +23,4 @@ values: org_id: organizations/my-project counts: - google_apigee_instance: 1 \ No newline at end of file + google_apigee_instance: 1 diff --git a/tests/modules/apigee/test_apigee_nat_activate.yaml b/tests/modules/apigee/test_apigee_nat_activate.yaml index 3bf65d5b7..36c9cfd27 100644 --- a/tests/modules/apigee/test_apigee_nat_activate.yaml +++ b/tests/modules/apigee/test_apigee_nat_activate.yaml @@ -42,4 +42,4 @@ counts: google_apigee_instance: 1 google_apigee_instance_attachment: 1 google_apigee_organization: 1 - google_apigee_nat_address: 1 \ No newline at end of file + google_apigee_nat_address: 1 diff --git a/tests/modules/biglake_catalog/examples/basic.yaml b/tests/modules/biglake_catalog/examples/basic.yaml index 3a175ff70..c475f36b4 100644 --- a/tests/modules/biglake_catalog/examples/basic.yaml +++ b/tests/modules/biglake_catalog/examples/basic.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.biglake_catalog.google_biglake_catalog.catalog: location: US @@ -51,4 +52,4 @@ counts: google_biglake_database: 1 google_biglake_table: 1 modules: 1 - resources: 3 \ No newline at end of file + resources: 3 diff --git a/tests/modules/bigquery_connection/examples/cloudsql.yaml b/tests/modules/bigquery_connection/examples/cloudsql.yaml index ee5ce51f6..7ec20733e 100644 --- a/tests/modules/bigquery_connection/examples/cloudsql.yaml +++ b/tests/modules/bigquery_connection/examples/cloudsql.yaml @@ -44,4 +44,4 @@ values: counts: google_bigquery_connection: 1 - google_bigquery_connection_iam_binding: 1 \ No newline at end of file + google_bigquery_connection_iam_binding: 1 diff --git a/tests/modules/bigquery_connection/examples/spanner.yaml b/tests/modules/bigquery_connection/examples/spanner.yaml index 0ebccff56..924ffc830 100644 --- a/tests/modules/bigquery_connection/examples/spanner.yaml +++ b/tests/modules/bigquery_connection/examples/spanner.yaml @@ -44,4 +44,4 @@ values: counts: google_bigquery_connection: 1 - google_bigquery_connection_iam_binding: 1 \ No newline at end of file + google_bigquery_connection_iam_binding: 1 diff --git a/tests/modules/bigquery_connection/examples/spanner_context.yaml b/tests/modules/bigquery_connection/examples/spanner_context.yaml index 0ebccff56..924ffc830 100644 --- a/tests/modules/bigquery_connection/examples/spanner_context.yaml +++ b/tests/modules/bigquery_connection/examples/spanner_context.yaml @@ -44,4 +44,4 @@ values: counts: google_bigquery_connection: 1 - google_bigquery_connection_iam_binding: 1 \ No newline at end of file + google_bigquery_connection_iam_binding: 1 diff --git a/tests/modules/certificate_manager/examples/map-with-managed-cert-lb-authz.yaml b/tests/modules/certificate_manager/examples/map-with-managed-cert-lb-authz.yaml index f153637aa..bbae0d59f 100644 --- a/tests/modules/certificate_manager/examples/map-with-managed-cert-lb-authz.yaml +++ b/tests/modules/certificate_manager/examples/map-with-managed-cert-lb-authz.yaml @@ -48,4 +48,4 @@ counts: google_certificate_manager_certificate_map: 1 google_certificate_manager_certificate_map_entry: 1 modules: 1 - resources: 3 \ No newline at end of file + resources: 3 diff --git a/tests/modules/certificate_manager/examples/map-with-self-managed-cert.yaml b/tests/modules/certificate_manager/examples/map-with-self-managed-cert.yaml index 804cbaf09..a8d020ce5 100644 --- a/tests/modules/certificate_manager/examples/map-with-self-managed-cert.yaml +++ b/tests/modules/certificate_manager/examples/map-with-self-managed-cert.yaml @@ -76,4 +76,4 @@ counts: modules: 1 resources: 5 tls_private_key: 1 - tls_self_signed_cert: 1 \ No newline at end of file + tls_self_signed_cert: 1 diff --git a/tests/modules/certificate_manager/examples/self-managed-cert.yaml b/tests/modules/certificate_manager/examples/self-managed-cert.yaml index a80aac794..16f8e5029 100644 --- a/tests/modules/certificate_manager/examples/self-managed-cert.yaml +++ b/tests/modules/certificate_manager/examples/self-managed-cert.yaml @@ -59,4 +59,4 @@ counts: modules: 1 resources: 3 tls_private_key: 1 - tls_self_signed_cert: 1 \ No newline at end of file + tls_self_signed_cert: 1 diff --git a/tests/modules/cloud_build_v2_connection/examples/bitbucket-cloud.yaml b/tests/modules/cloud_build_v2_connection/examples/bitbucket-cloud.yaml index 7d6e3895c..995459840 100644 --- a/tests/modules/cloud_build_v2_connection/examples/bitbucket-cloud.yaml +++ b/tests/modules/cloud_build_v2_connection/examples/bitbucket-cloud.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.cb_connection.google_cloudbuild_trigger.triggers["my-repository-my-trigger"]: bitbucket_server_trigger_config: [] @@ -243,4 +244,4 @@ counts: google_secret_manager_secret_version: 3 google_service_account: 1 modules: 4 - resources: 21 \ No newline at end of file + resources: 21 diff --git a/tests/modules/cloud_build_v2_connection/examples/bitbucket-data-center.yaml b/tests/modules/cloud_build_v2_connection/examples/bitbucket-data-center.yaml index 7d2978cf6..90bb58a71 100644 --- a/tests/modules/cloud_build_v2_connection/examples/bitbucket-data-center.yaml +++ b/tests/modules/cloud_build_v2_connection/examples/bitbucket-data-center.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.cb_connection.google_cloudbuild_trigger.triggers["my-repository-my-trigger"]: bitbucket_server_trigger_config: [] @@ -245,4 +246,4 @@ counts: google_secret_manager_secret_version: 3 google_service_account: 1 modules: 4 - resources: 21 \ No newline at end of file + resources: 21 diff --git a/tests/modules/cloud_function_v1/examples/bucket-creation.yaml b/tests/modules/cloud_function_v1/examples/bucket-creation.yaml index 8d8b8bda2..5dd4dae5e 100644 --- a/tests/modules/cloud_function_v1/examples/bucket-creation.yaml +++ b/tests/modules/cloud_function_v1/examples/bucket-creation.yaml @@ -1,35 +1,35 @@ -# 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.cf-http.google_cloudfunctions_function.function: - name: test-test-cf-http - project: project-id - source_archive_bucket: test-bucket - - module.cf-http.google_storage_bucket.bucket[0]: - lifecycle_rule: - - action: - - type: Delete - condition: - - age: 1 - name: test-bucket - -counts: - archive_file: 1 - google_cloudfunctions_function: 1 - google_storage_bucket: 1 - google_storage_bucket_object: 1 - -outputs: {} +# Copyright 2025 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.cf-http.google_cloudfunctions_function.function: + name: test-test-cf-http + project: project-id + source_archive_bucket: test-bucket + + module.cf-http.google_storage_bucket.bucket[0]: + lifecycle_rule: + - action: + - type: Delete + condition: + - age: 1 + name: test-bucket + +counts: + archive_file: 1 + google_cloudfunctions_function: 1 + google_storage_bucket: 1 + google_storage_bucket_object: 1 + +outputs: {} diff --git a/tests/modules/cloud_function_v1/examples/cmek.yaml b/tests/modules/cloud_function_v1/examples/cmek.yaml index cc697041e..ed357a0ef 100644 --- a/tests/modules/cloud_function_v1/examples/cmek.yaml +++ b/tests/modules/cloud_function_v1/examples/cmek.yaml @@ -36,10 +36,10 @@ values: vulnerability_scanning_config: - enablement_config: null module.artifact-registry.google_artifact_registry_repository_iam_binding.authoritative["roles/artifactregistry.createOnPushWriter"]: - condition: [] - location: europe-west9 - project: test-cf-v1 - role: roles/artifactregistry.createOnPushWriter + condition: [] + location: europe-west9 + project: test-cf-v1 + role: roles/artifactregistry.createOnPushWriter module.kms.google_kms_crypto_key.default["key-regional"]: effective_labels: goog-terraform-provisioned: 'true' diff --git a/tests/modules/cloud_function_v1/examples/secrets.yaml b/tests/modules/cloud_function_v1/examples/secrets.yaml index 01cfaa646..422d98e73 100644 --- a/tests/modules/cloud_function_v1/examples/secrets.yaml +++ b/tests/modules/cloud_function_v1/examples/secrets.yaml @@ -16,12 +16,12 @@ values: module.cf-http.google_cloudfunctions_function.function: secret_environment_variables: - key: VARIABLE_SECRET - project_id: "123" # actually, project number + project_id: "123" # actually, project number # secret: var_secret # known after apply version: latest secret_volumes: - mount_path: /app/secret - project_id: "123" # actually, project number + project_id: "123" # actually, project number # secret: path_secret # known after apply versions: - {} diff --git a/tests/modules/cloud_function_v2/examples/bucket-creation.yaml b/tests/modules/cloud_function_v2/examples/bucket-creation.yaml index e92953ea5..c573b1b2b 100644 --- a/tests/modules/cloud_function_v2/examples/bucket-creation.yaml +++ b/tests/modules/cloud_function_v2/examples/bucket-creation.yaml @@ -1,40 +1,39 @@ -# 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.cf-http.google_cloudfunctions2_function.function: - build_config: - - source: - - storage_source: - - bucket: test-bucket - name: test-test-cf-http - project: project-id - module.cf-http.google_storage_bucket.bucket[0]: - lifecycle_rule: - - action: - - type: Delete - condition: - - age: 1 - name: test-bucket - project: project-id - versioning: - - enabled: true - -counts: - google_cloudfunctions2_function: 1 - google_storage_bucket: 1 - google_storage_bucket_object: 1 - - -outputs: {} +# Copyright 2025 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.cf-http.google_cloudfunctions2_function.function: + build_config: + - source: + - storage_source: + - bucket: test-bucket + name: test-test-cf-http + project: project-id + module.cf-http.google_storage_bucket.bucket[0]: + lifecycle_rule: + - action: + - type: Delete + condition: + - age: 1 + name: test-bucket + project: project-id + versioning: + - enabled: true + +counts: + google_cloudfunctions2_function: 1 + google_storage_bucket: 1 + google_storage_bucket_object: 1 + +outputs: {} diff --git a/tests/modules/cloud_function_v2/examples/secrets.yaml b/tests/modules/cloud_function_v2/examples/secrets.yaml index 04bf0be8f..c655c759b 100644 --- a/tests/modules/cloud_function_v2/examples/secrets.yaml +++ b/tests/modules/cloud_function_v2/examples/secrets.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:indentation values: module.cf-http.google_cloudfunctions2_function.function: name: test-cf-http @@ -46,9 +47,9 @@ values: labels: null project: project-id replication: - - auto: - - customer_managed_encryption: [] - user_managed: [] + - auto: + - customer_managed_encryption: [] + user_managed: [] rotation: [] secret_id: credentials tags: null diff --git a/tests/modules/cloud_run/examples/secrets.yaml b/tests/modules/cloud_run/examples/secrets.yaml index 1907ca728..3c80a9c7b 100644 --- a/tests/modules/cloud_run/examples/secrets.yaml +++ b/tests/modules/cloud_run/examples/secrets.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.cloud_run.google_cloud_run_service.service: autogenerate_revision_name: false diff --git a/tests/modules/cloud_run/examples/simple.yaml b/tests/modules/cloud_run/examples/simple.yaml index 9b96e4aba..bcf2e1f9d 100644 --- a/tests/modules/cloud_run/examples/simple.yaml +++ b/tests/modules/cloud_run/examples/simple.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.cloud_run.google_cloud_run_service.service: autogenerate_revision_name: false diff --git a/tests/modules/cloud_run_v2/examples/service-iam-env.yaml b/tests/modules/cloud_run_v2/examples/service-iam-env.yaml index 09cc44d54..09c9a2c0a 100644 --- a/tests/modules/cloud_run_v2/examples/service-iam-env.yaml +++ b/tests/modules/cloud_run_v2/examples/service-iam-env.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.cloud_run.google_cloud_run_v2_service.service[0]: annotations: null diff --git a/tests/modules/compute_mig/examples/autoscaling.yaml b/tests/modules/compute_mig/examples/autoscaling.yaml index 45f1fc3e1..953892855 100644 --- a/tests/modules/compute_mig/examples/autoscaling.yaml +++ b/tests/modules/compute_mig/examples/autoscaling.yaml @@ -59,4 +59,3 @@ counts: google_compute_instance_template: 1 modules: 2 resources: 3 - diff --git a/tests/modules/compute_mig/examples/flexible.yaml b/tests/modules/compute_mig/examples/flexible.yaml index 1430fa090..4c8c85e69 100644 --- a/tests/modules/compute_mig/examples/flexible.yaml +++ b/tests/modules/compute_mig/examples/flexible.yaml @@ -152,4 +152,4 @@ counts: google_compute_instance_template: 1 google_compute_region_instance_group_manager: 1 modules: 2 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/compute_mig/examples/mig-config.yaml b/tests/modules/compute_mig/examples/mig-config.yaml index 74f46cc4a..6e8df8423 100644 --- a/tests/modules/compute_mig/examples/mig-config.yaml +++ b/tests/modules/compute_mig/examples/mig-config.yaml @@ -36,12 +36,10 @@ values: wait_for_instances: false wait_for_instances_status: STABLE zone: europe-west8-b - + counts: google_compute_disk: 1 google_compute_instance_group_manager: 1 google_compute_instance_template: 1 modules: 2 resources: 3 - - diff --git a/tests/modules/compute_vm/examples/disks-example-template.yaml b/tests/modules/compute_vm/examples/disks-example-template.yaml index 84eb4b04f..f3ad61094 100644 --- a/tests/modules/compute_vm/examples/disks-example-template.yaml +++ b/tests/modules/compute_vm/examples/disks-example-template.yaml @@ -114,4 +114,4 @@ values: counts: google_compute_instance_template: 1 google_service_account: 1 -outputs: {} \ No newline at end of file +outputs: {} diff --git a/tests/modules/dataplex_datascan/datascan_test_inputs.yaml b/tests/modules/dataplex_datascan/datascan_test_inputs.yaml index b749b26d0..014a14305 100644 --- a/tests/modules/dataplex_datascan/datascan_test_inputs.yaml +++ b/tests/modules/dataplex_datascan/datascan_test_inputs.yaml @@ -11,6 +11,8 @@ # 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. + +# yamllint disable rule:line-length values: google_dataplex_datascan.datascan: data: diff --git a/tests/modules/dataplex_datascan/examples/datascan_cron.yaml b/tests/modules/dataplex_datascan/examples/datascan_cron.yaml index 37e8f1324..3215fdd0b 100644 --- a/tests/modules/dataplex_datascan/examples/datascan_cron.yaml +++ b/tests/modules/dataplex_datascan/examples/datascan_cron.yaml @@ -11,6 +11,8 @@ # 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. + +# yamllint disable rule:line-length values: module.dataplex-datascan.google_dataplex_datascan.datascan: data: diff --git a/tests/modules/dataplex_datascan/examples/datascan_dq.yaml b/tests/modules/dataplex_datascan/examples/datascan_dq.yaml index c6255479d..73898d481 100644 --- a/tests/modules/dataplex_datascan/examples/datascan_dq.yaml +++ b/tests/modules/dataplex_datascan/examples/datascan_dq.yaml @@ -11,6 +11,8 @@ # 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. + +# yamllint disable rule:line-length values: module.dataplex-datascan.google_dataplex_datascan.datascan: data: @@ -65,8 +67,8 @@ values: range_expectation: - max_value: '9' min_value: '3' - strict_max_enabled: False - strict_min_enabled: False + strict_max_enabled: false + strict_min_enabled: false regex_expectation: [] row_condition_expectation: [] set_expectation: [] diff --git a/tests/modules/dataplex_datascan/examples/datascan_iam.yaml b/tests/modules/dataplex_datascan/examples/datascan_iam.yaml index 8d3246e62..1d70743b4 100644 --- a/tests/modules/dataplex_datascan/examples/datascan_iam.yaml +++ b/tests/modules/dataplex_datascan/examples/datascan_iam.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.dataplex-datascan.google_dataplex_datascan.datascan: data: diff --git a/tests/modules/dataplex_datascan/examples/datascan_profiling.yaml b/tests/modules/dataplex_datascan/examples/datascan_profiling.yaml index 1b8a89665..40bdc0c43 100644 --- a/tests/modules/dataplex_datascan/examples/datascan_profiling.yaml +++ b/tests/modules/dataplex_datascan/examples/datascan_profiling.yaml @@ -11,6 +11,8 @@ # 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. + +# yamllint disable rule:line-length values: module.dataplex-datascan.google_dataplex_datascan.datascan: data: diff --git a/tests/modules/dataplex_datascan/tftest.yaml b/tests/modules/dataplex_datascan/tftest.yaml index 1b91783b3..6aa40c55b 100644 --- a/tests/modules/dataplex_datascan/tftest.yaml +++ b/tests/modules/dataplex_datascan/tftest.yaml @@ -13,4 +13,4 @@ # limitations under the License. module: modules/dataplex-datascan tests: - datascan_test_inputs: \ No newline at end of file + datascan_test_inputs: diff --git a/tests/modules/dns/examples/routing-policies.yaml b/tests/modules/dns/examples/routing-policies.yaml index 7fd5b8bd5..ac51331d0 100644 --- a/tests/modules/dns/examples/routing-policies.yaml +++ b/tests/modules/dns/examples/routing-policies.yaml @@ -63,8 +63,8 @@ values: routing_policy: - enable_geo_fencing: null geo: - - location: europe-west8 - rrdatas: null + - location: europe-west8 + rrdatas: null primary_backup: [] wrr: [] rrdatas: null diff --git a/tests/modules/dns_response_policy/examples/complex.yaml b/tests/modules/dns_response_policy/examples/complex.yaml index f641c83f3..4b2bc1f48 100644 --- a/tests/modules/dns_response_policy/examples/complex.yaml +++ b/tests/modules/dns_response_policy/examples/complex.yaml @@ -71,4 +71,4 @@ counts: google_dns_response_policy: 1 google_dns_response_policy_rule: 4 modules: 2 - resources: 5 \ No newline at end of file + resources: 5 diff --git a/tests/modules/firestore/examples/existing-database-with-document.yaml b/tests/modules/firestore/examples/existing-database-with-document.yaml index 94876baa5..ace1da711 100644 --- a/tests/modules/firestore/examples/existing-database-with-document.yaml +++ b/tests/modules/firestore/examples/existing-database-with-document.yaml @@ -24,4 +24,4 @@ values: counts: google_firestore_document: 1 modules: 1 - resources: 1 \ No newline at end of file + resources: 1 diff --git a/tests/modules/firestore/examples/new-database-with-field.yaml b/tests/modules/firestore/examples/new-database-with-field.yaml index b065546be..94f96a306 100644 --- a/tests/modules/firestore/examples/new-database-with-field.yaml +++ b/tests/modules/firestore/examples/new-database-with-field.yaml @@ -42,4 +42,4 @@ counts: google_firestore_database: 1 google_firestore_field: 1 modules: 1 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/firestore/examples/new-database-with-index.yaml b/tests/modules/firestore/examples/new-database-with-index.yaml index 4c8f795ef..53f9f1f63 100644 --- a/tests/modules/firestore/examples/new-database-with-index.yaml +++ b/tests/modules/firestore/examples/new-database-with-index.yaml @@ -43,4 +43,4 @@ counts: google_firestore_database: 1 google_firestore_index: 1 modules: 1 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/firestore/examples/new-database-with-weekly-backup.yaml b/tests/modules/firestore/examples/new-database-with-weekly-backup.yaml index f79de5d2d..50a1a4ca9 100644 --- a/tests/modules/firestore/examples/new-database-with-weekly-backup.yaml +++ b/tests/modules/firestore/examples/new-database-with-weekly-backup.yaml @@ -35,4 +35,4 @@ counts: google_firestore_backup_schedule: 1 google_firestore_database: 1 modules: 1 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/firestore/examples/new-database.yaml b/tests/modules/firestore/examples/new-database.yaml index 7a226e14f..b54fac10c 100644 --- a/tests/modules/firestore/examples/new-database.yaml +++ b/tests/modules/firestore/examples/new-database.yaml @@ -28,4 +28,4 @@ counts: modules: 1 resources: 1 -outputs: {} \ No newline at end of file +outputs: {} diff --git a/tests/modules/folder/examples/logging.yaml b/tests/modules/folder/examples/logging.yaml index e48227619..4ce27c2e1 100644 --- a/tests/modules/folder/examples/logging.yaml +++ b/tests/modules/folder/examples/logging.yaml @@ -161,5 +161,3 @@ counts: google_storage_bucket_iam_member: 1 modules: 6 resources: 18 - - diff --git a/tests/modules/gcs/examples/iam-bindings-additive.yaml b/tests/modules/gcs/examples/iam-bindings-additive.yaml index bb0a284c3..96370db43 100644 --- a/tests/modules/gcs/examples/iam-bindings-additive.yaml +++ b/tests/modules/gcs/examples/iam-bindings-additive.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.bucket.google_storage_bucket.bucket[0]: cors: [] diff --git a/tests/modules/gcs/examples/iam-bindings.yaml b/tests/modules/gcs/examples/iam-bindings.yaml index 6fea6b837..354f4b560 100644 --- a/tests/modules/gcs/examples/iam-bindings.yaml +++ b/tests/modules/gcs/examples/iam-bindings.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.bucket.google_storage_bucket.bucket[0]: cors: [] diff --git a/tests/modules/gke_cluster_autopilot/examples/backup.yaml b/tests/modules/gke_cluster_autopilot/examples/backup.yaml index a7967c6f0..f400b08c3 100644 --- a/tests/modules/gke_cluster_autopilot/examples/backup.yaml +++ b/tests/modules/gke_cluster_autopilot/examples/backup.yaml @@ -32,7 +32,7 @@ values: project: project-id retention_policy: - locked: false - + counts: google_container_cluster: 1 google_gke_backup_backup_plan: 1 diff --git a/tests/modules/gke_cluster_standard/examples/backup.yaml b/tests/modules/gke_cluster_standard/examples/backup.yaml index 97259a3c6..7fc07445d 100644 --- a/tests/modules/gke_cluster_standard/examples/backup.yaml +++ b/tests/modules/gke_cluster_standard/examples/backup.yaml @@ -26,9 +26,9 @@ values: selected_applications: - namespaced_names: - namespace: namespace-1 - name: app-1 + name: app-1 - namespace: namespace-1 - name: app-2 + name: app-2 selected_namespaces: [] backup_schedule: - cron_schedule: 0 9 * * 1 @@ -37,7 +37,7 @@ values: project: project-id retention_policy: - locked: false - + counts: google_container_cluster: 1 google_gke_backup_backup_plan: 1 diff --git a/tests/modules/iam_service_account/examples/iam.yaml b/tests/modules/iam_service_account/examples/iam.yaml index cba5b9160..cbf6bb039 100644 --- a/tests/modules/iam_service_account/examples/iam.yaml +++ b/tests/modules/iam_service_account/examples/iam.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.service-account-with-tags.google_billing_account_iam_member.billing-roles["ABCDE-12345-ABCDE-roles/billing.user"]: billing_account_id: ABCDE-12345-ABCDE diff --git a/tests/modules/logging_bucket/examples/log_analytics.yaml b/tests/modules/logging_bucket/examples/log_analytics.yaml index d16873b42..bcd84c247 100644 --- a/tests/modules/logging_bucket/examples/log_analytics.yaml +++ b/tests/modules/logging_bucket/examples/log_analytics.yaml @@ -21,6 +21,6 @@ values: module.bucket.google_logging_linked_dataset.dataset[0]: link_id: log location: global - + counts: google_logging_project_bucket_config: 1 diff --git a/tests/modules/net_firewall_policy/examples/global-net.yaml b/tests/modules/net_firewall_policy/examples/global-net.yaml index 911871621..7fa7d6803 100644 --- a/tests/modules/net_firewall_policy/examples/global-net.yaml +++ b/tests/modules/net_firewall_policy/examples/global-net.yaml @@ -79,7 +79,7 @@ values: action: allow direction: INGRESS disabled: false - enable_logging: True + enable_logging: true firewall_policy: test-1 match: - dest_address_groups: null @@ -106,7 +106,7 @@ values: action: allow direction: INGRESS disabled: false - enable_logging: True + enable_logging: true firewall_policy: test-1 match: - dest_address_groups: null diff --git a/tests/modules/net_firewall_policy/examples/hierarchical.yaml b/tests/modules/net_firewall_policy/examples/hierarchical.yaml index b1a8759a2..3953657c8 100644 --- a/tests/modules/net_firewall_policy/examples/hierarchical.yaml +++ b/tests/modules/net_firewall_policy/examples/hierarchical.yaml @@ -74,7 +74,7 @@ values: description: null direction: INGRESS disabled: false - enable_logging: True + enable_logging: true match: - dest_address_groups: null dest_fqdns: null @@ -98,7 +98,7 @@ values: description: null direction: INGRESS disabled: false - enable_logging: True + enable_logging: true match: - dest_address_groups: null dest_fqdns: null diff --git a/tests/modules/net_lb_app_ext/test-plan-llp.yaml b/tests/modules/net_lb_app_ext/test-plan-llp.yaml index c565db59c..c707debee 100644 --- a/tests/modules/net_lb_app_ext/test-plan-llp.yaml +++ b/tests/modules/net_lb_app_ext/test-plan-llp.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:comments #counts: # google_compute_backend_bucket: 1 # google_compute_backend_service: 5 diff --git a/tests/modules/net_lb_ext/examples/dual_stack.yaml b/tests/modules/net_lb_ext/examples/dual_stack.yaml index dfa277412..a465918f0 100644 --- a/tests/modules/net_lb_ext/examples/dual_stack.yaml +++ b/tests/modules/net_lb_ext/examples/dual_stack.yaml @@ -256,4 +256,4 @@ counts: google_compute_region_backend_service: 1 google_compute_region_health_check: 1 modules: 3 - resources: 9 \ No newline at end of file + resources: 9 diff --git a/tests/modules/net_lb_ext/examples/ext_migs.yaml b/tests/modules/net_lb_ext/examples/ext_migs.yaml index 26471e5d5..3729ca55b 100644 --- a/tests/modules/net_lb_ext/examples/ext_migs.yaml +++ b/tests/modules/net_lb_ext/examples/ext_migs.yaml @@ -238,4 +238,4 @@ counts: google_compute_region_backend_service: 1 google_compute_region_health_check: 1 modules: 3 - resources: 8 \ No newline at end of file + resources: 8 diff --git a/tests/modules/net_lb_ext/examples/fwd_rules.yaml b/tests/modules/net_lb_ext/examples/fwd_rules.yaml index 69d4cc89f..53a4cbd01 100644 --- a/tests/modules/net_lb_ext/examples/fwd_rules.yaml +++ b/tests/modules/net_lb_ext/examples/fwd_rules.yaml @@ -257,4 +257,4 @@ counts: google_compute_region_backend_service: 1 google_compute_region_health_check: 1 modules: 3 - resources: 9 \ No newline at end of file + resources: 9 diff --git a/tests/modules/net_lb_ext/examples/migs.yaml b/tests/modules/net_lb_ext/examples/migs.yaml index ca639465f..72fc85780 100644 --- a/tests/modules/net_lb_ext/examples/migs.yaml +++ b/tests/modules/net_lb_ext/examples/migs.yaml @@ -174,4 +174,4 @@ counts: google_compute_region_backend_service: 1 google_compute_region_health_check: 1 modules: 3 - resources: 5 \ No newline at end of file + resources: 5 diff --git a/tests/modules/net_lb_proxy_int/examples/internet-neg.yaml b/tests/modules/net_lb_proxy_int/examples/internet-neg.yaml index ed0834263..b2f0b8acd 100644 --- a/tests/modules/net_lb_proxy_int/examples/internet-neg.yaml +++ b/tests/modules/net_lb_proxy_int/examples/internet-neg.yaml @@ -17,9 +17,9 @@ values: module.ilb-l7.google_compute_forwarding_rule.default: description: Terraform managed. ip_protocol: TCP - load_balancing_scheme: INTERNAL_MANAGED - name: ilb-test - network: projects/xxx/global/networks/aaa + load_balancing_scheme: INTERNAL_MANAGED + name: ilb-test + network: projects/xxx/global/networks/aaa port_range: '80' project: project-id region: europe-west8 diff --git a/tests/modules/net_lb_proxy_int/examples/zonal-neg.yaml b/tests/modules/net_lb_proxy_int/examples/zonal-neg.yaml index 8538740ab..fbb5f4386 100644 --- a/tests/modules/net_lb_proxy_int/examples/zonal-neg.yaml +++ b/tests/modules/net_lb_proxy_int/examples/zonal-neg.yaml @@ -142,4 +142,4 @@ counts: google_compute_region_health_check: 1 google_compute_region_target_tcp_proxy: 1 modules: 1 - resources: 7 \ No newline at end of file + resources: 7 diff --git a/tests/modules/net_swp/examples/psc.yaml b/tests/modules/net_swp/examples/psc.yaml index ba99959b0..a5e10d58d 100644 --- a/tests/modules/net_swp/examples/psc.yaml +++ b/tests/modules/net_swp/examples/psc.yaml @@ -73,4 +73,4 @@ counts: google_network_security_gateway_security_policy: 1 google_network_services_gateway: 1 modules: 1 - resources: 3 \ No newline at end of file + resources: 3 diff --git a/tests/modules/net_swp/examples/rules.yaml b/tests/modules/net_swp/examples/rules.yaml index 1059c7cd4..306686c34 100644 --- a/tests/modules/net_swp/examples/rules.yaml +++ b/tests/modules/net_swp/examples/rules.yaml @@ -14,6 +14,7 @@ # # file: tests/modules/net_swp/examples/rules.yaml +# yamllint disable rule:line-length values: module.secure-web-proxy.google_network_security_gateway_security_policy.default: description: Managed by Terraform. diff --git a/tests/modules/net_swp/examples/transparent-proxy.yaml b/tests/modules/net_swp/examples/transparent-proxy.yaml index 0604f504a..1b74f30cd 100644 --- a/tests/modules/net_swp/examples/transparent-proxy.yaml +++ b/tests/modules/net_swp/examples/transparent-proxy.yaml @@ -1,4 +1,3 @@ - # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/modules/net_vpc/examples/dns-policies.yaml b/tests/modules/net_vpc/examples/dns-policies.yaml index 540c3e30d..a0dadcba5 100644 --- a/tests/modules/net_vpc/examples/dns-policies.yaml +++ b/tests/modules/net_vpc/examples/dns-policies.yaml @@ -35,4 +35,4 @@ values: counts: google_compute_network: 1 google_compute_subnetwork: 1 - google_dns_policy: 1 \ No newline at end of file + google_dns_policy: 1 diff --git a/tests/modules/net_vpc/examples/factory.yaml b/tests/modules/net_vpc/examples/factory.yaml index 46424a24a..519f6ae18 100644 --- a/tests/modules/net_vpc/examples/factory.yaml +++ b/tests/modules/net_vpc/examples/factory.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.vpc.google_compute_network.network[0]: auto_create_subnetworks: false diff --git a/tests/modules/net_vpc/examples/googleapis.yaml b/tests/modules/net_vpc/examples/googleapis.yaml index 4df419a13..55a0dfcc1 100644 --- a/tests/modules/net_vpc/examples/googleapis.yaml +++ b/tests/modules/net_vpc/examples/googleapis.yaml @@ -39,4 +39,4 @@ values: counts: google_compute_network: 1 - google_compute_route: 3 \ No newline at end of file + google_compute_route: 3 diff --git a/tests/modules/net_vpc/examples/ipv6_only.yaml b/tests/modules/net_vpc/examples/ipv6_only.yaml index c6001ebd1..7d1bd758a 100644 --- a/tests/modules/net_vpc/examples/ipv6_only.yaml +++ b/tests/modules/net_vpc/examples/ipv6_only.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.vpc.google_compute_network.network[0]: auto_create_subnetworks: false diff --git a/tests/modules/net_vpc/examples/proxy-only-subnets.yaml b/tests/modules/net_vpc/examples/proxy-only-subnets.yaml index 83f94d4dd..f36b6429e 100644 --- a/tests/modules/net_vpc/examples/proxy-only-subnets.yaml +++ b/tests/modules/net_vpc/examples/proxy-only-subnets.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.vpc.google_compute_network.network[0]: name: my-network @@ -46,4 +47,4 @@ values: counts: google_compute_network: 1 - google_compute_subnetwork: 3 \ No newline at end of file + google_compute_subnetwork: 3 diff --git a/tests/modules/net_vpc/examples/psa-multiple-providers.yaml b/tests/modules/net_vpc/examples/psa-multiple-providers.yaml index f2bd9c741..4dfe4e013 100644 --- a/tests/modules/net_vpc/examples/psa-multiple-providers.yaml +++ b/tests/modules/net_vpc/examples/psa-multiple-providers.yaml @@ -54,4 +54,4 @@ counts: google_compute_subnetwork: 1 google_service_networking_connection: 2 -outputs: {} \ No newline at end of file +outputs: {} diff --git a/tests/modules/net_vpc/examples/shared-vpc.yaml b/tests/modules/net_vpc/examples/shared-vpc.yaml index 583291386..fcb972138 100644 --- a/tests/modules/net_vpc/examples/shared-vpc.yaml +++ b/tests/modules/net_vpc/examples/shared-vpc.yaml @@ -54,4 +54,4 @@ counts: google_compute_shared_vpc_service_project: 1 google_compute_subnetwork: 1 google_compute_subnetwork_iam_binding: 2 - modules: 2 \ No newline at end of file + modules: 2 diff --git a/tests/modules/organization/examples/network-tags.yaml b/tests/modules/organization/examples/network-tags.yaml index 1a550f7d3..521b0d1fc 100644 --- a/tests/modules/organization/examples/network-tags.yaml +++ b/tests/modules/organization/examples/network-tags.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -values: +values: module.org.google_tags_tag_key.default["net-environment"]: description: This is a network tag. parent: organizations/1122334455 diff --git a/tests/modules/project/examples/kms.yaml b/tests/modules/project/examples/kms.yaml index 4561262f2..ba2bbb806 100644 --- a/tests/modules/project/examples/kms.yaml +++ b/tests/modules/project/examples/kms.yaml @@ -25,7 +25,7 @@ values: module.org.google_tags_tag_value.default["environment/prod"]: description: Managed by the Terraform organization module. short_name: prod - module.project.google_project.project[0]: + module.project.google_project.project[0]: project_id: test-project module.project.google_tags_tag_binding.binding["env-prod"]: {} module.project.google_tags_tag_binding.binding["foo"]: diff --git a/tests/modules/project/examples/logging.yaml b/tests/modules/project/examples/logging.yaml index 238762b74..64840f8ad 100644 --- a/tests/modules/project/examples/logging.yaml +++ b/tests/modules/project/examples/logging.yaml @@ -182,5 +182,3 @@ counts: google_storage_bucket_iam_member: 1 modules: 6 resources: 19 - - diff --git a/tests/modules/project/examples/shared-vpc-subnet-grants.yaml b/tests/modules/project/examples/shared-vpc-subnet-grants.yaml index 49680ea47..67773d4a2 100644 --- a/tests/modules/project/examples/shared-vpc-subnet-grants.yaml +++ b/tests/modules/project/examples/shared-vpc-subnet-grants.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.host-project.google_compute_shared_vpc_host_project.shared_vpc_host[0]: project: test-host diff --git a/tests/modules/project/examples/shared-vpc.yaml b/tests/modules/project/examples/shared-vpc.yaml index a59e8d9dc..50cfc21b3 100644 --- a/tests/modules/project/examples/shared-vpc.yaml +++ b/tests/modules/project/examples/shared-vpc.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.host-project.google_compute_shared_vpc_host_project.shared_vpc_host[0]: project: test-host diff --git a/tests/modules/project/examples/vpc-sc-2.yaml b/tests/modules/project/examples/vpc-sc-2.yaml index c3c225810..d2b51340a 100644 --- a/tests/modules/project/examples/vpc-sc-2.yaml +++ b/tests/modules/project/examples/vpc-sc-2.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: ? module.project.google_access_context_manager_service_perimeter_dry_run_resource.default["accessPolicies/1234567890/servicePerimeters/b1"] : perimeter_name: accessPolicies/1234567890/servicePerimeters/b1 diff --git a/tests/modules/project/examples/vpc-sc.yaml b/tests/modules/project/examples/vpc-sc.yaml index 6e8d40c16..7df39cfa2 100644 --- a/tests/modules/project/examples/vpc-sc.yaml +++ b/tests/modules/project/examples/vpc-sc.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: ? module.project.google_access_context_manager_service_perimeter_resource.default["accessPolicies/1234567890/servicePerimeters/default"] : perimeter_name: accessPolicies/1234567890/servicePerimeters/default diff --git a/tests/modules/project_factory/examples/example.yaml b/tests/modules/project_factory/examples/example.yaml index d3bbc0842..5b0e780b8 100644 --- a/tests/modules/project_factory/examples/example.yaml +++ b/tests/modules/project_factory/examples/example.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.project-factory.module.automation-bucket["dev-tb-app0-0/automation/tf-state"].google_storage_bucket.bucket[0]: autoclass: [] diff --git a/tests/modules/pubsub/examples/schema.yaml b/tests/modules/pubsub/examples/schema.yaml index 9e1385293..17f584eac 100644 --- a/tests/modules/pubsub/examples/schema.yaml +++ b/tests/modules/pubsub/examples/schema.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.topic_with_schema.google_pubsub_schema.default[0]: definition: '{"fields":[{"name":"StringField","type":"string"},{"name":"FloatField","type":"float"},{"name":"BooleanField","type":"boolean"}],"name":"Avro","type":"record"}' diff --git a/tests/modules/pubsub/examples/simple.yaml b/tests/modules/pubsub/examples/simple.yaml index 16536babe..c259d5e33 100644 --- a/tests/modules/pubsub/examples/simple.yaml +++ b/tests/modules/pubsub/examples/simple.yaml @@ -39,4 +39,4 @@ counts: google_pubsub_topic: 1 google_pubsub_topic_iam_binding: 2 modules: 1 - resources: 3 \ No newline at end of file + resources: 3 diff --git a/tests/modules/secops_rules/examples/basic.yaml b/tests/modules/secops_rules/examples/basic.yaml index 9c9f6d423..d727003d2 100644 --- a/tests/modules/secops_rules/examples/basic.yaml +++ b/tests/modules/secops_rules/examples/basic.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.secops.google_chronicle_reference_list.default["private_ip_ranges"]: description: Private CIDR ranges diff --git a/tests/modules/secops_rules/examples/factory.yaml b/tests/modules/secops_rules/examples/factory.yaml index aaca9c6f0..ae267eab1 100644 --- a/tests/modules/secops_rules/examples/factory.yaml +++ b/tests/modules/secops_rules/examples/factory.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.secops.google_chronicle_reference_list.default["private_ip_ranges"]: description: Private CIDR ranges diff --git a/tests/modules/secret_manager/tftest.yaml b/tests/modules/secret_manager/tftest.yaml index 37846c04a..d27ede50a 100644 --- a/tests/modules/secret_manager/tftest.yaml +++ b/tests/modules/secret_manager/tftest.yaml @@ -16,4 +16,4 @@ module: modules/secret-manager tests: context: - skip_tofu: True + skip_tofu: true diff --git a/tests/modules/secure_source_manager_instance/examples/iam.yaml b/tests/modules/secure_source_manager_instance/examples/iam.yaml index f67f30a4d..cbbe87df8 100644 --- a/tests/modules/secure_source_manager_instance/examples/iam.yaml +++ b/tests/modules/secure_source_manager_instance/examples/iam.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.ssm_instance.google_secure_source_manager_instance.instance[0]: deletion_policy: PREVENT diff --git a/tests/modules/spanner_instance/examples/iam.yaml b/tests/modules/spanner_instance/examples/iam.yaml index 9bfe40b2d..39773a589 100644 --- a/tests/modules/spanner_instance/examples/iam.yaml +++ b/tests/modules/spanner_instance/examples/iam.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.spanner_instance.google_spanner_database.spanner_databases["my-database"]: ddl: [] @@ -69,4 +70,4 @@ counts: google_spanner_database_iam_member: 1 google_spanner_instance: 1 modules: 1 - resources: 5 \ No newline at end of file + resources: 5 diff --git a/tests/modules/spanner_instance/examples/instance-with-autoscaling.yaml b/tests/modules/spanner_instance/examples/instance-with-autoscaling.yaml index f3e2f1d76..c3b99b4a3 100644 --- a/tests/modules/spanner_instance/examples/instance-with-autoscaling.yaml +++ b/tests/modules/spanner_instance/examples/instance-with-autoscaling.yaml @@ -39,4 +39,4 @@ values: counts: google_spanner_instance: 1 modules: 1 - resources: 1 \ No newline at end of file + resources: 1 diff --git a/tests/modules/spanner_instance/examples/instance-with-custom-config.yaml b/tests/modules/spanner_instance/examples/instance-with-custom-config.yaml index 3a5cc0380..ee01604af 100644 --- a/tests/modules/spanner_instance/examples/instance-with-custom-config.yaml +++ b/tests/modules/spanner_instance/examples/instance-with-custom-config.yaml @@ -39,4 +39,4 @@ counts: google_spanner_instance: 1 google_spanner_instance_config: 1 modules: 1 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/spanner_instance/examples/simple-instance-with-database.yaml b/tests/modules/spanner_instance/examples/simple-instance-with-database.yaml index 982f50262..99a8f18d8 100644 --- a/tests/modules/spanner_instance/examples/simple-instance-with-database.yaml +++ b/tests/modules/spanner_instance/examples/simple-instance-with-database.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.spanner_instace.google_spanner_database.spanner_databases["my-database"]: ddl: [] @@ -37,4 +38,4 @@ counts: google_spanner_database: 1 google_spanner_instance: 1 modules: 1 - resources: 2 \ No newline at end of file + resources: 2 diff --git a/tests/modules/vpc_sc/data/access-levels/test-context.yaml b/tests/modules/vpc_sc/data/access-levels/test-context.yaml index 84224ee64..66660ef7e 100644 --- a/tests/modules/vpc_sc/data/access-levels/test-context.yaml +++ b/tests/modules/vpc_sc/data/access-levels/test-context.yaml @@ -14,6 +14,7 @@ # yaml-language-server: $schema=../../../../../modules/vpc-sc/schemas/access-level.schema.json +# yamllint disable rule:indentation conditions: - members: - $identity_sets:test diff --git a/tests/modules/vpc_sc/data/egress-policies/test-context.yaml b/tests/modules/vpc_sc/data/egress-policies/test-context.yaml index c3982298b..e979045fd 100644 --- a/tests/modules/vpc_sc/data/egress-policies/test-context.yaml +++ b/tests/modules/vpc_sc/data/egress-policies/test-context.yaml @@ -27,4 +27,4 @@ to: - "*" resources: - $project_numbers:test-0 - - $resource_sets:test \ No newline at end of file + - $resource_sets:test diff --git a/tests/modules/workstation_cluster/examples/iam.yaml b/tests/modules/workstation_cluster/examples/iam.yaml index 38754c61b..d155fdc80 100644 --- a/tests/modules/workstation_cluster/examples/iam.yaml +++ b/tests/modules/workstation_cluster/examples/iam.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# yamllint disable rule:line-length values: module.workstation-cluster.google_workstations_workstation.workstations["my-workstation-config-my-workstation"]: annotations: null