diff --git a/README.md b/README.md index 3169c1b..5181fb7 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,6 @@ We highly recommend that in your code you pin the version to the exact version y using so that your infrastructure remains stable, and update versions in a systematic way so that they do not catch you by surprise. -Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)), -the registry shows many of our inputs as required when in fact they are optional. -The table below correctly indicates which inputs are required. - For a complete example, see [examples/complete](examples/complete). @@ -233,6 +229,7 @@ Available targets: | Name | Source | Version | |------|--------|---------| +| [target\_group](#module\_target\_group) | cloudposse/label/null | 0.25.0 | | [this](#module\_this) | cloudposse/label/null | 0.25.0 | ## Resources diff --git a/docs/terraform.md b/docs/terraform.md index 123b39a..99e9741 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -16,6 +16,7 @@ | Name | Source | Version | |------|--------|---------| +| [target\_group](#module\_target\_group) | cloudposse/label/null | 0.25.0 | | [this](#module\_this) | cloudposse/label/null | 0.25.0 | ## Resources diff --git a/main.tf b/main.tf index 5d9b9d2..bfde7e4 100644 --- a/main.tf +++ b/main.tf @@ -8,10 +8,17 @@ data "aws_lb_target_group" "default" { arn = local.target_group_arn } +module "target_group" { + source = "cloudposse/label/null" + version = "0.25.0" + id_length_limit = 32 + context = module.this.context +} + resource "aws_lb_target_group" "default" { count = module.this.enabled && var.default_target_group_enabled ? 1 : 0 - name = coalesce(var.target_group_name, module.this.id) + name = coalesce(var.target_group_name, module.target_group.id) port = var.port protocol = var.protocol protocol_version = var.protocol_version