-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Referencing docker_container.*.ports.*.external
does not work
#5510
Comments
Hi @geovanisouza92! I don't think there is an easy workaround for this at the moment, and the implementation makes it difficult to do multiple "splats" in one interpolation such as |
Hi @jen20,Thank you for reply! I expressed myself badly. I don't intended to use splats, but simple references to the first external port of each container, like output "foo" {
value = "${docker_container.mysql.ports.0.external}" # Here
} Another thing that I noticed is even Thank you. |
Hi @geovanisouza92! Sorry for the long silence here... this issue was using an old labeling scheme, and so we missed it on previous passes of posting updates. It seems like this issue is covering the same needs as #17048, so I'm going to close it just to consolidate the discussion over there. I've previously posted some updates in that issue about plans for the next major release that will, I think, get you what you needed here. ("double-splats" is not in scope for that, but I see you clarified in your later comment that this wasn't what you needed anyway.) |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I'm trying to referencing a
docker_container
resource ports, but is does outputs anything, even if the external port is fixed. The workaround is inform the external port through variable, then use it on interpolations.Here is an example of configuration files and results.
The text was updated successfully, but these errors were encountered: