File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ module "ecs_apps" {
94
94
| certificate\_ internal\_ arn | certificate arn for internal ALB. | ` string ` | ` "" ` | no |
95
95
| create\_ efs | Enables creation of EFS volume for cluster | ` bool ` | ` true ` | no |
96
96
| create\_ iam\_ service\_ linked\_ role | Create iam\_ service\_ linked\_ role for ECS or not. | ` bool ` | ` false ` | no |
97
+ | ebs\_ key\_ arn | ARN of a KMS Key to use on EBS volumes | ` string ` | ` "" ` | no |
97
98
| ec2\_ key\_ enabled | Generate a SSH private key and include in launch template of ECS nodes | ` bool ` | ` false ` | no |
99
+ | efs\_ key\_ arn | ARN of a KMS Key to use on EFS volumes | ` string ` | ` "" ` | no |
98
100
| efs\_ lifecycle\_ transition\_ to\_ ia | Option to enable EFS Lifecycle Transaction to IA | ` string ` | ` "" ` | no |
99
101
| efs\_ lifecycle\_ transition\_ to\_ primary\_ storage\_ class | Option to enable EFS Lifecycle Transaction to Primary Storage Class | ` bool ` | ` false ` | no |
100
102
| enable\_ schedule | Enables schedule to shut down and start up instances outside business hours. | ` bool ` | ` false ` | no |
@@ -103,7 +105,6 @@ module "ecs_apps" {
103
105
| instance\_ types | Instance type for ECS workers | ` list(any) ` | ` [] ` | no |
104
106
| instance\_ volume\_ size | Volume size for docker volume (in GB). | ` number ` | ` 30 ` | no |
105
107
| instance\_ volume\_ size\_ root | Volume size for root volume (in GB). | ` number ` | ` 16 ` | no |
106
- | kms\_ key\_ arn | ARN of a KMS Key to use on EFS and EBS volumes | ` string ` | ` "" ` | no |
107
108
| lb\_ access\_ logs\_ bucket | Bucket to store logs from lb access. | ` string ` | ` "" ` | no |
108
109
| lb\_ access\_ logs\_ prefix | Bucket prefix to store lb access logs. | ` string ` | ` "" ` | no |
109
110
| name | Name of this ECS cluster. | ` any ` | n/a | yes |
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ data "aws_kms_key" "ebs" {
32
32
key_id = " alias/aws/ebs"
33
33
}
34
34
35
+ data "aws_kms_key" "efs" {
36
+ key_id = " alias/aws/elasticfilesystem"
37
+ }
38
+
35
39
data "aws_ec2_managed_prefix_list" "s3" {
36
40
name = " com.amazonaws.${ data . aws_region . current . name } .s3"
37
41
}
Original file line number Diff line number Diff line change @@ -267,9 +267,15 @@ variable "alarm_prefix" {
267
267
default = " alarm"
268
268
}
269
269
270
- variable "kms_key_arn " {
270
+ variable "ebs_key_arn " {
271
271
type = string
272
- description = " ARN of a KMS Key to use on EFS and EBS volumes"
272
+ description = " ARN of a KMS Key to use on EBS volumes"
273
+ default = " "
274
+ }
275
+
276
+ variable "efs_key_arn" {
277
+ type = string
278
+ description = " ARN of a KMS Key to use on EFS volumes"
273
279
default = " "
274
280
}
275
281
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ resource "aws_launch_template" "ecs" {
25
25
ebs {
26
26
volume_size = var. instance_volume_size
27
27
encrypted = true
28
- kms_key_id = var. kms_key_arn != " " ? var. kms_key_arn : null
28
+ kms_key_id = var. ebs_key_arn != " " ? var. ebs_key_arn : null
29
29
}
30
30
}
31
31
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ resource "aws_efs_file_system" "ecs" {
2
2
count = var. create_efs ? 1 : 0
3
3
creation_token = " ecs-${ var . name } "
4
4
encrypted = true
5
- kms_key_id = var. kms_key_arn != " " ? var. kms_key_arn : null
5
+ kms_key_id = var. efs_key_arn != " " ? var. efs_key_arn : null
6
6
7
7
throughput_mode = var. throughput_mode
8
8
provisioned_throughput_in_mibps = var. provisioned_throughput_in_mibps
You can’t perform that action at this time.
0 commit comments