Skip to content

fix(rds): support autonaming for instance identifiers - #6437

Merged
corymhall merged 1 commit into
masterfrom
triage-6434
Jun 16, 2026
Merged

fix(rds): support autonaming for instance identifiers#6437
corymhall merged 1 commit into
masterfrom
triage-6434

Conversation

@corymhall

@corymhall corymhall commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

This updates aws:rds/instance:Instance so the generated identifier default participates in Pulumi autonaming configuration.

The RDS identifier default now uses ComputeDefault with AutoNamed: true and delegates to tfbridge.ComputeAutoNameDefault. This preserves the previous fallback naming shape, including the shorter SQL Server suffix, while allowing pulumi:autonaming patterns and modes to apply.

Compatibility

Existing resources should keep their prior identifier during provider upgrades because ComputeAutoNameDefault reuses the prior value when prior state is available. The upgrade fixture covers a baseline stack created by v6.78.0 and previews it with the new provider.

identifierPrefix remains a separate explicit naming mechanism. There is no provider-specific prefix guard here: the bridge's generic Terraform ConflictsWith handling suppresses the identifier default when identifierPrefix is present. The PR includes a preview/gRPC assertion for that path.

Tests

  • make provider
  • make test_provider test_provider_cmd="cd provider && go test -p=1 -vet=off -v -short -run TestRdsInstanceIdentifierAutonaming -count=1 ."
  • make test TESTTAGS=java TESTPARALLELISM=1 GOTESTARGS="-run \"^TestRdsInstance(Autonaming|IdentifierPrefixSuppressesAutonaming)$\" -count=1"
  • make test TESTTAGS=java TESTPARALLELISM=1 GOTESTARGS="-run ^TestRdsInstanceAutonamingUpgrade$ -count=1"
  • git diff --check

Notes:

  • TestRdsInstanceAutonaming is preview-only and asserts the provider Check response via gRPC log instead of creating a live RDS instance.
  • TestRdsInstanceIdentifierPrefixSuppressesAutonaming proves identifierPrefix suppresses the identifier default through the bridge conflict path.
  • TestRdsInstanceAutonamingUpgrade uses the recorded baseline stack to validate old-state compatibility.

fixes #6434

Summary:
- Move RDS instance identifier defaulting to ComputeDefault with AutoNamed.
- Preserve legacy generated-name shape, SQL Server suffix length, and
  prior-state reuse.
- Add provider, preview, prefix-conflict, and upgrade coverage for Pulumi
  autonaming config.

Rationale:
- The old DefaultInfo.From path could not honor pulumi:autonaming
  configuration. Using ComputeAutoNameDefault lets the bridge apply configured
  autonaming while retaining prior identifiers during provider upgrades.
- identifierPrefix is already handled by the bridge's generic Terraform
  ConflictsWith default-suppression path, so no provider-specific guard is
  needed.

Tests:
- make provider
- make test_provider test_provider_cmd="cd provider && go test -p=1 -vet=off -v -short -run TestRdsInstanceIdentifierAutonaming -count=1 ."
- make test TESTTAGS=java TESTPARALLELISM=1 GOTESTARGS="-run \"^TestRdsInstance(Autonaming|IdentifierPrefixSuppressesAutonaming)$\" -count=1"
- esc run pulumi/providers/aws -- make test TESTTAGS=java TESTPARALLELISM=1 GOTESTARGS="-run ^TestRdsInstanceAutonamingUpgrade$ -count=1"
- git diff --check

Co-authored-by: Codex <codex@openai.com>
@github-actions

Copy link
Copy Markdown
Contributor

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.98%. Comparing base (0e39acc) to head (7fc1d7c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6437      +/-   ##
==========================================
+ Coverage   14.74%   15.98%   +1.24%     
==========================================
  Files         373      374       +1     
  Lines       89585    91298    +1713     
==========================================
+ Hits        13209    14596    +1387     
- Misses      76354    76682     +328     
+ Partials       22       20       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@corymhall
corymhall marked this pull request as ready for review June 16, 2026 09:42

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No actionable issues found.

Reviewed by Internal Trusted PR Reviewer

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add pulumi-labs/gh-aw-internal/.github/workflows/gh-aw-pr-review.md@8a92f53fac170563f7727cacab2dbedb5d5b9e29

@corymhall
corymhall requested a review from a team June 16, 2026 10:04
@corymhall
corymhall merged commit fddcda8 into master Jun 16, 2026
36 of 37 checks passed
@corymhall
corymhall deleted the triage-6434 branch June 16, 2026 11:16
@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v7.34.0.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-naming not working for aws:rds/instance:Instance

3 participants