You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in VPC module, inside options variable object, there is a map_public_ip_on_launch property, which controls assignment of public Ipv4 address when launching resources in the given subnet(s). The module does not give an option to specify this setting at subnet level, e.g. as a property in a subnets variable.
Currently it's not possible to deploy public and private subnets, where public subnets would have public IP assignment enabled and private subnets would have the same option disabled. You can either deploy all subnets with this setting enabled or not.
resource"aws_subnet""this" {
for_each={ fork, vinvar.subnets:k=>vifv.create_subnet }
<redacted for brevity>map_public_ip_on_launch=var.options.map_public_ip_on_launch<redacted for brevity>
}
This option should be probably moved to the subnets variable, like so:
resource"aws_subnet""this" {
for_each={ fork, vinvar.subnets:k=>vifv.create_subnet }
<redacted for brevity>map_public_ip_on_launch=each.value.map_public_ip_on_launch<redacted for brevity>
}
Another possibility could be to keep the option in the VPC in order to provide a global setting, which could then be overwritten by a subnet-level configuration
Module Version
v3.0.0-rc.1
Terraform version
Terraform v1.10.0 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v5.17.0
Expected behavior
Ability to specify public IP auto-assignment at subnet-level
Current behavior
You have to either enable to disable public IP auto-assignment at VPC level for all of the declared subnets
Anything else to add?
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Bug description
in VPC module, inside
options
variable object, there is amap_public_ip_on_launch
property, which controls assignment of public Ipv4 address when launching resources in the given subnet(s). The module does not give an option to specify this setting at subnet level, e.g. as a property in asubnets
variable.Currently it's not possible to deploy public and private subnets, where public subnets would have public IP assignment enabled and private subnets would have the same option disabled. You can either deploy all subnets with this setting enabled or not.
This option should be probably moved to the
subnets
variable, like so:Another possibility could be to keep the option in the VPC in order to provide a global setting, which could then be overwritten by a subnet-level configuration
Module Version
v3.0.0-rc.1
Terraform version
Terraform v1.10.0 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v5.17.0
Expected behavior
Ability to specify public IP auto-assignment at subnet-level
Current behavior
You have to either enable to disable public IP auto-assignment at VPC level for all of the declared subnets
Anything else to add?
No response
The text was updated successfully, but these errors were encountered: