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

Commit 79aefff

Browse files
author
Christopher Hein
authored
Merge pull request #48 from christopherhein/feature/47-additional-services
Adding S3 Bucket Service Using ExternalName
2 parents c6a8e67 + 4f40351 commit 79aefff

File tree

8 files changed

+418
-9
lines changed

8 files changed

+418
-9
lines changed

cloudformation/dynamodb.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
AWSTemplateFormatVersion: 2010-09-09
2+
Description: 'AWS Operator - Amazon DynamoDB'
3+
Parameters:
4+
Namespace:
5+
Description: >-
6+
This is the namespace for the Kubernetes object.
7+
Type: String
8+
ResourceVersion:
9+
Type: String
10+
Description: >-
11+
This is the resource version for the Kubernetes object.
12+
ResourceName:
13+
Description: >-
14+
This is the resource name for the Kubernetes object
15+
Type: String
16+
ClusterName:
17+
Description: >-
18+
This is the cluster name for the operator
19+
Type: String
20+
TableName:
21+
Description: >-
22+
Must contain only lowercase letters, numbers and hyphens.
23+
Type: String
24+
HashAttributeName:
25+
Type: String
26+
Description: Name of the Hash key
27+
HashAttributeType:
28+
Type: String
29+
AllowedValues:
30+
- S
31+
- N
32+
- B
33+
Default: "S"
34+
Description: AttributeType for Hash key
35+
RangeAttributeName:
36+
Type: String
37+
Description: Name of the Range key
38+
RangeAttributeType:
39+
Type: String
40+
AllowedValues:
41+
- S
42+
- N
43+
- B
44+
Default: "S"
45+
Description: AttributeType for the Range key
46+
ReadCapacityUnits:
47+
Type: String
48+
Description: Read ReadCapacity Units
49+
Default: "5"
50+
WriteCapacityUnits:
51+
Type: String
52+
Description: Write Capacity Units
53+
Default: "5"
54+
Resources:
55+
DynamoDBTable:
56+
Type: "AWS::DynamoDB::Table"
57+
Properties:
58+
TableName: !Ref TableName
59+
KeySchema:
60+
-
61+
AttributeName: !Ref HashAttributeName
62+
KeyType: "HASH"
63+
-
64+
AttributeName: !Ref RangeAttributeName
65+
KeyType: "RANGE"
66+
AttributeDefinitions:
67+
-
68+
AttributeName: !Ref HashAttributeName
69+
AttributeType: "S"
70+
-
71+
AttributeName: !Ref RangeAttributeName
72+
AttributeType: "S"
73+
ProvisionedThroughput:
74+
ReadCapacityUnits: !Ref ReadCapacityUnits
75+
WriteCapacityUnits: !Ref WriteCapacityUnits
76+
Tags:
77+
- Key: Namespace
78+
Value: !Ref Namespace
79+
- Key: ResourceVersion
80+
Value: !Ref ResourceVersion
81+
- Key: ResourceName
82+
Value: !Ref ResourceName
83+
- Key: ClusterName
84+
Value: !Ref ClusterName
85+
- Key: Heritage
86+
Value: operator.aws
87+
Outputs:
88+
TableName:
89+
Description: Name of the DynamoDB Table
90+
Value: !Ref DynamoDBTable
91+
TableArn:
92+
Description: Arn of the DynamoDB Table
93+
Value: !GetAtt DynamoDBTable.Arn

