Skip to content

Commit 4f6110f

Browse files
fix: static values are now accurate
1 parent de18193 commit 4f6110f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/cdk/resources/OpenSearchResources.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export interface OpenSearchResourcesProps {
1010
readonly stackName: string
1111
readonly bedrockExecutionRole: Role
1212
readonly region: string
13+
readonly version: string
14+
readonly commitId: string
1315
}
1416

1517
export class OpenSearchResources extends Construct {
@@ -29,7 +31,7 @@ export class OpenSearchResources extends Construct {
2931
this.collection.grantDataAccess(props.bedrockExecutionRole)
3032

3133
// Set static values for commit and version tags to prevent recreation
32-
Tags.of(this.collection).add("commit", "static_value")
33-
Tags.of(this.collection).add("version", "static_value")
34+
Tags.of(this.collection).add("commit", props.commitId)
35+
Tags.of(this.collection).add("version", props.version)
3436
}
3537
}

packages/cdk/stacks/EpsAssistMeStack.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ export class EpsAssistMeStack extends Stack {
8080
const openSearchResources = new OpenSearchResources(this, "OpenSearchResources", {
8181
stackName: props.stackName,
8282
bedrockExecutionRole: bedrockExecutionRole.role,
83-
region
83+
region,
84+
version: props.version,
85+
commitId: props.commitId
8486
})
8587

8688
const vectorIndex = new VectorIndex(this, "VectorIndex", {

0 commit comments

Comments
 (0)