Skip to content

Commit c7fcaf7

Browse files
sigJoeGavinZZ
andauthored
fix(opensearch): cannot disable cluster logging (#29205)
### Issue # (if applicable) #29294 ### Reason for this change Currently cannot disable opensearch logging ### Description of changes If log parameters are explicitly set to false rather than undefined, it populates the logPublishingOptions with config to disable that logging ### Description of how you validated changes I added unit tests, although to be honest jest is giving me lots of trouble and I'm out of time for the day so I'll just create this pR and see what happens. Fingers crossed the PR test check is clean and I can pretend I know what I'm doing. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: GZ <[email protected]>
1 parent ba6d0b3 commit c7fcaf7

11 files changed

+589
-30
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.disable-logging.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.disable-logging.js.snapshot/cdk-integ-opensearch-with-logging-disabled.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"Resources": {
3+
"Domain66AC69E0": {
4+
"Type": "AWS::OpenSearchService::Domain",
5+
"Properties": {
6+
"ClusterConfig": {
7+
"DedicatedMasterEnabled": false,
8+
"InstanceCount": 1,
9+
"InstanceType": "r5.large.search",
10+
"MultiAZWithStandbyEnabled": false,
11+
"ZoneAwarenessEnabled": false
12+
},
13+
"DomainEndpointOptions": {
14+
"EnforceHTTPS": false,
15+
"TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07"
16+
},
17+
"EBSOptions": {
18+
"EBSEnabled": true,
19+
"VolumeSize": 10,
20+
"VolumeType": "gp2"
21+
},
22+
"EncryptionAtRestOptions": {
23+
"Enabled": false
24+
},
25+
"EngineVersion": "OpenSearch_2.11",
26+
"LogPublishingOptions": {
27+
"SEARCH_SLOW_LOGS": {
28+
"Enabled": false
29+
},
30+
"INDEX_SLOW_LOGS": {
31+
"Enabled": false
32+
},
33+
"ES_APPLICATION_LOGS": {
34+
"Enabled": false
35+
},
36+
"AUDIT_LOGS": {
37+
"Enabled": false
38+
}
39+
},
40+
"NodeToNodeEncryptionOptions": {
41+
"Enabled": false
42+
}
43+
},
44+
"UpdateReplacePolicy": "Delete",
45+
"DeletionPolicy": "Delete"
46+
}
47+
},
48+
"Parameters": {
49+
"BootstrapVersion": {
50+
"Type": "AWS::SSM::Parameter::Value<String>",
51+
"Default": "/cdk-bootstrap/hnb659fds/version",
52+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
53+
}
54+
},
55+
"Rules": {
56+
"CheckBootstrapVersion": {
57+
"Assertions": [
58+
{
59+
"Assert": {
60+
"Fn::Not": [
61+
{
62+
"Fn::Contains": [
63+
[
64+
"1",
65+
"2",
66+
"3",
67+
"4",
68+
"5"
69+
],
70+
{
71+
"Ref": "BootstrapVersion"
72+
}
73+
]
74+
}
75+
]
76+
},
77+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
78+
}
79+
]
80+
}
81+
}
82+
}

packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.disable-logging.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)