Describe the bug
An OpenSearch Domain created with removalPolicy: RemovalPolicy.SNAPSHOT does not behave any differently than one created with removalPolicy: RemovalPolicy.DESTROY
Expected Behavior
- An OpenSearch Domain created with
removalPolicy: RemovalPolicy.SNAPSHOT should have its data retained between destructive updates.
- An OpenSearch Domain created with
removalPolicy: RemovalPolicy.SNAPSHOT should have its data available in S3, Backup, or elsewhere after its Stack has been destroyed.
Current Behavior
- An OpenSearch Domain created with
removalPolicy: RemovalPolicy.SNAPSHOT will lose all of its data after a destructive update.
- An OpenSearch Domain created with
removalPolicy: RemovalPolicy.SNAPSHOT will have no snapshots in S3, Backup, or elsewhere after its Stack has been destroyed.
Reproduction Steps
- Create a Domain
import {aws_opensearchservice as opensearch, RemovalPolicy, Stack, StackProps} from "aws-cdk-lib"
import {Construct} from "constructs"
export class ReproductionStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
new opensearch.Domain(this, "Domain", {
removalPolicy: RemovalPolicy.SNAPSHOT,
encryptionAtRest: {enabled: false}, // for example
// any other props
}
}
cdk deploy
- Add some data to your Domain.
- Create a change which requires "the provider to create a new physical resource", e.g.
encryptionAtRest: {enabled: true},
cdk deploy
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.27.0 (build 8e89048)
Framework Version
No response
Node.js Version
17.7.2
OS
Windows 10
Language
Typescript
Language Version
4.7.3
Other information
No response
Describe the bug
An OpenSearch Domain created with
removalPolicy: RemovalPolicy.SNAPSHOTdoes not behave any differently than one created withremovalPolicy: RemovalPolicy.DESTROYExpected Behavior
removalPolicy: RemovalPolicy.SNAPSHOTshould have its data retained between destructive updates.removalPolicy: RemovalPolicy.SNAPSHOTshould have its data available in S3, Backup, or elsewhere after its Stack has been destroyed.Current Behavior
removalPolicy: RemovalPolicy.SNAPSHOTwill lose all of its data after a destructive update.removalPolicy: RemovalPolicy.SNAPSHOTwill have no snapshots in S3, Backup, or elsewhere after its Stack has been destroyed.Reproduction Steps
cdk deploycdk deployPossible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.27.0 (build 8e89048)
Framework Version
No response
Node.js Version
17.7.2
OS
Windows 10
Language
Typescript
Language Version
4.7.3
Other information
No response