-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(opensearch): domain doesn't handle tokens in capacity configuration #15014
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-elasticsearchRelated to Amazon Elasticsearch ServiceRelated to Amazon Elasticsearch Service@aws-cdk/aws-opensearchRelated to the @aws-cdk/aws-opensearchservice packageRelated to the @aws-cdk/aws-opensearchservice packagebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1
Description
If I set SSM for some parameters like dataNodeInstanceType, if fails on deployment time
Reproduction Steps
Create a ES Domain, and set capacity using SSM, like this:
capacity: {
dataNodeInstanceType: `${ssm.StringParameter.valueForStringParameter(stack, 'ESInstanceTypeSSM', `elasticsearch/instance-type`)}.elasticsearch`,
masterNodeInstanceType: `${ssm.StringParameter.valueForStringParameter(stack, 'ESInstanceTypeSSM', `elasticsearch/instance-type`)}.elasticsearch`,
masterNodes: '1',
dataNodes: 2
},
Also, it shouldn't check if '.elasticsearch' is part of the text if a token is set there, but this second one is minor bug, the other one is an impediment of using SSM with ES configurations
What did you expect to happen?
Token resolved correctly.
What actually happened?
It fails, internally it's doing a .toLowerCase() and it's breaking the token
"${token[token.718]}.elasticsearch" instead of "${Token[Token.718]}.elasticsearch"
Environment
- **CDK CLI Version: 1.106.0
- **Node.js Version: 12
- **OS : Linux
- **Language (Version): Javascript
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-elasticsearchRelated to Amazon Elasticsearch ServiceRelated to Amazon Elasticsearch Service@aws-cdk/aws-opensearchRelated to the @aws-cdk/aws-opensearchservice packageRelated to the @aws-cdk/aws-opensearchservice packagebugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1