Skip to content

Commit 0f8ef73

Browse files
Fix target group length (#74)
* Fix target group length * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix readme * Fix context source * Rebuild README --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 6e32f47 commit 0f8ef73

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ We highly recommend that in your code you pin the version to the exact version y
9090
using so that your infrastructure remains stable, and update versions in a
9191
systematic way so that they do not catch you by surprise.
9292

93-
Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),
94-
the registry shows many of our inputs as required when in fact they are optional.
95-
The table below correctly indicates which inputs are required.
96-
9793

9894
For a complete example, see [examples/complete](examples/complete).
9995

@@ -233,6 +229,7 @@ Available targets:
233229

234230
| Name | Source | Version |
235231
|------|--------|---------|
232+
| <a name="module_target_group"></a> [target\_group](#module\_target\_group) | cloudposse/label/null | 0.25.0 |
236233
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |
237234

238235
## Resources

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
| Name | Source | Version |
1818
|------|--------|---------|
19+
| <a name="module_target_group"></a> [target\_group](#module\_target\_group) | cloudposse/label/null | 0.25.0 |
1920
| <a name="module_this"></a> [this](#module\_this) | cloudposse/label/null | 0.25.0 |
2021

2122
## Resources

main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ data "aws_lb_target_group" "default" {
88
arn = local.target_group_arn
99
}
1010

11+
module "target_group" {
12+
source = "cloudposse/label/null"
13+
version = "0.25.0"
14+
id_length_limit = 32
15+
context = module.this.context
16+
}
17+
1118
resource "aws_lb_target_group" "default" {
1219
count = module.this.enabled && var.default_target_group_enabled ? 1 : 0
1320

14-
name = coalesce(var.target_group_name, module.this.id)
21+
name = coalesce(var.target_group_name, module.target_group.id)
1522
port = var.port
1623
protocol = var.protocol
1724
protocol_version = var.protocol_version

0 commit comments

Comments
 (0)