🚀 Enhancements
Correct module hostname count @nitrocode (#29)
what
- Calculated the unique availability zones from subnet ids to create hostnames
- Used element instead of bracket syntax to get an item in the list
why
- We cannot set the count to
length()
of the outputted bootstrap_brokers* due to the count errorThe "count" value depends on resource attributes that cannot be determined
- We also cannot use
for_each
using a map as it returns the same error.
- The
number_of_broker_nodes
is supposed to be a multiple of thesubnet_ids
. The issue seems to be that the local variable that is using a known unstable output of theaws_msk_cluster
resource.
For each bootstrap_brokers*
output, the terraform registry states
AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
So it's possible that the bootstrap_brokers*
outputs are not returning the correct value. For now, all we can do is prevent the index issue. I think there is some other issue going on with this resource.
references
- Hopefully closes #17
- hashicorp/terraform-provider-aws#19659
- One of the comment says
It appears this is (partially) documented behavior. Quoting AWS Docs:
A list of brokers that a client can use to bootstrap. This list doesn't necessarily include all of the brokers in the cluster.
See: https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-bootstrap-brokers.html
🐛 Bug Fixes
Correct module hostname count @nitrocode (#29)
what
- Calculated the unique availability zones from subnet ids to create hostnames
- Used element instead of bracket syntax to get an item in the list
why
- We cannot set the count to
length()
of the outputted bootstrap_brokers* due to the count errorThe "count" value depends on resource attributes that cannot be determined
- We also cannot use
for_each
using a map as it returns the same error.
- The
number_of_broker_nodes
is supposed to be a multiple of thesubnet_ids
. The issue seems to be that the local variable that is using a known unstable output of theaws_msk_cluster
resource.
For each bootstrap_brokers*
output, the terraform registry states
AWS may not always return all endpoints so this value is not guaranteed to be stable across applies.
So it's possible that the bootstrap_brokers*
outputs are not returning the correct value. For now, all we can do is prevent the index issue. I think there is some other issue going on with this resource.
references
- Hopefully closes #17
- hashicorp/terraform-provider-aws#19659
- One of the comment says
It appears this is (partially) documented behavior. Quoting AWS Docs:
A list of brokers that a client can use to bootstrap. This list doesn't necessarily include all of the brokers in the cluster.
See: https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-bootstrap-brokers.html