-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yml
43 lines (37 loc) · 1.05 KB
/
template.yml
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
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
Parameters:
ProjectId:
Type: String
Description: AWS projectID to be used to associate ressources.
VpcId:
Type: AWS::EC2::VPC::Id
Description: VPC id.
VpcSecurityGroupIds:
Type: List<AWS::EC2::SecurityGroup::Id>
Description: VPC security groups ids.
VpcSubnetIds:
Type: List<AWS::EC2::Subnet::Id>
Description: VPC subnet ids.
Outputs:
LambdaFunction:
Description: Information about the value
Value: !GetAtt ECSDeploy.Arn
Export:
Name: !Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaFunction']]
Resources:
ECSDeploy:
Type: AWS::Serverless::Function
Properties:
Handler: main
Runtime: go1.x
Environment:
Variables:
PROJECT_ID: !Ref 'ProjectId'
VpcConfig:
SecurityGroupIds: !Ref 'VpcSecurityGroupIds'
SubnetIds: !Ref 'VpcSubnetIds'
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']]