-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpc.cfn.yaml
34 lines (34 loc) · 919 Bytes
/
vpc.cfn.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
AWSTemplateFormatVersion: '2010-09-09'
Description: VPC
Parameters:
VpcCIDRStart:
Description: The start of the /16 cidr block for the vpc
Type: String
MinLength: '3'
MaxLength: '7'
Default: '10.21'
AllowedPattern: (\d{1,3})\.(\d{1,3})
ConstraintDescription: must be of the form x.x
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
EnableDnsSupport: 'true'
EnableDnsHostnames: 'true'
CidrBlock: !Sub
- ${CIDRstart}.0.0/16
- CIDRstart: !Ref 'VpcCIDRStart'
Tags:
- Key: Application
Value: !Ref 'AWS::StackName'
Outputs:
VPCId:
Description: VPCId of the newly created VPC
Value: !Ref 'VPC'
Export:
Name: !Sub '${AWS::StackName}-VPCID'
VpcCIDRStart:
Description: The start of the /16 cidr block for the vpc
Value: !Ref 'VpcCIDRStart'
Export:
Name: !Sub '${AWS::StackName}-VpcCIDRStart'