Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 0784af1

Browse files
Adding Updated CloudFormation Templates
Signed-off-by: Christopher Hein <[email protected]>
1 parent 7512f2b commit 0784af1

File tree

12 files changed

+73
-26
lines changed

12 files changed

+73
-26
lines changed

cloudformation/dynamodb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: 'AWS Service Operator - Amazon DynamoDB'
2+
Description: 'AWS Service Operator - Amazon DynamoDB (aso-1otq2cgc4)'
33
Parameters:
44
Namespace:
55
Description: >-

cloudformation/ecrrepository.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: 'AWS Service Operator - Amazon ECR Repository'
2+
Description: 'AWS Service Operator - Amazon ECR Repository (aso-1otq2cgc9)'
33
Parameters:
44
Namespace:
55
Description: >-

cloudformation/s3bucket.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: 'AWS Service Operator - Amazon S3 Bucket'
2+
Description: 'AWS Service Operator - Amazon S3 Bucket (aso-1otq2cgce)'
33
Parameters:
44
Namespace:
55
Description: >-

cloudformation/snssubscription.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: 'AWS Service Operator - Amazon SNS Subscription'
2+
Description: 'AWS Service Operator - Amazon SNS Subscription (aso-1otq2cgcj)'
33
Parameters:
44
Namespace:
55
Description: >-

cloudformation/snstopic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: 'AWS Service Operator - Amazon SNS Topic'
2+
Description: 'AWS Service Operator - Amazon SNS Topic (aso-1otq2cgcp)'
33
Parameters:
44
Namespace:
55
Description: >-

cloudformation/sqsqueue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: "AWS Service Operator - Amazon SQS Queue"
2+
Description: "AWS Service Operator - Amazon SQS Queue (aso-1otq2cgcu)"
33
Parameters:
44
Namespace:
55
Type: String

examples/cloudformationtemplates/dynamodb.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data:
66
key: dynamodb.yaml
77
template: |
88
AWSTemplateFormatVersion: 2010-09-09
9-
Description: 'AWS Operator - Amazon DynamoDB'
9+
Description: 'AWS Service Operator - Amazon DynamoDB (aso-1otq2cgc4)'
1010
Parameters:
1111
Namespace:
1212
Description: >-
@@ -70,7 +70,7 @@ data:
7070
-
7171
AttributeName: !Ref RangeAttributeName
7272
KeyType: "RANGE"
73-
AttributeDefinitions:
73+
AttributeDefinitions:
7474
-
7575
AttributeName: !Ref HashAttributeName
7676
AttributeType: "S"
@@ -97,5 +97,4 @@ data:
9797
Value: !Ref DynamoDBTable
9898
TableArn:
9999
Description: Arn of the DynamoDB Table
100-
Value: !GetAtt DynamoDBTable.Arn
101-
100+
Value: !GetAtt DynamoDBTable.Arn

examples/cloudformationtemplates/ecrrepository.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data:
66
key: ecrrepository.yaml
77
template: |
88
AWSTemplateFormatVersion: 2010-09-09
9-
Description: 'AWS Operator - Amazon ECR Repository'
9+
Description: 'AWS Service Operator - Amazon ECR Repository (aso-1otq2cgc9)'
1010
Parameters:
1111
Namespace:
1212
Description: >-
@@ -40,4 +40,4 @@ data:
4040
Description: Name of the topic
4141
RepositoryARN:
4242
Value: !GetAtt ECRRepository.Arn
43-
Description: ARN of the Repository
43+
Description: ARN of the Repository

