Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(opensearchservice): t3 instance type does not support Multi-AZ …
…with standby feature (#29607) ### Issue # (if applicable) Related with #26026 ### Reason for this change #26082 enabled Multi-AZ with Standby by default, but deployment fails if we use t3 instance type, because it does not support the feature. To fail fast, this PR adds validation on synth time. > Multi-AZ with Standby only works with the m5, c5, r5, r6g, c6g, m6g, r6gd and i3 instance types. > https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html > You can use T3 instance types only if your domain is provisioned without standby. > https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html#latest-gen ### Description of changes If the instance type of data node or master node is t3, throws an error. I also considered to automatically set `multiAzWithStandbyEnabled: false` if we detect any t3 instance type, but it would introduce unwanted behavior e.g. in the below case: ```ts // Initial state // multiAzWithStandbyEnabled: true as there's no t3 instance type new Domain(stack, 'Domain', { version: engineVersion, capacity: { dataNodeInstanceType: 'r5.large.search', }, }) // Update domain to add master nodes with t3 instance type new Domain(stack, 'Domain', { version: engineVersion, capacity: { dataNodeInstanceType: 'r5.large.search', masterNodeInstanceType: 't3.medium.search', masterNodes: 3, }, }) // multiAzWithStandbyEnabled suddenly become false! ``` so we just throw an error. ### Description of how you validated changes Added some unit tests. I also confirmed that it results in deployment error if we try to deploy with t3 instance type & `multiAzWithStandbyEnabled : true` for both data node and master node. ### 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*
- Loading branch information