Reputation: 2062
I've been trying to debug an issue related to a terraform_remote_state datasource.
Goal: Show all of the attributes in data terraform_remote_state my_remote_state
Attempt: terraform state show data.terraform_remote_state.my_remote_state
Expected: show all attributes for the datasource
Result:
No instance found for the given address!
This command requires that the address references one specific instance.
To view the available instances, use "terraform state list". Please modify
the address to reference a specific instance.
I ran terraform state list
to view the list addresses, but the datasource address wasn't listed. If anyone can help me with this I would greatly appreciate it.
references:https://www.terraform.io/docs/commands/state/show.html
Upvotes: 0
Views: 2798
Reputation: 656
The commands terraform state show
and terraform state list
will show you the resources contained within the state for your current backend. Remote state is not state managed by your current backend.
If you have access to the definition for the other backend, simply change to that project/repo, initialise, make sure you're in the correct workspace, then use terraform state show
and terraform state list
there instead.
Upvotes: 2