cloudformation/s3bucket.yaml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
AWSTemplateFormatVersion: 2010-09-09
2+
Description: 'AWS Operator - Amazon S3 Bucket'
3+
Parameters:
4+
Namespace:
5+
Description: >-
6+
This is the namespace for the Kubernetes object.
7+
Type: String
8+
ResourceVersion:
9+
Type: String
10+
Description: >-
11+
This is the resource version for the Kubernetes object.
12+
ResourceName:
13+
Description: >-
14+
This is the resource name for the Kubernetes object
15+
Type: String
16+
ClusterName:
17+
Description: >-
18+
This is the cluster name for the operator
19+
Type: String
20+
BucketName:
21+
Description: >-
22+
Must contain only lowercase letters, numbers, periods (.), and hyphens
23+
(-),Cannot end in numbers
24+
Type: String
25+
Default: apps3bucket
26+
LoggingPrefix:
27+
Description: >-
28+
Must contain only lowercase letters, numbers, periods (.), and hyphens
29+
(-),Cannot end in numbers
30+
Type: String
31+
Default: Archive
32+
EnableLogging:
33+
Description: enable or discable S3 logging
34+
Type: String
35+
AllowedValues:
36+
- 'true'
37+
- 'false'
38+
Default: 'true'
39+
EnableGlacierLifeCycle:
40+
Description: enable archiving to Glacier Storage
41+
Type: String
42+
AllowedValues:
43+
- 'true'
44+
- 'false'
45+
Default: 'false'
46+
GlacierLifeCycleTransitionInDays:
47+
Description: Define how many days objects should exist before being moved to Glacier
48+
Type: String
49+
Default: '0'
50+
EnableVersioning:
51+
Description: enable versioning
52+
Type: String
53+
AllowedValues:
54+
- 'true'
55+
- 'false'
56+
Default: 'false'
57+
LifeCyclePrefix:
58+
Description: >-
59+
Must contain only lowercase letters, numbers, periods (.), and hyphens
60+
(-),Cannot end in numbers
61+
Type: String
62+
Default: Archive
63+
BucketAccessControl:
64+
Description: define if the bucket can be accessed from public or private locations
65+
Type: String
66+
AllowedValues:
67+
- Private
68+
- PublicRead
69+
- PublicReadWrite
70+
- AuthenticatedRead
71+
- LogDeliveryWrite
72+
- BucketOwnerRead
73+
- BucketOwnerFullControl
74+
- AwsExecRead
75+
Default: "Private"
76+
Mappings: {}
77+
Conditions:
78+
UseLogging: !Equals
79+
- !Ref EnableLogging
80+
- 'true'
81+
UseGlacierLifeCycle: !Equals
82+
- !Ref EnableGlacierLifeCycle
83+
- 'true'
84+
UseVersioning: !Equals
85+
- !Ref EnableVersioning
86+
- 'true'
87+
Resources:
88+
S3bucket:
89+
Type: 'AWS::S3::Bucket'
90+
Properties:
91+
BucketName: !Ref BucketName
92+
AccessControl: !Ref BucketAccessControl
93+
LifecycleConfiguration:
94+
Rules:
95+
- Id: GlacierRule
96+
Prefix: !Ref LifeCyclePrefix
97+
Status: Enabled
98+
ExpirationInDays: '365'
99+
Transitions:
100+
- TransitionInDays: !Ref GlacierLifeCycleTransitionInDays
101+
StorageClass: Glacier
102+
LoggingConfiguration: !If
103+
- UseLogging
104+
- DestinationBucketName: !Ref LoggingBucket
105+
LogFilePrefix: !Ref LoggingPrefix
106+
- !Ref 'AWS::NoValue'
107+
Tags:
108+
- Key: Namespace
109+
Value: !Ref Namespace
110+
- Key: ResourceVersion
111+
Value: !Ref ResourceVersion
112+
- Key: ResourceName
113+
Value: !Ref ResourceName
114+
- Key: ClusterName
115+
Value: !Ref ClusterName
116+
- Key: Heritage
117+
Value: operator.aws
118+
VersioningConfiguration: !If
119+
- UseVersioning
120+
- Status: Enabled
121+
- !Ref 'AWS::NoValue'
122+
DeletionPolicy: Retain
123+
LoggingBucket:
124+
Condition: UseLogging
125+
Type: 'AWS::S3::Bucket'
126+
DeletionPolicy: Retain
127+
Properties:
128+
AccessControl: LogDeliveryWrite
129+
BucketName: !Join
130+
- ''
131+
- - !Ref BucketName
132+
- logging
133+
Outputs:
134+
BucketName:
135+
Value: !Ref S3bucket
136+
Description: Name of the sample Amazon S3 bucket.
137+
BucketArn:
138+
Value: !GetAtt
139+
- S3bucket
140+
- Arn
141+
Description: Name of the Amazon S3 bucket

cloudformation/snstopic.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
AWSTemplateFormatVersion: 2010-09-09
2+
Description: 'AWS Service Broker - Amazon SNS (qs-1nt0fs93c)'
3+
Parameters:
4+
Namespace:
5+
Description: >-
6+
This is the namespace for the Kubernetes object.
7+
Type: String
8+
ResourceVersion:
9+
Type: String
10+
Description: >-
11+
This is the resource version for the Kubernetes object.
12+
ResourceName:
13+
Description: >-
14+
This is the resource name for the Kubernetes object
15+
Type: String
16+
ClusterName:
17+
Description: >-
18+
This is the cluster name for the operator
19+
Type: String
20+
DisplayName:
21+
Type: String
22+
Description: >-
23+
What should the SNS Topics name display as.
24+
Resources:
25+
SNSTopic:
26+
Type: 'AWS::SNS::Topic'
27+
28+
Outputs:
29+
TopicName:
30+
Value: !Ref SNSTopic
31+
Description: Name of the topic

0 commit comments

Comments
 (0)