You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, terraform inventory checks the current working directory for the terraform.tfstate file. When configured to use a remote state, terraform places the state file in the .terraform/ directory instead.
It would be useful for terraform-inventory to check for .terraform/terraform.tfstate if it doesn't find the state in the root of the terraform configuration. This would make life simpler for folks using remote state, and might help avoid the need to wrap terraform-inventory to pull state from a s3 bucket or other remote location.
Steps to reproduce
Create a S3 bucket for remote state
Configure Terraform to use remote state
Confirm that the state was successfully pushed, and that a copy exists in .terraform
Remote state include a remote block to preserve the remote configuration. This seems to cause no issues for terraform-inventory. I can confirm that terraform-inventory reads the file just fine.
The text was updated successfully, but these errors were encountered:
Thanks for the detailed feature request. This is a fantastic idea, which I've taken a stab at in #41. Would you mind taking a look and letting me know if it works for you?
Description
Feature request.
Currently, terraform inventory checks the current working directory for the
terraform.tfstate
file. When configured to use a remote state, terraform places the state file in the.terraform/
directory instead.It would be useful for terraform-inventory to check for
.terraform/terraform.tfstate
if it doesn't find the state in the root of the terraform configuration. This would make life simpler for folks using remote state, and might help avoid the need to wrap terraform-inventory to pull state from a s3 bucket or other remote location.Steps to reproduce
Configuration example
Versions
Additional information
Remote state include a
remote
block to preserve the remote configuration. This seems to cause no issues for terraform-inventory. I can confirm that terraform-inventory reads the file just fine.The text was updated successfully, but these errors were encountered: