Skip to content

Commit 2354bb2

Browse files
committed
chore: Add variable to enable/disable writing container definition to file
1 parent 0212fa6 commit 2354bb2

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

examples/container-definition/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ Note that this example may create resources which will incur monetary charges on
4545

4646
## Inputs
4747

48-
No inputs.
48+
| Name | Description | Type | Default | Required |
49+
|------|-------------|------|---------|:--------:|
50+
| <a name="input_write_container_definition_to_file"></a> [write\_container\_definition\_to\_file](#input\_write\_container\_definition\_to\_file) | Determines whether the container definition JSON should be written to a file. Used for debugging and checking diffs | `bool` | `true` | no |
4951

5052
## Outputs
5153

examples/container-definition/outputs.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ output "container_definition_json" {
1313
}
1414

1515
resource "null_resource" "container_definition_json" {
16+
count = var.write_container_definition_to_file ? 1 : 0
17+
1618
triggers = {
1719
container_definition_json = timestamp()
1820
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
variable "write_container_definition_to_file" {
2+
description = "Determines whether the container definition JSON should be written to a file. Used for debugging and checking diffs"
3+
type = bool
4+
default = true
5+
}

0 commit comments

Comments
 (0)