Skip to content

Commit 5c38092

Browse files
fix(cdk): exclude ResolverQueryLoggingConfig from resource tags (#222)
* fix(cdk): exclude ResolverQueryLoggingConfig from resource tags (#221) CfnResolverQueryLoggingConfig treats tag changes as requiring replacement, cascading to the per-VPC association which fails due to the one-association-per-VPC uniqueness constraint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(cdk): also exclude ResolverQueryLoggingConfigAssociation from tags The Association depends on the Config's physical ID. Even though PR #221 excluded the Config from tagging (preventing its replacement), the Association's CloudFormation state still references a stale Config ID from a prior failed replacement. Adding it to excludeResourceTypes prevents any future tag-induced update attempt on either resource. Part of #221, parent issue #229. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 420c042 commit 5c38092

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

cdk/src/main.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ const stack = new AgentStack(
4343
);
4444

4545
const computeType = app.node.tryGetContext('compute_type') ?? 'agentcore';
46-
Tags.of(stack).add('compute_type', computeType);
46+
47+
// Route53 Resolver resources where tag changes trigger replacement cascades.
48+
// Config: treats ANY property change (including tags) as requiring replacement.
49+
// Association: depends on Config's physical ID; if Config is replaced, the
50+
// Association update fails on the one-association-per-VPC constraint.
51+
const excludeResourceTypes = [
52+
'AWS::Route53Resolver::ResolverQueryLoggingConfig',
53+
'AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation',
54+
];
55+
56+
Tags.of(stack).add('compute_type', computeType, { excludeResourceTypes });
4757

4858
const githubTagKeys = [
4959
'sha',
@@ -63,7 +73,7 @@ const githubTagKeys = [
6373

6474
for (const key of githubTagKeys) {
6575
const value = app.node.tryGetContext(`github:${key}`);
66-
Tags.of(stack).add(`github:${key}`, value || 'none');
76+
Tags.of(stack).add(`github:${key}`, value || 'none', { excludeResourceTypes });
6777
}
6878

6979
app.synth();

0 commit comments

Comments
 (0)