Skip to content

Commit 213c80b

Browse files
Enable private IP by default (#37)
* Enable private IP by default Co-authored-by: sahir-khan <[email protected]> * Add var to README docs and add EOF line Co-authored-by: sahir-khan <[email protected]>
1 parent 7f899b1 commit 213c80b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

modules/metadata-service/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ If the `access_list_cidr_blocks` variable is set, only traffic originating from
3636
| <a name="input_subnet1_id"></a> [subnet1\_id](#input\_subnet1\_id) | First private subnet used for availability zone redundancy | `string` | n/a | yes |
3737
| <a name="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id) | Second private subnet used for availability zone redundancy | `string` | n/a | yes |
3838
| <a name="input_vpc_cidr_blocks"></a> [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications | `list(string)` | n/a | yes |
39+
| <a name="input_with_public_ip"></a> [with\_public\_ip](#input\_with\_public\_ip) | Enable private IP by default | `bool` | `false` | no |
3940

4041
## Outputs
4142

modules/metadata-service/ecs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ resource "aws_ecs_service" "this" {
7474

7575
network_configuration {
7676
security_groups = [aws_security_group.metadata_service_security_group.id]
77-
assign_public_ip = true
77+
assign_public_ip = var.with_public_ip
7878
subnets = [var.subnet1_id, var.subnet2_id]
7979
}
8080

modules/metadata-service/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,9 @@ variable "vpc_cidr_blocks" {
109109
type = list(string)
110110
description = "The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications"
111111
}
112+
113+
variable "with_public_ip" {
114+
type = bool
115+
default = false
116+
description = "Enable private IP by default"
117+
}

0 commit comments

Comments
 (0)