-
Notifications
You must be signed in to change notification settings - Fork 467
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
Add web_app_routing_identity block to outputs #481
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bonddim for opening this pr! Almost LGTM but two review comments.
outputs.tf
Outdated
|
||
output "web_app_routing_identity" { | ||
description = "The `azurerm_kubernetes_cluster`'s `web_app_routing_identity` block." | ||
value = try(azurerm_kubernetes_cluster.main.web_app_routing[0].web_app_routing_identity, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the schema, web_app_routing_identity
is a list of object, so I would recommend []
as default value instead of null
, so the consumer can use for
expression to iterate it:
value = try(azurerm_kubernetes_cluster.main.web_app_routing[0].web_app_routing_identity, [])
Otherwise, we'll receive an error when we're using for
expression and this output is null
:
Error: Iteration over null value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
outputs.tf
Outdated
@@ -223,3 +223,8 @@ output "username" { | |||
sensitive = true | |||
value = azurerm_kubernetes_cluster.main.kube_config[0].username | |||
} | |||
|
|||
output "web_app_routing_identity" { | |||
description = "The `azurerm_kubernetes_cluster`'s `web_app_routing_identity` block." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to address that this block is a list of object:
description = "The azurerm_kubernetes_cluster
's web_app_routing_identity
block, it's type is a list of object."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bonddim , LGTM! 🚀
Describe your changes
This add
web_app_routing_identity
to outputs, which is needed for role assignments when DNS zone and AKS Cluster are in different resource groups.Checklist before requesting a review
CHANGELOG.md
file