Reputation: 3091
I'm creating an AWS Stack with a CF template in which I have a InstanceHostname that is limited to have max. 15 chars (normal letters and digits) using a regex in the "AllowedPattern":
"InstanceHostname": {
"Type": "String",
"AllowedPattern": "^((?![0-9]{1,15}$)[a-zA-Z0-9-]{1,15}$)?$",
"ConstraintDescription": "The EC2 instance hostname must be 15 characters or less and must not...",
"Description": "A custom name for the EC2 instance…."
},
Is there a way to have the "AllowedPattern" regex validation trigger, when entering the hostname on the "Specify stack details" page? As it is now the validation does not take place until selecting "Create stack" a couple of pages ahead.
Upvotes: 1
Views: 162
Reputation: 238081
Sadly, there is no such way. The alternative is to have your users launch your template through AWS Service Catalog which gives your more control over the paramters that users put in your templates.
Upvotes: 3