Repository navigation
Conversation
…them A payment connector's credentialProviderArn only accepts letters, digits, '-' and '.' in the provider name, and Identity names do not allow '.'. The target-scoped name '<project>_<target>_<credential>' always contains underscores, so no credential-backed payment connector could deploy. Payment providers are now named '<project>-<target>-<credential>', with the credential name's underscores written as hyphens. API key and OAuth providers keep their names, and v0 and migrated projects keep the bare credential name. A payment provider recorded under the old underscored name is treated as orphaned and deleted by that name after the stack update that replaces it. Fixes aws#2533
This was referenced Oct 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.x #2739 +/- ##
=======================================
Coverage 96.54% 96.54%
=======================================
Files 706 706
Lines 58543 58567 +24
=======================================
+ Hits 56521 56546 +25
+ Misses 2022 2021 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
@notgitika this is the |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On
v1.x, every credential-backed payment connector fails to deploy, whatever the credential is called. The deploy creates each credential provider under the target-scoped name<project>_<target>_<credential>. Identity accepts that name ([a-zA-Z0-9\-_]+), butPaymentCredentialProviderConfiguration.credentialProviderArnonly accepts[a-zA-Z0-9-.]+afterpaymentcredentialprovider/. The ARN the synthesized app hands thePaymentConnectortherefore always contains underscores, and CloudFormation rejects it.The only characters both rules accept are letters, digits and
-, because Identity names cannot contain.. This PR changes how payment providers are named and leaves everything else as it is:<project>-<target>-<credential>, and underscores in the credential name become hyphens (my_walletin projectexample, targetdev→example-dev-my-wallet). The spec name and its.env.localvariables stay the same.<project>_<target>_<credential>._and-derive the same.env.localvariables, and the spec already rejects that. The length check (PROVIDER_NAME_MAX_LENGTH) is unchanged, since the name keeps its length.orphanedCredentialsnow reports such a provider when the recorded ARN still points at it, together with the name it was recorded under. The next deploy creates the hyphenated provider, points the stack at it, and deletes the old one by its recorded name after the stack update. This goes through the same path as a credential dropped from the spec. A teardown deletes it the same way.Related Issue
Closes #2533
Documentation PR
Not applicable: provider names are internal, and the spec, CLI flags and
.env.localvariables are unchanged.Type of Change
Testing
How have you tested the change?
bun testbun run test:e2e, or explained why they are not applicablebun run typecheckbun run lint:checkbun run format:checkbun run buildsrc/assets/, I updated affected snapshots withbun test <test-file> --update-snapshotsand committed themNew tests:
credentials.test.ts: a payment credential namedmy_walletis provisioned asexample-dev-my-wallet. Its ARN matches the service'scredentialProviderArnpattern, and the old underscored name does not.credentials.test.ts:orphanedCredentialsreports payment providers recorded under the underscored name by that name, for declared and dropped credentials alike. It leaves hyphenated providers and v0/migrated bare names alone. The remover deletes by the recorded name.cdk.test.ts: a deploy whose state records the underscored payment provider passes it to the remover after the stack update.I did not run the e2e suite. It needs a real Coinbase CDP or Stripe/Privy credential to deploy a payment connector.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.