Skip to content

Commit 3d9f947

Browse files
committed
align with current AWS default types
1 parent a0d159c commit 3d9f947

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
- id: terraform_docs
44
- id: terraform_fmt
55
repo: https://github.com/antonbabenko/pre-commit-terraform.git
6-
rev: v1.11.0
6+
rev: v1.14.0
77

88
- hooks:
99
- id: go-fmt

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ Invoking the commands defined below creates an ECS task definition with the foll
6464
[
6565
{
6666
"command": null,
67-
"cpu": null,
67+
"cpu": 256,
6868
"disableNetworking": false,
6969
"dnsSearchDomains": null,
7070
"dnsServers": null,
7171
"dockerLabels": null,
7272
"dockerSecurityOptions": null,
7373
"entryPoint": null,
74-
"environment": null,
74+
"environment": [],
7575
"essential": true,
7676
"extraHosts": null,
7777
"healthCheck": null,
@@ -84,7 +84,7 @@ Invoking the commands defined below creates an ECS task definition with the foll
8484
"firelensConfiguration": null,
8585
"memory": 512,
8686
"memoryReservation": null,
87-
"mountPoints": null,
87+
"mountPoints": [],
8888
"name": "mongo",
8989
"portMappings": [{"containerPort":27017}],
9090
"privileged": false,
@@ -96,7 +96,7 @@ Invoking the commands defined below creates an ECS task definition with the foll
9696
"systemControls": null,
9797
"ulimits": null,
9898
"user": null,
99-
"volumesFrom": null,
99+
"volumesFrom": [],
100100
"workingDirectory": null
101101
}
102102
]

main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ data "template_file" "container_definition" {
9393

9494
vars = {
9595
command = local.command == "[]" ? "null" : local.command
96-
cpu = var.cpu == 0 ? "null" : var.cpu
96+
cpu = var.cpu
9797
disableNetworking = var.disableNetworking ? true : false
9898
dnsSearchDomains = local.dnsSearchDomains == "[]" ? "null" : local.dnsSearchDomains
9999
dnsServers = local.dnsServers == "[]" ? "null" : local.dnsServers
100100
dockerLabels = local.dockerLabels == "{}" ? "null" : local.dockerLabels
101101
dockerSecurityOptions = local.dockerSecurityOptions == "[]" ? "null" : local.dockerSecurityOptions
102102
entryPoint = local.entryPoint == "[]" ? "null" : local.entryPoint
103-
environment = local.environment == "[]" ? "null" : local.environment
103+
environment = local.environment == "[]" ? "[]" : local.environment
104104
essential = var.essential ? true : false
105105
extraHosts = local.extraHosts == "[]" ? "null" : local.extraHosts
106106
healthCheck = local.healthCheck == "{}" ? "null" : local.healthCheck
@@ -113,9 +113,9 @@ data "template_file" "container_definition" {
113113
firelensConfiguration = local.firelensConfiguration == "{}" ? "null" : local.firelensConfiguration
114114
memory = var.memory == 0 ? "null" : var.memory
115115
memoryReservation = var.memoryReservation == 0 ? "null" : var.memoryReservation
116-
mountPoints = local.mountPoints == "[]" ? "null" : local.mountPoints
116+
mountPoints = local.mountPoints == "[]" ? "[]" : local.mountPoints
117117
name = var.name == "" ? "null" : var.name
118-
portMappings = local.portMappings == "[]" ? "null" : local.portMappings
118+
portMappings = local.portMappings == "[]" ? "[]" : local.portMappings
119119
privileged = var.privileged ? true : false
120120
pseudoTerminal = var.pseudoTerminal ? true : false
121121
readonlyRootFilesystem = var.readonlyRootFilesystem ? true : false
@@ -125,7 +125,7 @@ data "template_file" "container_definition" {
125125
systemControls = local.systemControls == "[]" ? "null" : local.systemControls
126126
ulimits = local.ulimits == "[]" ? "null" : local.ulimits
127127
user = var.user == "" ? "null" : var.user
128-
volumesFrom = local.volumesFrom == "[]" ? "null" : local.volumesFrom
128+
volumesFrom = local.volumesFrom == "[]" ? "[]" : local.volumesFrom
129129
workingDirectory = var.workingDirectory == "" ? "null" : var.workingDirectory
130130
}
131131
}

0 commit comments

Comments
 (0)