-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvpc-adaptor.yaml
82 lines (77 loc) · 2.51 KB
/
vpc-adaptor.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Create & Export Reusable VPC Resources'
Parameters:
ExistingVPC:
Description: >
An existing VPC that will become an exported resource.
Type: 'AWS::EC2::VPC::Id'
ExistingPrivateSubnetA:
Description: >
An existing private (inside) subnet in AZ A that will become an
exported resource.
Type: 'AWS::EC2::Subnet::Id'
ExistingPrivateSubnetB:
Description: >
An existing private (inside) subnet in AZ B that will become an
exported resource.
Type: 'AWS::EC2::Subnet::Id'
ExistingPublicSubnetA:
Description: >
An existing public facing (edge) subnet in AZ A that will become an
exported resource.
Type: 'AWS::EC2::Subnet::Id'
ExistingPublicSubnetB:
Description: >
An existing public facing (edge) subnet in AZ B that will become an
exported resource.
Type: 'AWS::EC2::Subnet::Id'
Conditions:
AlwaysFalse: !Equals [ 'false', 'true' ]
Resources:
DummyResource:
# This resource does not get created, but CloudFormation requires that
# at least one resource must be defined.
Type: 'AWS::EC2::VPC'
Condition: AlwaysFalse
Properties:
CidrBlock: '192.168.0.0/16'
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}'
Outputs:
VPC:
Description: The ID of the VPC
Value: !Ref ExistingVPC
Export:
Name: !Sub "${AWS::StackName}-vpc"
PrivateSubnetA:
Description: The ID of the Zone A Public/Edge Subnet
Value: !Ref ExistingPrivateSubnetA
Export:
Name: !Sub "${AWS::StackName}-private-subnet-a"
PrivateSubnetB:
Description: The ID of the Zone B Public/Edge Subnet
Value: !Ref ExistingPrivateSubnetB
Export:
Name: !Sub "${AWS::StackName}-private-subnet-b"
PrivateSubnets:
Description: A CSV List of the Private Subnets
Value: !Sub "${ExistingPrivateSubnetA},${ExistingPrivateSubnetB}"
Export:
Name: !Sub "${AWS::StackName}-private-subnets"
PublicSubnetA:
Description: The ID of the Zone A Public/Inside Subnet
Value: !Ref ExistingPublicSubnetA
Export:
Name: !Sub "${AWS::StackName}-public-subnet-a"
PublicSubnetB:
Description: The ID of the Zone B Public/Inside Subnet
Value: !Ref ExistingPublicSubnetB
Export:
Name: !Sub "${AWS::StackName}-public-subnet-b"
PublicSubnets:
Description: A CSV List of the Public Subnets
Value: !Sub "${ExistingPublicSubnetA},${ExistingPublicSubnetB}"
Export:
Name: !Sub "${AWS::StackName}-public-subnets"