-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Labels
Description
For this VPC module, there's a discrepancy for the actual implementation of the inputs on Github and the API response of the Terraform registry.
Terraform Registry response:
{
"id": "terraform-aws-modules/vpc/aws/2.33.0",
"owner": "antonbabenko",
"namespace": "terraform-aws-modules",
"name": "vpc",
"version": "2.33.0",
"provider": "aws",
"...": "...",
"inputs": [
{
"...": "..."
},
{
"name": "redshift_subnet_assign_ipv6_address_on_creation",
"type": "bool",
"description": "Assign IPv6 address on redshift subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map_public_ip_on_launch",
"default": "",
"required": true
},
{
"...": "..."
}
]
}Actual implementation
variable "redshift_subnet_assign_ipv6_address_on_creation" {
description = "Assign IPv6 address on redshift subnet, must be disabled to change IPv6 CIDRs. This is the IPv6 equivalent of map_public_ip_on_launch"
type = bool
default = null
}According to this blog post, the input should be optional when the default is set to null. Likely a bug in the Terraform Registry?
This affects all inputs where the default is null (12 in this module). The effect is, that those variables are rendered as required attributes, and the Typescript compiler expects them to be set.
I wonder if it's safe to assume that a default of "" (empty string) makes a variable always optional and we could ignore the required flag in those cases. Thoughts?