Skip to content

internal/acctest: make domain name generation go-vcr compatible#47786

Merged
jar-b merged 49 commits intomainfrom
td-random-domain-vcr
May 7, 2026
Merged

internal/acctest: make domain name generation go-vcr compatible#47786
jar-b merged 49 commits intomainfrom
td-random-domain-vcr

Conversation

@jar-b
Copy link
Copy Markdown
Member

@jar-b jar-b commented May 6, 2026

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

Swaps out the random string generation functions underpinning acctest.RandomDomain, acctest.RandomSubdomain, and acctest.RandomFQDomain which a go-vcr compatible equivalent.

Successful replay from an acceptance test which previously failed due to missing interactions:

% VCR_MODE=REPLAY_ONLY VCR_PATH=/Users/jaredbaker/development/_vcr-testdata/ make t K=fsx T=TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 tmp3 🌿...
TF_ACC=1 go1.26.2 test ./internal/service/fsx/... -v -count 1 -parallel 20 -run='TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO'  -timeout 360m -vet=off
2026/05/06 13:29:05 Creating Terraform AWS Provider (SDKv2-style)...
2026/05/06 13:29:05 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO (15.26s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/fsx        22.714s

AI Disclosure: This change was generated by AI. All modifications have been reviewed and I fully understand the scope of changes.

Relations

Closes #47769
Relates #25602

jar-b added 30 commits May 6, 2026 13:37
Successful replay from an acceptance test which previously failed due to
missing interactions:

```console
% VCR_MODE=REPLAY_ONLY VCR_PATH=/Users/jaredbaker/development/_vcr-testdata/ make t K=fsx T=TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 tmp3 🌿...
TF_ACC=1 go1.26.2 test ./internal/service/fsx/... -v -count 1 -parallel 20 -run='TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO'  -timeout 360m -vet=off
2026/05/06 13:29:05 Creating Terraform AWS Provider (SDKv2-style)...
2026/05/06 13:29:05 Initializing Terraform AWS Provider (SDKv2-style)...

--- PASS: TestAccFSxWindowsFileSystem_SelfManagedActiveDirectory_passwordWO (15.26s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/fsx        22.714s
```
@github-actions github-actions Bot added service/arcregionswitch Issues and PRs that pertain to the arcregionswitch service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/XL Managed by automation to categorize the size of a PR. and removed prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels May 6, 2026
@jar-b jar-b force-pushed the td-random-domain-vcr branch from 4ba0cc0 to 9516b62 Compare May 6, 2026 18:15
@jar-b jar-b marked this pull request as ready for review May 6, 2026 18:46
@jar-b jar-b requested a review from a team as a code owner May 6, 2026 18:46
Copy link
Copy Markdown
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@jar-b jar-b merged commit 4a6bc64 into main May 7, 2026
63 checks passed
@jar-b jar-b deleted the td-random-domain-vcr branch May 7, 2026 19:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

generators Relates to code generators. service/account Issues and PRs that pertain to the account service. service/acm Issues and PRs that pertain to the acm service. service/acmpca Issues and PRs that pertain to the acmpca service. service/apigateway Issues and PRs that pertain to the apigateway service. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. service/appmesh Issues and PRs that pertain to the appmesh service. service/appstream Issues and PRs that pertain to the appstream service. service/arcregionswitch Issues and PRs that pertain to the arcregionswitch service. service/budgets Issues and PRs that pertain to the budgets service. service/ce Issues and PRs that pertain to the ce service. service/cognitoidentity Issues and PRs that pertain to the cognitoidentity service. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. service/connect Issues and PRs that pertain to the connect service. service/customerprofiles Issues and PRs that pertain to the customerprofiles service. service/datasync Issues and PRs that pertain to the datasync service. service/dms Issues and PRs that pertain to the dms service. service/ds Issues and PRs that pertain to the ds service. service/ecs Issues and PRs that pertain to the ecs service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. service/fsx Issues and PRs that pertain to the fsx service. service/glue Issues and PRs that pertain to the glue service. service/iam Issues and PRs that pertain to the iam service. service/identitystore Issues and PRs that pertain to the identitystore service. service/kafka Issues and PRs that pertain to the kafka service. service/lightsail Issues and PRs that pertain to the lightsail service. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. service/notifications Issues and PRs that pertain to the notifications service. service/notificationscontacts Issues and PRs that pertain to the notificationscontacts service. service/odb Issues and PRs that pertain to the odb service. service/opensearch Issues and PRs that pertain to the opensearch service. service/pinpoint Issues and PRs that pertain to the pinpoint service. service/rds Issues and PRs that pertain to the rds service. service/rolesanywhere Issues and PRs that pertain to the rolesanywhere service. service/route53resolver Issues and PRs that pertain to the route53resolver service. service/route53 Issues and PRs that pertain to the route53 service. service/securityhub Issues and PRs that pertain to the securityhub service. service/servicecatalog Issues and PRs that pertain to the servicecatalog service. service/servicediscovery Issues and PRs that pertain to the servicediscovery service. service/ses Issues and PRs that pertain to the ses service. service/sesv2 Issues and PRs that pertain to the sesv2 service. service/shield Issues and PRs that pertain to the shield service. service/ssmcontacts Issues and PRs that pertain to the ssmcontacts service. service/storagegateway Issues and PRs that pertain to the storagegateway service. service/sts Issues and PRs that pertain to the sts service. service/transfer Issues and PRs that pertain to the transfer service. service/vpc Issues and PRs that pertain to the vpc service. service/vpnclient Issues and PRs that pertain to the vpnclient service. service/vpnsite Issues and PRs that pertain to the vpnsite service. service/wafv2 Issues and PRs that pertain to the wafv2 service. service/workspaces Issues and PRs that pertain to the workspaces service. size/XL 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.

Go-VCR: Make domain name generation functions VCR-aware

2 participants