shell-plugins
shell-plugins copied to clipboard
Terraform plugin state commands
Platform or tool
Terraform
Desired or expected behavior
terraform state [subcommand] should work.
Subcommands:
list List resources in the state
mv Move an item in the state
pull Pull current state and output to stdout
push Update remote state from a local state file
replace-provider Replace provider in the state
rm Remove instances from the state
show Show a resource in the state
Current behavior
Commands fails with no valid credential sources found.
terraform init and plan | apply work fine.
Relevant log output
Error: No valid credential sources found
│
│ Please see https://www.terraform.io/docs/language/settings/backends/s3.html
│ for more information about providing credentials.
│
│ Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled,
│ context deadline exceeded
### op CLI version
2.23.0-beta.01
I see this same problem. I am able to do a "terraform state list" but if I try to do a "terraform state show xxxx" it fails.
Additionally a "terraform providers" fails in a similar way.
I'm also curious to know what the state of the terraform plugin truly is. Its been in beta for quite some time. Is there any hope or expectation that it will reach an official release?
@federicopires FYI, we were able to move past this terraform beta version. Recently the main desktop app was updated and would no longer work with the older beta 1password-cli version.
Once we were on the latest version of the desktop app and 1password-cli and things were functioning there, we of course no longer had the terraform plugin that was included in the 2.23.0-beta.01 version.
To address this, you can simply just clone this repo and then issue the following commands:
make terraform/validate
make terraform/build
Now you should have the latest versions of the desktop app, 1password-cli, and a locally installed version of the terraform plugin. This now has allowed us to use all of the terraform state and terraform providers commands without issue. You will see a slightly annoying WARNING message about it not being an official plugin but for now I can accept this.
Hope that helps folks out. Here is to hoping that 1password will just start including the terraform plugin in the latest 1password-cli releases?
Just commenting here that this issue and #447 seem to share the common theme of being in the beta state.