chore: remove enable default user from pr yml as it's not on this branch #346
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
| name: Terraform Provider Checks - PR workflow | ||
|
Check failure on line 1 in .github/workflows/terraform_provider_pr.yml
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
| env: | ||
| TERRAFORM_VERSION: "1.2.6" | ||
| REDISCLOUD_ACCESS_KEY: ${{ secrets.REDISCLOUD_ACCESS_KEY_STAGING }} | ||
| REDISCLOUD_SECRET_KEY: ${{ secrets.REDISCLOUD_SECRET_KEY_STAGING }} | ||
| REDISCLOUD_URL: ${{ secrets.REDISCLOUD_URL_STAGING }} | ||
| AWS_TEST_CLOUD_ACCOUNT_NAME: "${{ secrets.AWS_TEST_CLOUD_ACCOUNT_NAME_STAGING }}" | ||
| AWS_PEERING_REGION: ${{ secrets.AWS_PEERING_REGION }} | ||
| AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | ||
| AWS_VPC_CIDR: ${{ secrets.AWS_VPC_CIDR }} | ||
| AWS_VPC_ID: ${{ secrets.AWS_VPC_ID }} | ||
| AWS_TEST_TGW_ID: ${{ secrets.AWS_TEST_TGW_ID_STAGING }} | ||
| TF_ACC: true | ||
| TF_LOG: info | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.CLOUD_ACCOUNT_KEY }} | ||
| AWS_ACCESS_SECRET_KEY: ${{ secrets.CLOUD_ACCOUNT_SECRET }} | ||
| AWS_CONSOLE_USERNAME: ${{ secrets.CLOUD_ACCOUNT_USERNAME }} | ||
| AWS_CONSOLE_PASSWORD: ${{ secrets.CLOUD_ACCOUNT_PASS }} | ||
| AWS_SIGNIN_URL: ${{ secrets.CLOUD_ACCOUNT_URL }} | ||
| GCP_VPC_PROJECT: ${{ secrets.GCP_VPC_PROJECT }} | ||
| GCP_VPC_ID: ${{ secrets.GCP_VPC_ID }} | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
| concurrency: | ||
| group: <span class="math-inline">\{\{ github\.workflow \}\}\-</span>{{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| go_build: | ||
| name: go build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| 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('provider/**') }} | ||
| - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' | ||
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - if: steps.cache-terraform-plugin-dir.outputs.cache-hit != 'true' || steps.cache-terraform-plugin-dir.outcome == 'failure' | ||
| name: go mod download | ||
| run: go mod download | ||
| - 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/RedisLabs/rediscloud/99.99.99/$(go env GOOS)_$(go env GOARCH)/terraform-provider-rediscloud . | ||
| terraform_providers_schema: | ||
| name: terraform providers schema | ||
| needs: [go_build] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| 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('provider/**') }} | ||
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| timeout-minutes: 2 | ||
| with: | ||
| path: terraform-plugin-dir | ||
| key: ${{ runner.os }}-terraform-plugin-dir-${{ hashFiles('go.sum') }}-${{ hashFiles('provider/**') }} | ||
| - if: steps.cache-terraform-providers-schema.outputs.cache-hit != 'true' || steps.cache-terraform-providers-schema.outcome == 'failure' | ||
| uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | ||
| 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 | ||
| cat <<EOT >> providers.tf | ||
| terraform { | ||
| required_providers { | ||
| rediscloud = { | ||
| source = "RedisLabs/rediscloud" | ||
| version = "99.99.99" | ||
| } | ||
| } | ||
| } | ||
| EOT | ||
| echo 'resource "rediscloud_subscription" "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 | ||
| go_unit_test: | ||
| name: go unit test | ||
| needs: [go_build] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - run: go test ./... -run="^TestUnit" # Runs tests starting with TestUnit | ||
| go_test_smoke_aa_tgw_attachment: | ||
| if: false # Temporarily disabled - TGW tests not ready yet | ||
| name: go test smoke aa tgw attachment | ||
| needs: [go_unit_test, tfproviderlint, terraform_providers_schema] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - run: EXECUTE_TESTS=true make testacc TESTARGS='-run="TestAccResourceRedisCloudActiveActiveTransitGatewayAttachment_CRUDI"' | ||
| # ===== WAVE 1: Critical smoke tests for PR changes ===== | ||
| # These test our direct code changes and must pass first | ||
| go_test_smoke_aa_db: | ||
| name: go test smoke aa db | ||
| needs: [go_unit_test, tfproviderlint, terraform_providers_schema] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudActiveActiveDatabase_CRUDI | ||
| go_test_smoke_aa_sub: | ||
| name: go test smoke aa sub | ||
| needs: [go_unit_test, tfproviderlint, terraform_providers_schema] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudActiveActiveSubscription_CRUDI | ||
| go_test_smoke_pro_db: | ||
| name: go test smoke pro db | ||
| needs: [go_unit_test, tfproviderlint, terraform_providers_schema] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudProDatabase_CRUDI | ||
| go_test_smoke_pro_sub: | ||
| name: go test smoke pro sub | ||
| needs: [go_unit_test, tfproviderlint, terraform_providers_schema] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudProSubscription_CRUDI | ||
| # ===== WAVE 2: Additional smoke tests (run after Wave 1 passes) ===== | ||
| go_test_smoke_essentials_sub: | ||
| name: go test smoke essentials sub | ||
| needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudEssentialsSubscription | ||
| go_test_smoke_essentials_db: | ||
| name: go test smoke essentials db | ||
| needs: go_test_smoke_essentials_sub | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudEssentialsDatabase_CRUDI | ||
| go_test_smoke_misc: | ||
| name: go test smoke misc | ||
| needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloud(PrivateServiceConnect_CRUDI|AclRule_CRUDI) | ||
| go_test_pro_db_upgrade: | ||
| name: go test smoke pro db upgrade | ||
| needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudProDatabase_Redis8_Upgrade | ||
| go_test_privatelink: | ||
| name: go test smoke privatelink | ||
| needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAccResourceRedisCloudPrivateLink_CRUDI | ||
| go_test_block_public_endpoints: | ||
| name: go test smoke public endpoints | ||
| needs: [go_test_smoke_aa_db, go_test_smoke_aa_db_enable_default_user, go_test_smoke_aa_sub, go_test_smoke_pro_db, go_test_smoke_pro_sub] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - uses: ./.github/actions/run-testacc | ||
| with: | ||
| test_pattern: TestAcc(RedisCloudProDatabase_BlockPublicEndpoints|ActiveActiveSubscriptionDatabase_BlockPublicEndpoints) | ||
| tfproviderlint: | ||
| name: tfproviderlint | ||
| needs: [go_build] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| - run: make tfproviderlint | ||