Skip to content

Commit 1e1dbed

Browse files
committed
smoke cfn-outputs: fix secrets-resolve regex (ARN has 7 colon parts not 6)
1 parent d8b8146 commit 1e1dbed

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/smoke/fixtures/cfn-outputs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ interface FetchOptions {
8787
// in Output values (only in resource properties), so the smoke test sees the literal
8888
// placeholder. Detect that pattern and fetch the secret at test time.
8989
// Format: {{resolve:secretsmanager:<secretArn>:SecretString:<jsonKey>::}}
90+
// The ARN itself contains 7 colon-separated parts, so use a lazy match anchored
91+
// on `:SecretString:` to extract the ARN cleanly.
9092
const SECRETS_RESOLVE_PATTERN =
91-
/^\{\{resolve:secretsmanager:([^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+):SecretString:([^:]+)::\}\}$/;
93+
/^\{\{resolve:secretsmanager:(.+?):SecretString:([^:]+)::\}\}$/;
9294

9395
async function resolveSecretsPlaceholder(
9496
value: string,

0 commit comments

Comments
 (0)