Skip to content

fix(aws/secretsmanager): preserve generated secret values on reconcile - #3884

Open
Yuzu02 wants to merge 3 commits into
alchemy-run:mainfrom
Yuzu02:fix/aws-secret-value-reconciliation
Open

Yuzu02 wants to merge 3 commits into
alchemy-run:mainfrom
Yuzu02:fix/aws-secret-value-reconciliation

Conversation

@Yuzu02

@Yuzu02 Yuzu02 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Preserve SecretsManager.Secret generated credentials when reconciling metadata, forcing a deploy, repairing drift, adopting an existing secret, or restoring a pending deletion. Previously, every reconciliation could rotate the password without updating its database consumer.

  • Initialize the value once on creation and generate a new password only when the effective generator changes or no current value exists.
  • Recognize an already-written generated version on retry using a request token scoped to the rotation transition.
  • Preserve the existing explicit string and binary value reconciliation, including drift repair.

Closes #3564.

Initialize a secret value only once on create and preserve an existing generated password during metadata-only updates, forced reconciliation, adoption, restoration, and drift repair. Rotate when the effective generation configuration changes and identify a completed rotation across interrupted state commits with a stable request token. Retain explicit-value drift repair.\n\nRegression coverage exercises the provider via stack deployments and the pinned Floci emulator, including an injected terminal state-store failure.\n\nFixes alchemy-run#3564. Inspired by the reproduction and suggested fix in the issue report by wblazer.
@alchemy-version-bot

alchemy-version-bot Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

pnpm install https://pkg.alchemy.run/alchemy/pr:3884:07e1da4
@alchemy.run (22)
pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/archil/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/convex/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/hetzner/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/railway/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/fly/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/stripe/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/gcp/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:3884:07e1da4
Transitive Dependencies (19)
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/archil/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/convex/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/s3/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/effect-cluster/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@alchemy.run/rivet/pr:3884:07e1da4
pnpm install https://pkg.alchemy.run/@distilled.cloud/rivet/pr:3884:07e1da4

Published Nov 30, 2026, 7:19 PM UTC. Expires Dec 7, 2026, 7:19 PM UTC, extended while this pull request is open.

@Yuzu02
Yuzu02 marked this pull request as ready for review November 30, 2026 19:38
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.

SecretsManager.Secret regenerates its generateSecretString value on every update, rotating the credential when only metadata changes

1 participant