This repository was archived by the owner on Nov 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathdynamodb.yaml
93 lines (93 loc) · 2.39 KB
/
dynamodb.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
AWSTemplateFormatVersion: 2010-09-09
Description: 'AWS Service Operator - Amazon DynamoDB (aso-1otq2cgc4)'
Parameters:
Namespace:
Description: >-
This is the namespace for the Kubernetes object.
Type: String
ResourceVersion:
Type: String
Description: >-
This is the resource version for the Kubernetes object.
ResourceName:
Description: >-
This is the resource name for the Kubernetes object
Type: String
ClusterName:
Description: >-
This is the cluster name for the operator
Type: String
TableName:
Description: >-
Must contain only lowercase letters, numbers and hyphens.
Type: String
HashAttributeName:
Type: String
Description: Name of the Hash key
HashAttributeType:
Type: String
AllowedValues:
- S
- N
- B
Default: "S"
Description: AttributeType for Hash key
RangeAttributeName:
Type: String
Description: Name of the Range key
RangeAttributeType:
Type: String
AllowedValues:
- S
- N
- B
Default: "S"
Description: AttributeType for the Range key
ReadCapacityUnits:
Type: String
Description: Read ReadCapacity Units
Default: "5"
WriteCapacityUnits:
Type: String
Description: Write Capacity Units
Default: "5"
Resources:
DynamoDBTable:
Type: "AWS::DynamoDB::Table"
Properties:
TableName: !Ref TableName
KeySchema:
-
AttributeName: !Ref HashAttributeName
KeyType: "HASH"
-
AttributeName: !Ref RangeAttributeName
KeyType: "RANGE"
AttributeDefinitions:
-
AttributeName: !Ref HashAttributeName
AttributeType: "S"
-
AttributeName: !Ref RangeAttributeName
AttributeType: "S"
ProvisionedThroughput:
ReadCapacityUnits: !Ref ReadCapacityUnits
WriteCapacityUnits: !Ref WriteCapacityUnits
Tags:
- Key: Namespace
Value: !Ref Namespace
- Key: ResourceVersion
Value: !Ref ResourceVersion
- Key: ResourceName
Value: !Ref ResourceName
- Key: ClusterName
Value: !Ref ClusterName
- Key: Heritage
Value: operator.aws
Outputs:
TableName:
Description: Name of the DynamoDB Table
Value: !Ref DynamoDBTable
TableArn:
Description: Arn of the DynamoDB Table
Value: !GetAtt DynamoDBTable.Arn