Skip to content

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Oct 17, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

Enables go-vcr for the account service.

Relations

Relates #25602
Relates #43717

Output from Acceptance Testing

% make testacc PKG=account VCR_MODE=RECORD_ONLY VCR_PATH=/tmp/account-vcr-testdata/
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-go-vcr-account 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/account/... -v -count 1 -parallel 20   -timeout 360m -vet=off
2025/10/17 16:23:38 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/17 16:23:38 Initializing Terraform AWS Provider (SDKv2-style)...

=== RUN   TestAccAccount_serial/Region/AccountID
    region_test.go:69: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
    panic.go:636: provider meta not found for test TestAccAccount_serial/Region/AccountID
    panic.go:636: randomness source not found for test TestAccAccount_serial/Region/AccountID
=== RUN   TestAccAccount_serial/Region/basic
    region_test.go:24: Step 1/3 error: Error running apply: exit status 1

        Error: enabling Account Region (ap-southeast-3): operation error Account: EnableRegion, https response error StatusCode: 403, RequestID: 8bfd32c6-d078-49af-bb46-04238374fea1, AccessDeniedException: User: arn:aws:sts::<redacted>:assumed-role/<redacted> is not authorized to perform: account:EnableRegion on resource: arn:aws:account::<redacted>:account with an explicit deny in a service control policy

          with aws_account_region.test,
          on terraform_plugin_test.tf line 12, in resource "aws_account_region" "test":
          12: resource "aws_account_region" "test" {

    panic.go:636: randomness source not found for test TestAccAccount_serial/Region/basic
--- FAIL: TestAccAccount_serial (59.65s)
    --- PASS: TestAccAccount_serial/AlternateContact (29.70s)
        --- PASS: TestAccAccount_serial/AlternateContact/basic (19.58s)
        --- PASS: TestAccAccount_serial/AlternateContact/disappears (10.12s)
        --- SKIP: TestAccAccount_serial/AlternateContact/AccountID (0.00s)
    --- PASS: TestAccAccount_serial/PrimaryContact (26.36s)
        --- PASS: TestAccAccount_serial/PrimaryContact/basic (17.61s)
        --- PASS: TestAccAccount_serial/PrimaryContact/dataSourceBasic (8.75s)
        --- SKIP: TestAccAccount_serial/PrimaryContact/dataSourceAccountID (0.00s)
    --- FAIL: TestAccAccount_serial/Region (3.60s)
        --- SKIP: TestAccAccount_serial/Region/AccountID (0.00s)
        --- FAIL: TestAccAccount_serial/Region/basic (3.60s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/account	66.853s

Enables `go-vcr` for the `account` service.

```console
% make testacc PKG=account VCR_MODE=RECORD_ONLY VCR_PATH=/tmp/account-vcr-testdata/
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-go-vcr-account 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/account/... -v -count 1 -parallel 20   -timeout 360m -vet=off
2025/10/17 16:23:38 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/17 16:23:38 Initializing Terraform AWS Provider (SDKv2-style)...

=== RUN   TestAccAccount_serial/Region/AccountID
    region_test.go:69: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
    panic.go:636: provider meta not found for test TestAccAccount_serial/Region/AccountID
    panic.go:636: randomness source not found for test TestAccAccount_serial/Region/AccountID
=== RUN   TestAccAccount_serial/Region/basic
    region_test.go:24: Step 1/3 error: Error running apply: exit status 1

        Error: enabling Account Region (ap-southeast-3): operation error Account: EnableRegion, https response error StatusCode: 403, RequestID: 8bfd32c6-d078-49af-bb46-04238374fea1, AccessDeniedException: User: arn:aws:sts::<redacted>:assumed-role/<redacted> is not authorized to perform: account:EnableRegion on resource: arn:aws:account::<redacted>:account with an explicit deny in a service control policy

          with aws_account_region.test,
          on terraform_plugin_test.tf line 12, in resource "aws_account_region" "test":
          12: resource "aws_account_region" "test" {

    panic.go:636: randomness source not found for test TestAccAccount_serial/Region/basic
--- FAIL: TestAccAccount_serial (59.65s)
    --- PASS: TestAccAccount_serial/AlternateContact (29.70s)
        --- PASS: TestAccAccount_serial/AlternateContact/basic (19.58s)
        --- PASS: TestAccAccount_serial/AlternateContact/disappears (10.12s)
        --- SKIP: TestAccAccount_serial/AlternateContact/AccountID (0.00s)
    --- PASS: TestAccAccount_serial/PrimaryContact (26.36s)
        --- PASS: TestAccAccount_serial/PrimaryContact/basic (17.61s)
        --- PASS: TestAccAccount_serial/PrimaryContact/dataSourceBasic (8.75s)
        --- SKIP: TestAccAccount_serial/PrimaryContact/dataSourceAccountID (0.00s)
    --- FAIL: TestAccAccount_serial/Region (3.60s)
        --- SKIP: TestAccAccount_serial/Region/AccountID (0.00s)
        --- FAIL: TestAccAccount_serial/Region/basic (3.60s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/account	66.853s
```
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/account Issues and PRs that pertain to the account service. size/M Managed by automation to categorize the size of a PR. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 17, 2025
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Oct 17, 2025
@jar-b jar-b marked this pull request as ready for review October 20, 2025 13:19
@jar-b jar-b requested a review from a team as a code owner October 20, 2025 13:19
@YakDriver YakDriver added the no-changelog-needed Indicates that a changelog entry is not necessary label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. no-changelog-needed Indicates that a changelog entry is not necessary prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/account Issues and PRs that pertain to the account service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants