-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Problems using outputs from azurerm_container_service due to extra hashes #467
Comments
It's a bit messy but I think you should be able to do something like the following output "acs_agent_pool_fqdn" {
value = "${lookup(azurerm_container_service.k8sexample.agent_pool_profile[0], "fqdn")}"
} The profiles are actually single item arrays containing a hash |
Thanks @hbuckle. I'll try your suggestion. |
All the subresources seem to be implemented that way but I have no idea why, one of the devs may be able to explain. |
Was this solved by #907? |
I have not tried the new version, but I don't see that the changes in that PR would completely address my issue even if it did so for the FQDN. I think we would still have to refer to other outputs with the trick Henry provided on 11/2/2017. That is what I ended up doing to work around the issue. |
This issue still exists in Terraform 0.11.10. Just tested the @hbuckle solution, and it fixes the problem. |
hi @rberlind @hbuckle @R0quef0rt Apologies for the delayed update here! Microsoft's recently announced the deprecation of Azure Container Service in favour of Azure (Managed) Kubernetes Service. In preparation for this we're deprecating the We plan to remove support for the
alternatively you can pin the Provider block to a specific version (more information about version pinning can be found on the Provider page):
If you're using ACS with Kubernetes Microsoft's recommendation is to migrate to using Azure (Managed) Kubernetes Service (AKS) which is available as the Since the Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
I am having trouble using the exported attributes from the azurerm_container_service resource in Terraform outputs due to extra hashes that are added to the generated resource. In particular, the four profiles (master, agent_pool, linux, and diagnostics) all have a hash added between themselves and their attributes. So, we end up with things like: master_profile.33315859.fqdn, agent_pool_profile.1030309280.fqdn, and diagnostics_profile.734881840.storage_uri.
But according to the resource's documentation, the resource is supposed to export the following attributes: id, master_profile.fqdn, agent_pool_profile.fqdn, and diagnostics_profile.storage_uri. Not knowing the value of the hashes ahead of time makes it hard to define outputs that use these.
Looking at the resource code, I see where the hashes are being added, but it is unclear why.
Ideally, the hashes would not be added. If they have to be added in order to successfully interact with the Azure SDK, then some improved documentation on how to use the exported attributes in Terraform outputs would be useful.
For the Terraform configuration below, I was able to get outputs displayed for id and acs_agent_pool_fqdn (although the latter had no value), but not for acs_master_fqdn. I used the hash 1030309280 for acs_agent_pool_fqdn but did not use the hash 33315859 that I could have used for acs_master_fqdn.
Terraform Version
Terraform v0.10.7
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
outputs.tf
variables.tf
main.tf
k8s.tfvars
Expected Behavior
I should have seen all 3 outputs without having to specify hashes.
Actual Behavior
What actually happened?
I saw acs_agent_pool_fqdn with blank value.
I saw id
I did not see acs_master_fqdn at all.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: