Skip to content

Commit 1703405

Browse files
committed
1 parent ab18a6d commit 1703405

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module "fck-nat" {
8383
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | Instance type to use for the NAT instance | `string` | `"t4g.micro"` | no |
8484
| <a name="input_kms_key_id"></a> [kms\_key\_id](#input\_kms\_key\_id) | Will use the provided KMS key ID to encrypt the EBS volume. Uses the default KMS key if none provided | `string` | `null` | no |
8585
| <a name="input_name"></a> [name](#input\_name) | Name used for resources created within the module | `string` | n/a | yes |
86+
| <a name="input_propagated_tags"></a> [propagated\_tags](#input\_propagated\_tags) | Tags to propagate to the launched NAT instance(s) | `map(string)` | `{}` | no |
8687
| <a name="input_route_table_id"></a> [route\_table\_id](#input\_route\_table\_id) | Deprecated. Use route\_tables\_ids instead | `string` | `null` | no |
8788
| <a name="input_route_tables_ids"></a> [route\_tables\_ids](#input\_route\_tables\_ids) | Route tables to update. Only valid if update\_route\_tables is true | `map(string)` | `{}` | no |
8889
| <a name="input_ssh_cidr_blocks"></a> [ssh\_cidr\_blocks](#input\_ssh\_cidr\_blocks) | CIDR blocks to allow SSH access to the NAT instance from | <pre>object({<br/> ipv4 = optional(list(string), [])<br/> ipv6 = optional(list(string), [])<br/> })</pre> | <pre>{<br/> "ipv4": [],<br/> "ipv6": []<br/>}</pre> | no |

asg.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ resource "aws_autoscaling_group" "main" {
3333
}
3434
}
3535

36+
dynamic "tag" {
37+
for_each = var.propagated_tags
38+
39+
content {
40+
key = tag.key
41+
value = tag.value
42+
propagate_at_launch = true
43+
}
44+
}
45+
3646
enabled_metrics = [
3747
"GroupMinSize",
3848
"GroupMaxSize",

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,10 @@ variable "tags" {
157157
description = "Tags to apply to resources created within the module"
158158
type = map(string)
159159
default = {}
160+
}
161+
162+
variable "propagated_tags" {
163+
description = "Tags to propagate to the launched NAT instance(s)"
164+
type = map(string)
165+
default = {}
160166
}

0 commit comments

Comments
 (0)