Skip to content

Update ManagedZone.yaml to contain ransom suffix for dns_name#18086

Open
shellyvilenko wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shellyvilenko:fix-condition-tests
Open

Update ManagedZone.yaml to contain ransom suffix for dns_name#18086
shellyvilenko wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
shellyvilenko:fix-condition-tests

Conversation

@shellyvilenko

@shellyvilenko shellyvilenko commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The Terraform configuration in these tests used a hardcoded dns_name domain name ("m-z.gcp.tfacc.hashicorptest.com."). When these tests run in parallel (or concurrently within the same testing project), multiple test executions attempt to create a Cloud DNS managed zone with the exact same domain name.

This PR fixes the flakiness and parallel collision failures in the google_dns_managed_zone IAM and quickstart example tests.

Problem

When tests run in parallel, multiple test executions attempt to create a Cloud DNS managed zone with the exact same hardcoded domain name ("m-z.gcp.tfacc.hashicorptest.com."). Since DNS zone domain names must be globally unique within the project/nameservers, this results in collisions and managedZoneDnsNameNotAvailable API errors.

Solution

Updated the dns_managed_zone_quickstart sample's test_vars_overrides in mmv1/products/dns/ManagedZone.yaml to dynamically append randomSuffix to the dns_name (i.e., "m-z-" + randomSuffix + ".gcp.tfacc.hashicorptest.com."). This guarantees a unique domain name for every concurrent test invocation.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

dns: fixed parallel test flakiness in DNS Managed Zone IAM tests

he Terraform configuration in these tests used a hardcoded dns_name domain name ("m-z.gcp.tfacc.hashicorptest.com."). When these tests run in parallel (or concurrently within the same testing project), multiple test executions attempt to create a Cloud DNS managed zone with the exact same domain name.
@github-actions github-actions Bot requested a review from SirGitsalot June 25, 2026 15:32
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@SirGitsalot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician

modular-magician commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit cf089e6:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 9 insertions(+), 9 deletions(-)
google-beta provider View Diff 2 files changed, 9 insertions(+), 9 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
61 51 3 7
Affected Service Packages
  • dns

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccDNSManagedZoneIamBindingGenerated
  • TestAccDNSManagedZoneIamBindingGenerated_withCondition
  • TestAccDNSManagedZoneIamMemberGenerated
  • TestAccDNSManagedZoneIamMemberGenerated_withCondition
  • TestAccDNSManagedZoneIamPolicyGenerated
  • TestAccDNSManagedZoneIamPolicyGenerated_withCondition
  • TestAccDNSManagedZone_dnsManagedZoneQuickstartExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDNSManagedZoneIamBindingGenerated
✅ Log TestAccDNSManagedZoneIamBindingGenerated_withCondition
✅ Log TestAccDNSManagedZoneIamMemberGenerated
✅ Log TestAccDNSManagedZoneIamMemberGenerated_withCondition
✅ Log TestAccDNSManagedZoneIamPolicyGenerated
✅ Log TestAccDNSManagedZoneIamPolicyGenerated_withCondition
✅ Log TestAccDNSManagedZone_dnsManagedZoneQuickstartExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@shellyvilenko, @SirGitsalot VCR tests complete for cf089e6!

@github-actions

Copy link
Copy Markdown

@SirGitsalot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants