You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(elasticsearch): graduate to stable 🚀 (#13900)
This PR includes a last minute API change that standardizes the way VPC configuration is passed to the domain. It also provides sane defaults, enabling users to simply pass `vpc` in order to connect a domain to a VPC.
In addition, I added a missing integration test for VPC enabled domains.
Resolves#10965
BREAKING CHANGE: `vpcOptions` was removed. Use `vpc`, `vpcSubnets` and `securityGroups` instead.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
> **Experimental:** Higher level constructs in this module that are marked as experimental are
19
-
> under active development. They are subject to non-backward compatible changes or removal in any
20
-
> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and
21
-
> breaking changes will be announced in the release notes. This means that while you may use them,
22
-
> you may need to update your source code when upgrading to a newer version of this package.
18
+
> **Stable:** Higher level constructs in this module that are marked stable will not undergo any
19
+
> breaking changes. They will strictly follow the [Semantic Versioning](https://semver.org/) model.
23
20
24
21
---
25
22
@@ -146,6 +143,33 @@ This sets up the domain with node to node encryption and encryption at
146
143
rest. You can also choose to supply your own KMS key to use for encryption at
147
144
rest.
148
145
146
+
## VPC Support
147
+
148
+
Elasticsearch domains can be placed inside a VPC, providing a secure communication between Amazon ES and other services within the VPC without the need for an internet gateway, NAT device, or VPN connection.
149
+
150
+
> Visit [VPC Support for Amazon Elasticsearch Service Domains](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html) for more details.
151
+
152
+
```ts
153
+
const vpc =newec2.Vpc(this, 'Vpc');
154
+
const domainProps:es.DomainProps= {
155
+
version: es.ElasticsearchVersion.V7_1,
156
+
removalPolicy: RemovalPolicy.DESTROY,
157
+
vpc,
158
+
// must be enabled since our VPC contains multiple private subnets.
159
+
zoneAwareness: {
160
+
enabled: true,
161
+
},
162
+
capacity: {
163
+
// must be an even number since the default az count is 2.
164
+
dataNodes: 2,
165
+
},
166
+
};
167
+
newes.Domain(this, 'Domain', domainProps);
168
+
```
169
+
170
+
In addition, you can use the `vpcSubnets` property to control which specific subnets will be used, and the `securityGroups` property to control
171
+
which security groups will be attached to the domain. By default, CDK will select all *private* subnets in the VPC, and create one dedicated security group.
172
+
149
173
## Metrics
150
174
151
175
Helper methods exist to access common domain metrics for example:
0 commit comments