File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ override.tf.json
28
28
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
29
29
# example: *tfplan*
30
30
.DS_Store
31
+ .dccache
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ No requirements.
18
18
| query\_ cache\_ ttl\_\_ milli\_ second | Time after which item query will invalidate. Default 5 minutes | ` number ` | ` 300000 ` | no |
19
19
| region | n/a | ` string ` | n/a | yes |
20
20
| replication\_ factor | (Required) The number of nodes in the DAX cluster | ` number ` | ` 3 ` | no |
21
+ | security_group_ids | The list of Security Group IDs to be associated with the DAX cluster | ` list(string) ` | n/a | yes |
21
22
| tables | List of tables for using dax | ` list(string) ` | n/a | yes |
22
23
| tags | A map of tags to assign to the resource | ` any ` | n/a | yes |
23
24
| vpc\_ id | n/a | ` string ` | n/a | yes |
@@ -53,6 +54,10 @@ module "my_dax" {
53
54
replication_factor = 3
54
55
query_cache_ttl__milli_second = 30 * 1000
55
56
item_cache_ttl_milli_second = 30 * 60 * 1000
57
+ security_group_ids = [
58
+ "sg-123456789",
59
+ "sg-987654321"
60
+ ]
56
61
tables = [
57
62
"table1",
58
63
"table2"
Original file line number Diff line number Diff line change @@ -44,16 +44,16 @@ data "aws_iam_policy_document" "document" {
44
44
statement {
45
45
effect = " Allow"
46
46
actions = [
47
+ " dynamodb:BatchGetItem" ,
48
+ " dynamodb:BatchWriteItem" ,
49
+ " dynamodb:ConditionCheckItem" ,
50
+ " dynamodb:DeleteItem" ,
47
51
" dynamodb:DescribeTable" ,
48
- " dynamodb:PutItem" ,
49
52
" dynamodb:GetItem" ,
50
- " dynamodb:UpdateItem" ,
51
- " dynamodb:DeleteItem" ,
53
+ " dynamodb:PutItem" ,
52
54
" dynamodb:Query" ,
53
55
" dynamodb:Scan" ,
54
- " dynamodb:BatchGetItem" ,
55
- " dynamodb:BatchWriteItem" ,
56
- " dynamodb:ConditionCheckItem"
56
+ " dynamodb:UpdateItem"
57
57
]
58
58
resources = flatten (local. table_arns )
59
59
}
@@ -95,6 +95,7 @@ resource "aws_dax_cluster" "cluster" {
95
95
node_type = var. node_type
96
96
replication_factor = var. replication_factor
97
97
parameter_group_name = aws_dax_parameter_group. group . name
98
+ security_group_ids = var. security_group_ids
98
99
subnet_group_name = aws_dax_subnet_group. subnet_group . id
99
100
server_side_encryption {
100
101
enabled = true
Original file line number Diff line number Diff line change @@ -40,3 +40,8 @@ variable "query_cache_ttl__milli_second" {
40
40
default = 300000
41
41
description = " Time after which query cache will invalidate. Default 5 minutes"
42
42
}
43
+
44
+ variable "security_group_ids" {
45
+ type = list (string )
46
+ description = " (Required) One or more VPC security groups associated with the cluster"
47
+ }
You can’t perform that action at this time.
0 commit comments