-
Notifications
You must be signed in to change notification settings - Fork 0
/
support.yaml
47 lines (44 loc) · 1.13 KB
/
support.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
39
40
41
42
43
44
45
46
47
AWSTemplateFormatVersion: 2010-09-09
Description: Template for expense app support resources
Parameters:
Stage:
Type: String
Description: Deployment environment (e.g., dev, test, or prod)
AllowedValues:
- dev
- test
- prod
Conditions:
ProdDeployment: !Equals
- !Ref Stage
- prod
Resources:
deployments:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: !If
- ProdDeployment
- case-consulting-expense-app-deployments-prod
- !Join
- ''
- - case-expense-app-deployments-
- !Ref Stage
LifecycleConfiguration:
Rules:
- Id: Remove previous deployment versions
ExpirationInDays: 60
Status: Enabled
LoggingConfiguration:
DestinationBucketName: !If
- ProdDeployment
- case-consulting-expense-app-logs-prod
- !Join
- ''
- - case-expense-app-logs-
- !Ref Stage
LogFilePrefix: s3-logs/deployments/
Tags:
- Key: Application
Value: expense-app
- Key: Stage
Value: !Ref Stage