Add ODB network ARN route target support #33474
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright IBM Corp. 2014, 2026 | |
| # "SPDX-License-Identifier: MPL-2.0" | |
| name: Provider Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "release/**" | |
| pull_request: | |
| paths: | |
| - .github/workflows/provider.yml | |
| - .ci/.golangci.yml | |
| - .ci/tools/go.mod | |
| - .markdownlint.yml | |
| - internal/** | |
| - docs/index.md | |
| - docs/data-sources/** | |
| - docs/guides/** | |
| - docs/resources/** | |
| - go.sum | |
| - GNUmakefile | |
| - main.go | |
| - names/** | |
| - website/** | |
| - '**/*.tf' | |
| - '**/*.tfvars' | |
| - '**/*.tftest.hcl' | |
| - '**/*.tfquery.hcl' | |
| ## NOTE: !!! | |
| ## When changing these workflows, ensure that the following is updated: | |
| ## - Documentation: docs/continuous-integration.md | |
| ## - Documentation: docs/makefile-cheat-sheet.md | |
| ## - Makefile: ./GNUmakefile | |
| env: | |
| AWS_DEFAULT_REGION: us-west-2 | |
| TERRAFORM_VERSION: "1.8.3" | |
| jobs: | |
| go_mod_download: | |
| name: go mod download | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| id: cache-go-pkg-mod | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - if: steps.cache-go-pkg-mod.outputs.cache-hit != 'true' || steps.cache-go-pkg-mod.outcome == 'failure' | |
| run: go mod download | |
| go_build: | |
| name: go build | |
| needs: [go_mod_download] | |
| runs-on: custom-ubuntu-22.04-large | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| # Restore build cache with daily rotation to prevent unbounded growth | |
| # Falls back to yesterday's cache if today's doesn't exist | |
| - name: Restore Go Build Cache | |
| uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| id: cache-go-build | |
| continue-on-error: true | |
| timeout-minutes: 3 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ hashFiles('go.sum') }}-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build-${{ hashFiles('go.sum') }}- | |
| ${{ runner.os }}-go-build- | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - name: go build | |
| run: make go-build | |
| - name: Upload provider binary | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: terraform-plugin-dir | |
| path: terraform-plugin-dir/ | |
| # Aggressively clean cache before saving to prevent extraction failures | |
| # Large caches (>5GB) can fail silently during tar extraction | |
| - name: Cleanup Build Cache Before Save | |
| if: always() | |
| run: | | |
| if [ -d "$GOCACHE" ]; then | |
| echo "Cache size before cleanup:" | |
| du -sh $GOCACHE | |
| # Remove test binaries | |
| find $GOCACHE -name "*.test" -type f -delete 2>/dev/null || true | |
| # Remove entries older than 1 day | |
| find $GOCACHE -type f -mtime +1 -delete 2>/dev/null || true | |
| find $GOCACHE -type d -empty -delete 2>/dev/null || true | |
| echo "Cache size after cleanup:" | |
| du -sh $GOCACHE | |
| fi | |
| # Save build cache for reuse by go_test and future runs | |
| - name: Save Go Build Cache | |
| uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| if: always() && steps.cache-go-build.outputs.cache-hit != 'true' | |
| continue-on-error: true | |
| timeout-minutes: 5 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| go_generate: | |
| name: go generate | |
| needs: [go_build] | |
| runs-on: custom-ubuntu-22.04-medium | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| # Reuse build cache from go_build | |
| - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ hashFiles('go.sum') }}-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build-${{ hashFiles('go.sum') }}- | |
| ${{ runner.os }}-go-build- | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - run: go install golang.org/x/tools/cmd/goimports@latest | |
| - run: go install golang.org/x/tools/cmd/stringer@latest | |
| - run: GO_VER=go make gen-raw | |
| - name: Check for Git Differences | |
| run: | | |
| git diff --compact-summary --exit-code || \ | |
| (echo; echo "Unexpected difference in directories after code generation. Run 'make gen' command and commit."; exit 1) | |
| terraform_fmt: | |
| name: terraform fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e | |
| with: | |
| terraform_version: ${{ env.TERRAFORM_VERSION }} | |
| terraform_wrapper: false | |
| - run: make terraform-fmt | |
| - name: Check for Git Differences | |
| run: | | |
| git diff --compact-summary --exit-code || \ | |
| (echo; echo "Unexpected difference in directories after terraform formatting. Run 'make terraform-fmt' command and commit."; exit 1) | |
| go_test: | |
| name: go test (shard ${{ matrix.shard }}) | |
| needs: [go_build] | |
| runs-on: custom-ubuntu-22.04-xl | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [0, 1, 2, 3] | |
| total-shards: [4] | |
| env: | |
| GOMAXPROCS: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| # Reuse build cache from go_build job to avoid recompilation | |
| # This is the key optimization - tests reuse production build artifacts | |
| - name: Restore Go Build Cache | |
| uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| id: cache-go-build | |
| continue-on-error: true | |
| timeout-minutes: 3 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build- | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - name: Go Test Shard ${{ matrix.shard }} | |
| run: make test-shard SHARD=${{ matrix.shard }} TOTAL_SHARDS=${{ matrix.total-shards }} | |
| # Only shard 0 needs cleanup since it's the only one that saves cache | |
| - name: Cleanup Test Artifacts | |
| if: always() && matrix.shard == 0 | |
| run: | | |
| if [ -d "$GOCACHE" ]; then | |
| echo "Cache size before cleanup:" | |
| du -sh $GOCACHE | |
| # Remove test binaries (*.test files) - they're huge and rarely reused | |
| find $GOCACHE -name "*.test" -type f -delete 2>/dev/null || true | |
| # Remove entries older than 1 day | |
| find $GOCACHE -type f -mtime +1 -delete 2>/dev/null || true | |
| find $GOCACHE -type d -empty -delete 2>/dev/null || true | |
| echo "Cache size after cleanup:" | |
| du -sh $GOCACHE | |
| fi | |
| # Save updated cache with test compilation (but cleaned) | |
| # Only shard 0 saves to avoid race conditions | |
| - name: Save Go Build Cache | |
| uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| if: always() && matrix.shard == 0 && steps.cache-go-build.outputs.cache-hit != 'true' | |
| continue-on-error: true | |
| timeout-minutes: 5 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| import-lint: | |
| needs: [go_build] | |
| runs-on: custom-ubuntu-22.04-medium | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build- | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - run: cd .ci/tools && go install github.com/pavius/impi/cmd/impi | |
| - run: impi --local . --scheme stdThirdPartyLocal ./... | |
| # validate_sweepers_unlinked checks that the sweeper functions are not linked in the provider binary. | |
| # As a pre-check, to validate that the check will work, it confirms that `strings` will find the function | |
| # names in the compiled sweeper binary. | |
| validate_sweepers_unlinked: | |
| name: Sweeper Functions Not Linked | |
| needs: [go_build] | |
| runs-on: custom-ubuntu-22.04-medium | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build- | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - name: Pre-Check sweeper binary | |
| run: | | |
| go test -c -o ./sweeper-bin ./internal/sweep/ | |
| count=$(strings ./sweeper-bin | \ | |
| grep --count --extended-regexp 'internal/service/[a-zA-Z0-9]+\.sweep[a-zA-Z0-9]+$') | |
| [ $count -gt 0 ] || \ | |
| (echo; echo "Expected `strings` to detect sweeper function names in sweeper binary."; exit 1) | |
| # Use cached provider or rebuild | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae | |
| continue-on-error: true | |
| id: cache-terraform-plugin-dir | |
| timeout-minutes: 2 | |
| with: | |
| path: terraform-plugin-dir | |
| key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }} | |
| - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' | |
| name: go build | |
| run: go build -o terraform-plugin-dir/registry.terraform.io/hashicorp/aws/99.99.99/$(go env GOOS)_$(go env GOARCH)/terraform-provider-aws . | |
| - name: Check provider binary | |
| run: | | |
| # grep returns the exit code 1 if there are no results. Disable immediate exit. | |
| set +e | |
| count=$(strings "terraform-plugin-dir/registry.terraform.io/hashicorp/aws/99.99.99/$(go env GOOS)_$(go env GOARCH)/terraform-provider-aws" | \ | |
| grep --count --extended-regexp 'internal/service/[a-zA-Z0-9]+\.sweep[a-zA-Z0-9]+$') | |
| set -e | |
| [ $count -eq 0 ] || \ | |
| (echo; echo "Expected `strings` to detect no sweeper function names in provider binary."; exit 1) | |
| terraform_providers_schema: | |
| name: terraform providers schema | |
| needs: [go_build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| id: cache-terraform-providers-schema | |
| timeout-minutes: 2 | |
| with: | |
| path: terraform-providers-schema | |
| key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }} | |
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v6.0.0 | |
| with: | |
| name: terraform-plugin-dir | |
| path: terraform-plugin-dir | |
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | |
| name: Make provider binary executable | |
| run: chmod +x terraform-plugin-dir/registry.terraform.io/hashicorp/aws/99.99.99/*/terraform-provider-aws | |
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | |
| uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e | |
| with: | |
| terraform_version: ${{ env.TERRAFORM_VERSION }} | |
| terraform_wrapper: false | |
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | |
| name: terraform init | |
| run: | | |
| # We need a file to initialize the provider | |
| echo 'data "aws_partition" "example" {}' > example.tf | |
| terraform init -plugin-dir terraform-plugin-dir | |
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | |
| name: terraform providers schema | |
| run: | | |
| mkdir terraform-providers-schema | |
| terraform providers schema -json > terraform-providers-schema/schema.json | |
| tfproviderdocs: | |
| needs: [terraform_providers_schema] | |
| runs-on: custom-ubuntu-22.04-large | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e | |
| with: | |
| terraform_version: ${{ env.TERRAFORM_VERSION }} | |
| terraform_wrapper: false | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - run: cd .ci/tools && go install github.com/YakDriver/tfproviderdocs | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| timeout-minutes: 2 | |
| with: | |
| path: terraform-providers-schema | |
| key: ${{ runner.os }}-terraform-providers-schema-${{ hashFiles('go.sum') }}-${{ hashFiles('internal/**') }} | |
| - name: tfproviderdocs check | |
| run: | | |
| terraform -v | |
| make tfproviderdocs | |
| cache-info: | |
| runs-on: custom-ubuntu-22.04-medium | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: go env | |
| run: | | |
| echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "CACHE_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV | |
| - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 2 | |
| with: | |
| path: ${{ env.GOCACHE }} | |
| key: ${{ runner.os }}-go-build-${{ env.CACHE_DATE }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-build- | |
| - name: Local Cache Info | |
| run: make cache-info | |
| - name: GitHub Actions Cache List | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| echo "" | |
| echo "=== GitHub Actions Cache Entries ===" | |
| gh cache list --limit 100 --json key,ref,sizeInBytes,createdAt,lastAccessedAt | \ | |
| jq -r '.[] | "\(.key) | \(.ref) | \(.sizeInBytes / 1024 / 1024 | floor)MB | Created: \(.createdAt) | Accessed: \(.lastAccessedAt)"' | \ | |
| column -t -s '|' || echo "Failed to list caches" | |
| echo "" | |
| echo "=== Cache Usage Summary ===" | |
| gh cache list --limit 100 --json sizeInBytes | \ | |
| jq '[.[].sizeInBytes] | add / 1024 / 1024 / 1024 | "Total cache size: \(. | floor)GB"' -r || echo "Failed to calculate total" | |
| markdown-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0 | |
| with: | |
| args: "." | |
| ignore: "./.agents ./docs ./website/docs ./AGENTS.md ./CHANGELOG.md ./internal/service/cloudformation/test-fixtures/examplecompany-exampleservice-exampleresource/docs" | |
| misspell: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| continue-on-error: true | |
| timeout-minutes: 3 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
| - run: cd .ci/tools && go install github.com/client9/misspell/cmd/misspell | |
| - run: make go-misspell |