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
Describe the bug
ECS container service_registries doesn't work as expected.
The container_port and port for service_registries should be optional, but in the module it required the input.
I need to disable both container_port and port value from trussworks/ecs-service module main.tf and variables.tf to run terraform apply correctly.
Using
AWS CLI aws-cli/2.2.38
terraform v1.3.4
module "ecs-service" {
source = "trussworks/ecs-service/aws"
version ="6.6.0"
variable "with_optional_attribute" {
type = object({
a = string # a required attribute
b = optional(string) # an optional attribute
c = optional(number, 127) # an optional attribute with default value
})
}
Designating some of that input variable's attributes as optional would also work (see #341), but we would likely want to update the module's terraform version constraint to be >= 1.3.
I'm going to close this issue for now as there appears to be a workaround in place, but please re-open this issue if the above approach does not meet your use case.
Describe the bug
ECS container service_registries doesn't work as expected.
The container_port and port for service_registries should be optional, but in the module it required the input.
I need to disable both container_port and port value from trussworks/ecs-service module main.tf and variables.tf to run terraform apply correctly.
Using
AWS CLI aws-cli/2.2.38
terraform v1.3.4
module "ecs-service" {
source = "trussworks/ecs-service/aws"
version ="6.6.0"
main.tf
dynamic "service_registries" {
for_each = var.service_registries
content {
registry_arn = service_registries.value.registry_arn
container_name = service_registries.value.container_name
#container_port = service_registries.value.container_port
#port = service_registries.value.port
}
}
variable "service_registries" {
description = ""
type = list(object({
registry_arn = string
container_name = string
#container_port = number
#port = number
}))
default = []
}
The text was updated successfully, but these errors were encountered: