-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecution-error-template.yaml
More file actions
42 lines (38 loc) · 1.1 KB
/
execution-error-template.yaml
File metadata and controls
42 lines (38 loc) · 1.1 KB
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
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Template that passes validation but fails during execution (VPC and Subnet with overlapping CIDRs)'
Parameters:
Environment:
Type: String
Default: test
Resources:
# VPC with CIDR block
TestVPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
EnableDnsSupport: true
Tags:
- Key: Name
Value: !Sub "${Environment}-test-vpc"
- Key: Environment
Value: !Ref Environment
# Subnet with CIDR that doesn't fit within VPC CIDR - will cause execution error
TestSubnet:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref TestVPC
CidrBlock: 192.168.1.0/24 # This CIDR doesn't overlap with VPC CIDR 10.0.0.0/16
AvailabilityZone: !Select [0, !GetAZs '']
Tags:
- Key: Name
Value: !Sub "${Environment}-test-subnet"
- Key: Environment
Value: !Ref Environment
Outputs:
VPCId:
Description: "ID of the VPC"
Value: !Ref TestVPC
SubnetId:
Description: "ID of the Subnet"
Value: !Ref TestSubnet