Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add cluster name to outputs #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wladyslawczyzewski
Copy link

@wladyslawczyzewski wladyslawczyzewski commented Nov 28, 2024

Description

Sometimes it's useful to have this value as output, for instance, when using terragrunt and use this module as dependency of another module.

Motivation and Context

Just adds the output with cluster name. Useful when using module as dependency of another module.

Breaking Changes

No breaking changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request
  • I have tested and validated these changes using production cluster :)

sometimes it's usefull to have this value as output, for instance, when using terragrunt and use this module as dependency of another module
@wladyslawczyzewski wladyslawczyzewski changed the title add cluster name to outputs chore: add cluster name to outputs Nov 28, 2024
@wladyslawczyzewski wladyslawczyzewski changed the title chore: add cluster name to outputs chore: Add cluster name to outputs Nov 28, 2024
@bryantbiggs
Copy link
Member

that won't do what you think it does - you would need to take an implicit dependency on the cluster ARN in this case https://github.com/hashicorp/terraform-provider-aws/blob/f75b604ed2ccc1618be162393b623de3f232bb57/internal/service/kafka/cluster.go#L597

but we can output the name - see note on change though to get generated name

@@ -37,6 +37,11 @@ output "bootstrap_brokers_tls" {
value = try(aws_msk_cluster.this[0].bootstrap_brokers_tls, null)
}

output "cluster_name" {
description = "Name of the MSK cluster"
value = var.name
Copy link
Member

@bryantbiggs bryantbiggs Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants