-
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
terraform output and multiple resources #6054
Comments
It looks like you're resource references are missing an attribute part. For example, if you want the ids you might write Did this give you an error or just output the empty string? There is supposed to be an error message that explains this so if you didn't see that here that seems like a bug. |
There was no error message, however |
Just for clarification, this is somewhat related to issue #6058 . What we are trying to do is attempt at recycling our VMs, and to do this, we're trying to get all the resources known currently and run at a high level the following logic.
This could also be simplified if issue #6058 is implemented that would allow us to condense step 2 into:
for step 1., this is where the block |
Hmm, interesting... Terraform intentionally doesn't really expose the resource "name" used within the configuration, because it's intended to be local to the configuration rather than something to be exposed to callers. But you do have an interesting new use-case of taking the Terraform output and then feeding it back in to Terraform as input. One workaround you might like to try for now is to make your process read the In Terraform 0.7, the next major release, it is planned to add a new command
If that looks like it'd solve your problem then if it's okay with you I'd like to close this to consolidate the discussion over in #5811. |
This would definitely be useful to us. I think that would achieve the same thing for us. However I think there is a inconsistency in the usage of: |
Dup of a core enhance issue! |
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 am trying to define a output that looks like this:
but however I am not getting any output. The purpose of this is we're trying to extract the number of instances associated with a given resource.
The text was updated successfully, but these errors were encountered: