Skip to content

Commit

Permalink
Update deployment tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Oct 29, 2019
1 parent e7a0ed6 commit 4224a75
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ provider:
RDS_USERNAME: ${env:RDS_USERNAME}
RDS_PASSWORD: ${env:RDS_PASSWORD}
SNS_EMAIL: ${env:SNS_EMAIL}
tags:
project: chi-bill-bot
iamRoleStatements:
- Effect: Allow
Action:
Expand All @@ -31,7 +33,7 @@ plugins:
- serverless-plugin-aws-alerts

custom:
topicName: ${self:service}-prod-events
topicName: ${self:service}-${self:provider.stage}-events
AURORA:
DB_NAME: ${env:RDS_DB_NAME}
USERNAME: ${env:RDS_USERNAME}
Expand All @@ -48,7 +50,7 @@ custom:
- functionErrors
topics:
alarm:
topic: ${self:service}-prod-alerts-alarm
topic: ${self:service}-${self:provider.stage}-alerts-alarm
notifications:
- protocol: email
endpoint: ${env:SNS_EMAIL}
Expand Down Expand Up @@ -182,8 +184,11 @@ resources:
SNSTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: ${self:service}-prod-events
TopicName: ${self:service}-${self:provider.stage}-events
DisplayName: ChiBillBotEvents
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
SNSVPCEndpoint:
Type: AWS::EC2::VPCEndpoint
DependsOn: SNSTopic
Expand Down Expand Up @@ -214,6 +219,9 @@ resources:
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
ServerlessSubnetA:
DependsOn: ServerlessVPC
Type: AWS::EC2::Subnet
Expand All @@ -222,6 +230,9 @@ resources:
Ref: ServerlessVPC
AvailabilityZone: ${self:provider.region}a
CidrBlock: '${self:custom.AURORA.VPC_CIDR}.0.0.0/24'
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
ServerlessSubnetB:
DependsOn: ServerlessVPC
Type: AWS::EC2::Subnet
Expand All @@ -230,6 +241,9 @@ resources:
Ref: ServerlessVPC
AvailabilityZone: ${self:provider.region}b
CidrBlock: '${self:custom.AURORA.VPC_CIDR}.0.1.0/24'
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
ServerlessSubnetC:
DependsOn: ServerlessVPC
Type: AWS::EC2::Subnet
Expand All @@ -238,6 +252,9 @@ resources:
Ref: ServerlessVPC
AvailabilityZone: ${self:provider.region}c
CidrBlock: '${self:custom.AURORA.VPC_CIDR}.0.2.0/24'
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
AuroraSubnetGroup:
Type: AWS::RDS::DBSubnetGroup
Properties:
Expand All @@ -246,6 +263,9 @@ resources:
- Ref: ServerlessSubnetA
- Ref: ServerlessSubnetB
- Ref: ServerlessSubnetC
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}
AuroraRDSCluster:
Type: "AWS::RDS::DBCluster"
Properties:
Expand All @@ -260,3 +280,6 @@ resources:
BackupRetentionPeriod: 3
VpcSecurityGroupIds:
- Fn::GetAtt: ServerlessVPC.DefaultSecurityGroup
Tags:
- Key: project
Value: ${self:service}-${self:provider.stage}

0 comments on commit 4224a75

Please sign in to comment.