-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(opensearch): missing validation on domainName property #17016
Copy link
Copy link
Closed
Labels
@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 effortp2
Description
What is the problem?
Currently, opensearch.Domain allows any string value to be used as domainName, this could fail CloudFormation deployment
Reproduction Steps
new opensearch.Domain(stack, 'Domain', {
version: opensearch.EngineVersion.OPENSEARCH_1_0,
domainName: "InvalidName"
});What did you expect to happen?
CDK should not allow invalid domain name
What actually happened?
CloudFormation deployment failed:
validation error detected: Value 'InvalidName' at 'domainName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-z][a-z0-9\-]+
CDK CLI Version
1.124.0 (build 65761fe)
Framework Version
No response
Node.js Version
v14.17.4
OS
Ubuntu
Language
Typescript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@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 effortp2