forked from aws-cloudformation/cfn-lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions_findinmap.yaml
36 lines (36 loc) · 979 Bytes
/
functions_findinmap.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
---
AWSTemplateFormatVersion: "2010-09-09"
Description: >
Exclusive Property types
Mappings:
amimap:
us-east-1:
32: ami-123456
Resources:
myInstance:
Type: AWS::EC2::Instance
Properties:
ImageId: !FindInMap [ amimap, !Ref "AWS::Region", !GetAtt myInstance.AvailabilityZone ]
SubnetId:
Fn::FindInMap:
MapName: subnetmap
TopLevelKey: !Ref "AWS::Region"
SecondLevelKey: 32
AvailabilityZone:
Fn::FindInMap:
- azmap
- !Ref "AWS::Region"
- 0
myInstance2:
Type: AWS::EC2::Instance
Properties:
ImageId: !FindInMap [ !FindInMap [ myMapDne, !Ref 'AWS::Region', !Ref 'AWS::Region' ], !Ref 'AWS::Region', 32 ]
myInstance3:
Type: AWS::EC2::Instance
Properties:
ImageId:
Fn::FindInMap:
- Ref: myInstance
Fn::FindInMap: [ amimap, !Ref 'AWS::Region', !Ref 'AWS::Region' ]
- TopLevelKey
- SecondLevelKey