Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EFS transit encryption and authorization config options for ECS task definition #13136

Merged
merged 23 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a2e0a3e
Update ECS task def resource schema
jukie May 2, 2020
384fb86
Update EFS volume config to account for transit encryption
jukie May 2, 2020
ecd240d
Update acceptance tests to use transit encryption
jukie May 2, 2020
3fdfdfb
Update website docs for EFS volume config options
jukie May 2, 2020
8a69551
"Update acceptance tests to use transit encryption"
jukie May 3, 2020
9cc8178
Merge remote-tracking branch 'upstream/master' into 12809-efs-vol-conf
jukie May 20, 2020
69b738b
Add EFS Access Point config schema and tests
jukie May 20, 2020
4d1ac27
Use bool values intsead
jukie May 20, 2020
98edb56
Add docs for authorization config
jukie May 20, 2020
c8bdc0e
Apply linting and remove extraneous change
jukie May 20, 2020
eb2c35f
Better align schema keys with api names
jukie Jun 10, 2020
ad54a93
Merge remote-tracking branch 'upstream/master' into 12809-efs-vol-conf
jukie Jun 10, 2020
3a8a596
Add new schemas to volume hash
jukie Jun 10, 2020
ff3457a
Update tests and fix encryption port
jukie Jun 10, 2020
fd9d5a8
Remove default root directory path and fix auth config hash
jukie Jun 10, 2020
099a608
Update website/docs/r/ecs_task_definition.html.markdown
jukie Jun 10, 2020
db5d4d4
Update website/docs/r/ecs_task_definition.html.markdown
jukie Jun 10, 2020
aa20722
Update website/docs/r/ecs_task_definition.html.markdown
jukie Jun 10, 2020
a6b19f4
Apply suggestions from code review
jukie Jun 10, 2020
e676776
Ignore root_directory if authorization_config is used
jukie Jun 10, 2020
68a9800
Add validator functions for EFSAuthorizationConfigIAM and EFSTransitE…
jukie Jun 11, 2020
4c5c6e4
Fix typo in function name
jukie Jun 11, 2020
b18cda5
Rebase from master
jukie Jun 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply linting and remove extraneous change
  • Loading branch information
jukie committed May 20, 2020
commit c8bdc0e21a2a49c052db35edd3806fed55c1a0e3
8 changes: 4 additions & 4 deletions aws/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ func expandEcsVolumes(configured []interface{}) ([]*ecs.Volume, error) {
}

if v, ok := config["transit_encryption"].(bool); ok {
if v == true {
if v {
l.EfsVolumeConfiguration.TransitEncryption = aws.String("ENABLED")
} else if v == false {
} else if !v {
l.EfsVolumeConfiguration.TransitEncryption = aws.String("DISABLED")
}
}
Expand All @@ -179,9 +179,9 @@ func expandEcsVolumes(configured []interface{}) ([]*ecs.Volume, error) {
}

if subV, ok := v["iam_enabled"].(bool); ok {
if subV == true {
if subV {
l.EfsVolumeConfiguration.AuthorizationConfig.Iam = aws.String("ENABLED")
} else if subV == false {
} else if !subV {
l.EfsVolumeConfiguration.AuthorizationConfig.Iam = aws.String("DISABLED")
}
}
Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/ecs_task_definition.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ For more information, see [Specifying an EFS volume in your Task Definition Deve
* `authorization_config` - (Optional) The authorization configuration details for the Amazon EFS file system.
* `access_point_id` - The access point ID to use. If an access point is specified, the root directory value will be relative to the directory set for the access point. If specified, transit encryption must be enabled in the EFSVolumeConfiguration.
* `iam_enabled` - Boolean for whether or not to use the Amazon ECS task IAM role defined in a task definition when mounting the Amazon EFS file system. If enabled, transit encryption must be enabled in the EFSVolumeConfiguration.
jukie marked this conversation as resolved.
Show resolved Hide resolved

##### Example Usage

```hcl
Expand All @@ -185,7 +186,7 @@ resource "aws_ecs_task_definition" "service" {
transit_encryption_port = 2999
authorization_config {
access_point_id = "${aws_efs_access_point.test.id}"
jukie marked this conversation as resolved.
Show resolved Hide resolved
iam_enabled = true
iam_enabled = true
jukie marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/waf_sql_injection_match_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ AWS WAF SQL Injection Match Set can be imported using their ID, e.g.

```
$ terraform import aws_waf_sql_injection_match_set.example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
```
```