forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproperties_az.yaml
38 lines (38 loc) · 871 Bytes
/
properties_az.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
---
AWSTemplateFormatVersion: "2010-09-09"
Description: >
AWS EC2 Good Template
Parameters:
myEnvironment:
Type: String
AllowedValues:
- prod
- dev
Conditions:
isProd:
"Fn::Equals":
- !Ref myEnvironment
- "prod"
Resources:
MyLaunchConfig:
Type: AWS::AutoScaling::LaunchConfiguration
Properties:
ImageId: "ami-2f726546"
InstanceType: t2.micro
myLoadBalancer:
Type: "AWS::AutoScaling::AutoScalingGroup"
Properties:
AvailabilityZones:
# Hardcoded AZ's
- !If [isProd, "eu-west-1a", !Ref "AWS::NoValue"]
- "eu-west-1b"
MaxSize: 3
MinSize: 1
LaunchConfigurationName: !Ref MyLaunchConfig
mySubnet2-2:
Type: AWS::EC2::Subnet
Properties:
# Hardcoded AZ
AvailabilityZone: us-east-1a
CidrBlock: "172.31.0.0/16"
VpcId: vpc-1234567