examples/cloudformationtemplates/s3bucket.yaml

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data:
66
key: s3bucket.yaml
77
template: |
88
AWSTemplateFormatVersion: 2010-09-09
9-
Description: 'AWS Operator - Amazon S3 Bucket'
9+
Description: 'AWS Service Operator - Amazon S3 Bucket (aso-1otq2cgce)'
1010
Parameters:
1111
Namespace:
1212
Description: >-
@@ -80,23 +80,46 @@ data:
8080
- BucketOwnerFullControl
8181
- AwsExecRead
8282
Default: "Private"
83+
EnableStaticSite:
84+
Description: enable static site
85+
Type: String
86+
AllowedValues:
87+
- 'true'
88+
- 'false'
89+
Default: 'false'
90+
StaticSiteIndex:
91+
Description: Index document for the S3 bucket static site
92+
Type: String
93+
Default: 'index.html'
94+
StaticSiteError:
95+
Description: Error document for the S3 bucket static site
96+
Type: String
97+
Default: "500.html"
8398
Mappings: {}
8499
Conditions:
85-
UseLogging: !Equals
100+
UseLogging: !Equals
86101
- !Ref EnableLogging
87102
- 'true'
88-
UseGlacierLifeCycle: !Equals
103+
UseGlacierLifeCycle: !Equals
89104
- !Ref EnableGlacierLifeCycle
90105
- 'true'
91-
UseVersioning: !Equals
106+
UseVersioning: !Equals
92107
- !Ref EnableVersioning
93108
- 'true'
109+
UseAsStaticSite: !Equals
110+
- !Ref EnableStaticSite
111+
- 'true'
94112
Resources:
95113
S3bucket:
96114
Type: 'AWS::S3::Bucket'
97115
Properties:
98116
BucketName: !Ref BucketName
99117
AccessControl: !Ref BucketAccessControl
118+
WebsiteConfiguration: !If
119+
- UseAsStaticSite
120+
- IndexDocument: !Ref StaticSiteIndex
121+
ErrorDocument: !Ref StaticSiteError
122+
- !Ref 'AWS::NoValue'
100123
LifecycleConfiguration:
101124
Rules:
102125
- Id: GlacierRule
@@ -106,7 +129,7 @@ data:
106129
Transitions:
107130
- TransitionInDays: !Ref GlacierLifeCycleTransitionInDays
108131
StorageClass: Glacier
109-
LoggingConfiguration: !If
132+
LoggingConfiguration: !If
110133
- UseLogging
111134
- DestinationBucketName: !Ref LoggingBucket
112135
LogFilePrefix: !Ref LoggingPrefix
@@ -122,18 +145,38 @@ data:
122145
Value: !Ref ClusterName
123146
- Key: Heritage
124147
Value: operator.aws
125-
VersioningConfiguration: !If
148+
VersioningConfiguration: !If
126149
- UseVersioning
127150
- Status: Enabled
128151
- !Ref 'AWS::NoValue'
129152
DeletionPolicy: Retain
153+
154+
WebsiteBucketPolicy:
155+
Type: AWS::S3::BucketPolicy
156+
Condition: UseAsStaticSite
157+
Properties:
158+
Bucket: !Ref S3bucket
159+
PolicyDocument:
160+
Statement:
161+
-
162+
Action:
163+
- "s3:GetObject"
164+
Effect: Allow
165+
Principal: "*"
166+
Resource: !Join:
167+
- ""
168+
-
169+
- "arn:aws:s3:::"
170+
- !Ref S3bucket
171+
- "/*
172+
130173
LoggingBucket:
131174
Condition: UseLogging
132175
Type: 'AWS::S3::Bucket'
133176
DeletionPolicy: Retain
134177
Properties:
135178
AccessControl: LogDeliveryWrite
136-
BucketName: !Join
179+
BucketName: !Join
137180
- ''
138181
- - !Ref BucketName
139182
- logging
@@ -142,7 +185,12 @@ data:
142185
Value: !Ref S3bucket
143186
Description: Name of the sample Amazon S3 bucket.
144187
BucketArn:
145-
Value: !GetAtt
188+
Value: !GetAtt
146189
- S3bucket
147190
- Arn
148191
Description: Name of the Amazon S3 bucket
192+
WebsiteURL:
193+
Value: !GetAtt
194+
- S3bucket
195+
- WebsiteURL
196+
Description: URL of the bucket that was created

examples/cloudformationtemplates/snssubscription.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data:
66
key: snssubscription.yaml
77
template: |
88
AWSTemplateFormatVersion: 2010-09-09
9-
Description: 'AWS Operator - Amazon SNS Subscription'
9+
Description: 'AWS Service Operator - Amazon SNS Subscription (aso-1otq2cgcj)'
1010
Parameters:
1111
Namespace:
1212
Description: >-
@@ -76,4 +76,4 @@ data:
7676
Outputs:
7777
SubscriptionARN:
7878
Value: !Ref SNSSubscription
79-
Description: Subscription ARN
79+
Description: Subscription ARN

0 commit comments

Comments
 (0)