Skip to content

Instantly share code, notes, and snippets.

@csereno
Created June 17, 2020 04:01
Show Gist options
  • Save csereno/dd8e7fe4d1bb272efc67382dd077d3ae to your computer and use it in GitHub Desktop.
Save csereno/dd8e7fe4d1bb272efc67382dd077d3ae to your computer and use it in GitHub Desktop.
Specifying the CIDR for an AWS subnet with an allowed pattern
SubnetCIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
Default: 10.0.0.0/20
Description: CIDR block for subnet
Type: String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment