Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions cdk/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ const stack = new AgentStack(
);

const computeType = app.node.tryGetContext('compute_type') ?? 'agentcore';
Tags.of(stack).add('compute_type', computeType);

// Route53 Resolver resources where tag changes trigger replacement cascades.
// Config: treats ANY property change (including tags) as requiring replacement.
// Association: depends on Config's physical ID; if Config is replaced, the
// Association update fails on the one-association-per-VPC constraint.
const excludeResourceTypes = [
'AWS::Route53Resolver::ResolverQueryLoggingConfig',
'AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation',
];

Tags.of(stack).add('compute_type', computeType, { excludeResourceTypes });

const githubTagKeys = [
'sha',
Expand All @@ -63,7 +73,7 @@ const githubTagKeys = [

for (const key of githubTagKeys) {
const value = app.node.tryGetContext(`github:${key}`);
Tags.of(stack).add(`github:${key}`, value || 'none');
Tags.of(stack).add(`github:${key}`, value || 'none', { excludeResourceTypes });
}

app.synth();
Loading