1Password / shell-plugins

Seamless authentication for every tool in your terminal.
https://developer.1password.com/docs/cli/shell-plugins/
MIT License
507 stars 163 forks source link

Terraform / AWS plugins and issues with caching #376

Open lypanov opened 10 months ago

lypanov commented 10 months ago

Platform or tool

AWS + Terraform

Desired or expected behavior

I'd expect existing shell windows to continue working over time without needing to resort to OP_CACHE=false (Sidenote: I'm currently verifying the OP_CACHE behavior).

Current behavior

I have to create a new shell window each time the error messages from AWS start appearing ( see logs ).

Relevant log output

The error message I start getting after an hour or so is:

Error: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context │ deadline exceeded

op CLI version

2.20.0 w master version of terraform

lypanov commented 10 months ago

Additional note: The error is semi blackbox to me but I should note that we are not running with the correct up to date setup allowing non-temporary STS credential creation (sorry for the life of me I can't remember anything more than that, just recall that we haven't yet set that up in AWS as we're migrating away from it anyway). My assumption is that either a) the tool expects this, b) the tool isn't noticing that the STS sessions have expired.