Skip to content

Commit ce7ec61

Browse files
committed
Update README
1 parent 01aed41 commit ce7ec61

File tree

2 files changed

+160
-2
lines changed

2 files changed

+160
-2
lines changed

.terraform-docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ content: |-
2424
{{- end }}
2525
2626
# Examples
27-
### Basic Example
27+
### Min
2828
```hcl
2929
{{ include "examples/basic-example/main.tf" }}
3030
```
3131
32+
### Full
33+
```hcl
34+
{{ include "examples/full/main.tf" }}
35+
```
36+
3237
output:
3338
file: "README.md"
3439
mode: inject

README.md

Lines changed: 154 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This module is used to generate a container definition for use in an AWS ECS tas
9999
- data source.jq_query.main (main.tf#114)
100100

101101
# Examples
102-
### Basic Example
102+
### Min
103103
```hcl
104104
module "basic-example" {
105105
source = "../../"
@@ -108,4 +108,157 @@ module "basic-example" {
108108
image = "nginx:1.23-alpine"
109109
}
110110
```
111+
112+
### Full
113+
```hcl
114+
module "full" {
115+
source = "../../"
116+
117+
name = var.name
118+
image = "nginx:latest"
119+
essential = true
120+
121+
command = ["sleep", "1000"]
122+
entrypoint = ["/bin/sh", "-c"]
123+
user = "root"
124+
125+
interactive = false
126+
pseudo_terminal = false
127+
128+
cpu = 256
129+
memory = 512
130+
memory_reservation = 1024
131+
132+
working_directory = "/tmp"
133+
readonly_root_filesystem = true
134+
135+
port_mappings = [
136+
{
137+
container_port = 80
138+
host_port = 80
139+
protocol = "tcp"
140+
},
141+
{
142+
container_port = 443
143+
host_port = 443
144+
protocol = "tcp"
145+
}
146+
]
147+
148+
links = ["app"]
149+
mount_points = [
150+
{
151+
container_path = "/tmp"
152+
source_volume = "tmp"
153+
read_only = false
154+
}
155+
]
156+
volumes_from = {
157+
app = { read_only = true }
158+
}
159+
160+
dns_search_domains = ["example.com"]
161+
dns_servers = ["10.0.0.1"]
162+
163+
hostname = "nginx"
164+
extra_hosts = {
165+
"local.host" = "127.0.0.1"
166+
"loopback" = "127.0.0.1"
167+
}
168+
169+
privileged = true
170+
disable_networking = false
171+
ulimits = {
172+
nofile = {
173+
soft_limit = 1024
174+
hard_limit = 2048
175+
}
176+
nproc = {
177+
soft_limit = 1024
178+
hard_limit = 2048
179+
}
180+
}
181+
182+
docker_security_options = ["label:type:container_t"]
183+
system_controls = {
184+
"net.ipv4.tcp_syncookies" = 1
185+
"net.core.somaxconn" = 1024
186+
}
187+
188+
linux_parameters = {
189+
init_process_enabled = true
190+
191+
shared_memory_size = 1024
192+
max_swap = 1024
193+
swappiness = 50
194+
195+
capabilities = {
196+
add = ["SYS_TIME"]
197+
drop = ["MKNOD"]
198+
}
199+
200+
devices = [
201+
{
202+
host_path = "/dev/null"
203+
container_path = "/dev/null"
204+
permissions = ["read", "write"]
205+
}
206+
]
207+
208+
tmpfs = [
209+
{
210+
size = 1024
211+
container_path = "/tmp"
212+
mount_options = ["rw", "noexec", "nosuid", "nodev"]
213+
}
214+
]
215+
}
216+
217+
environment_files = ["s3://bucket/key/to/file.env"]
218+
environment = {
219+
APP_ENV = "dev"
220+
APP_DEBUG = false
221+
}
222+
223+
secrets = {
224+
DATABASE_USER = "arn:aws:ssm:us-east-1:awsExampleAccountID:parameter/awsExampleParameter:DB_PASS::"
225+
APP_SECRET = "arn:aws:ssm:us-east-1:awsExampleAccountID:parameter/awsExampleParameter:APP_SECRET::"
226+
}
227+
228+
docker_labels = {
229+
"com.example.foo" = "bar"
230+
"com.example.baz" = "qux"
231+
}
232+
233+
start_timeout = 60
234+
stop_timeout = 60
235+
depend_on = {
236+
redis = "HEALTHY"
237+
}
238+
healthcheck = {
239+
command = ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
240+
interval = 30
241+
retries = 3
242+
start_period = 0
243+
timeout = 5
244+
}
245+
246+
resource_requirements = {
247+
GPU = 256
248+
InferenceAccelerator = "eia1.medium"
249+
}
250+
251+
repository_credentials = "arn:aws:ssm:us-east-1:awsExampleAccountID:parameter/awsExampleParameter"
252+
253+
log_configuration = {
254+
log_driver = "awsfirelens"
255+
options = {
256+
endpoint = "https://example.com"
257+
}
258+
secret_options = {
259+
apiKey = "arn:aws:ssm:us-east-1:awsExampleAccountID:parameter/awsExampleParameter:apiKey::"
260+
}
261+
}
262+
}
263+
```
111264
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)