Skip to content

Commit 6c75581

Browse files
authored
feat(opensearchservice): support for MultiAZWithStandBy (under feature flag) (#26082)
This fix adds support for the [`MultiAZWithStandbyEnabled`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-clusterconfig.html#:~:text=%3A%20No%20interruption-,MultiAZWithStandbyEnabled,Update%20requires%3A%20No%20interruption,-WarmCount) flag to the [`CapacityConfig`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CapacityConfig.html) interface. If enabled, the `ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY` feature flag set the default value of `MultiAZWithStandbyEnabled` to `true` Closes #26026. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 9381880 commit 6c75581

File tree

32 files changed

+604
-11
lines changed

32 files changed

+604
-11
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"DedicatedMasterEnabled": false,
2323
"InstanceCount": 1,
2424
"InstanceType": "r5.large.search",
25-
"ZoneAwarenessEnabled": false
25+
"ZoneAwarenessEnabled": false,
26+
"MultiAZWithStandbyEnabled": false
2627
},
2728
"DomainEndpointOptions": {
2829
"EnforceHTTPS": true,

packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ.graphql-opensearch.ts

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class OpensSearch23Stack extends cdk.Stack {
2323
},
2424
nodeToNodeEncryption: true,
2525
enforceHttps: true,
26+
capacity: {
27+
multiAzWithStandbyEnabled: false,
28+
},
2629
});
2730

2831
const api = new appsync.GraphqlApi(this, 'api', {

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.advancedsecurity.js.snapshot/cdk-integ-opensearch-advancedsecurity.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"DedicatedMasterEnabled": false,
2323
"InstanceCount": 1,
2424
"InstanceType": "r5.large.search",
25-
"ZoneAwarenessEnabled": false
25+
"ZoneAwarenessEnabled": false,
26+
"MultiAZWithStandbyEnabled": false
2627
},
2728
"DomainEndpointOptions": {
2829
"EnforceHTTPS": true,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.advancedsecurity.ts

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class TestStack extends Stack {
2020
},
2121
nodeToNodeEncryption: true,
2222
enforceHttps: true,
23+
capacity: {
24+
multiAzWithStandbyEnabled: false,
25+
},
2326
});
2427
}
2528
}

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.cognitodashboardsauth.js.snapshot/cdk-integ-opensearch-cognitodashboardsauth.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
"DedicatedMasterEnabled": false,
8585
"InstanceCount": 1,
8686
"InstanceType": "r5.large.search",
87-
"ZoneAwarenessEnabled": false
87+
"ZoneAwarenessEnabled": false,
88+
"MultiAZWithStandbyEnabled": false
8889
},
8990
"CognitoOptions": {
9091
"Enabled": true,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.cognitodashboardsauth.ts

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class TestStack extends Stack {
3939
identityPoolId: identityPool.ref,
4040
userPoolId: userPool.userPoolId,
4141
},
42+
capacity: {
43+
multiAzWithStandbyEnabled: false,
44+
},
4245
});
4346
}
4447
}

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.js.snapshot/cdk-integ-opensearch-custom-kms-key.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"DedicatedMasterEnabled": false,
4343
"InstanceCount": 1,
4444
"InstanceType": "r5.large.search",
45-
"ZoneAwarenessEnabled": false
45+
"ZoneAwarenessEnabled": false,
46+
"MultiAZWithStandbyEnabled": false
4647
},
4748
"DomainEndpointOptions": {
4849
"EnforceHTTPS": false,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.custom-kms-key.ts

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class TestStack extends Stack {
2626
resources: ['*'],
2727
}),
2828
],
29+
capacity: {
30+
multiAzWithStandbyEnabled: false,
31+
},
2932
};
3033

3134
new opensearch.Domain(this, 'Domain', domainProps);

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.js.snapshot/cdk-integ-opensearch.template.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
"DedicatedMasterEnabled": false,
115115
"InstanceCount": 1,
116116
"InstanceType": "r5.large.search",
117-
"ZoneAwarenessEnabled": false
117+
"ZoneAwarenessEnabled": false,
118+
"MultiAZWithStandbyEnabled": false
118119
},
119120
"DomainEndpointOptions": {
120121
"EnforceHTTPS": false,
@@ -419,7 +420,8 @@
419420
"DedicatedMasterEnabled": false,
420421
"InstanceCount": 1,
421422
"InstanceType": "r5.large.search",
422-
"ZoneAwarenessEnabled": false
423+
"ZoneAwarenessEnabled": false,
424+
"MultiAZWithStandbyEnabled": false
423425
},
424426
"DomainEndpointOptions": {
425427
"EnforceHTTPS": false,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.min.js.snapshot/cdk-integ-opensearch.template.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"DedicatedMasterEnabled": false,
88
"InstanceCount": 1,
99
"InstanceType": "r5.large.search",
10-
"ZoneAwarenessEnabled": false
10+
"ZoneAwarenessEnabled": false,
11+
"MultiAZWithStandbyEnabled": false
1112
},
1213
"DomainEndpointOptions": {
1314
"EnforceHTTPS": false,

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.min.ts

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class TestStack extends Stack {
1111
const domainProps: opensearch.DomainProps = {
1212
version: opensearch.EngineVersion.OPENSEARCH_2_7,
1313
removalPolicy: RemovalPolicy.DESTROY,
14+
capacity: {
15+
multiAzWithStandbyEnabled: false,
16+
},
1417
};
1518

1619
new opensearch.Domain(this, 'Domain', domainProps);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "32.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "IntegOpenSearchMultiAzWithStandbyDefaultTestDeployAssertFD2E7982.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "32.0.0",
3+
"files": {
4+
"722892555255764f20f275e929016594c8562b137bbdfb5df2a004c9565301df": {
5+
"source": {
6+
"path": "cdk-integ-opensearch-multiaz-with-standby.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "722892555255764f20f275e929016594c8562b137bbdfb5df2a004c9565301df.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"Resources": {
3+
"Domain66AC69E0": {
4+
"Type": "AWS::OpenSearchService::Domain",
5+
"Properties": {
6+
"ClusterConfig": {
7+
"DedicatedMasterCount": 3,
8+
"DedicatedMasterEnabled": true,
9+
"DedicatedMasterType": "r5.large.search",
10+
"InstanceCount": 3,
11+
"InstanceType": "r5.large.search",
12+
"MultiAZWithStandbyEnabled": true,
13+
"ZoneAwarenessConfig": {
14+
"AvailabilityZoneCount": 3
15+
},
16+
"ZoneAwarenessEnabled": true
17+
},
18+
"DomainEndpointOptions": {
19+
"EnforceHTTPS": false,
20+
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07"
21+
},
22+
"EBSOptions": {
23+
"EBSEnabled": true,
24+
"VolumeSize": 10,
25+
"VolumeType": "gp3"
26+
},
27+
"EncryptionAtRestOptions": {
28+
"Enabled": false
29+
},
30+
"EngineVersion": "OpenSearch_1.3",
31+
"LogPublishingOptions": {},
32+
"NodeToNodeEncryptionOptions": {
33+
"Enabled": false
34+
}
35+
},
36+
"UpdateReplacePolicy": "Delete",
37+
"DeletionPolicy": "Delete"
38+
}
39+
},
40+
"Parameters": {
41+
"BootstrapVersion": {
42+
"Type": "AWS::SSM::Parameter::Value<String>",
43+
"Default": "/cdk-bootstrap/hnb659fds/version",
44+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
45+
}
46+
},
47+
"Rules": {
48+
"CheckBootstrapVersion": {
49+
"Assertions": [
50+
{
51+
"Assert": {
52+
"Fn::Not": [
53+
{
54+
"Fn::Contains": [
55+
[
56+
"1",
57+
"2",
58+
"3",
59+
"4",
60+
"5"
61+
],
62+
{
63+
"Ref": "BootstrapVersion"
64+
}
65+
]
66+
}
67+
]
68+
},
69+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
70+
}
71+
]
72+
}
73+
}
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"32.0.0"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "32.0.0",
3+
"testCases": {
4+
"IntegOpenSearchMultiAzWithStandby/DefaultTest": {
5+
"stacks": [
6+
"cdk-integ-opensearch-multiaz-with-standby"
7+
],
8+
"assertionStack": "IntegOpenSearchMultiAzWithStandby/DefaultTest/DeployAssert",
9+
"assertionStackName": "IntegOpenSearchMultiAzWithStandbyDefaultTestDeployAssertFD2E7982"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)