shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

Fix AWS Region with Default region

Open NickLaMuro opened this issue 6 months ago • 1 comments

Overview

When using the aws plugin, if the DEFAULT_REGION is set in the 1Password item, it will override any usage of AWS_REGION, which should take president normally with the aws cli, preventing the usage of being able to connect to other regions unless you regularly change the DEFAULT_REGION value in the 1Password each time.

Type of change

  • [ ] Created a new plugin
  • [ ] Improved an existing plugin
  • [x] Fixed a bug in an existing plugin
  • [ ] Improved contributor utilities or experience

Related Issue(s)

  • Resolves: #
  • Relates: #

How To Test

  • Set a DEFAULT_REGION value in your 1Password item you use for the aws plugin
  • Run a aws s3 ls (or something similar)
    • Validate these are in the region of DEFAULT_REGION
  • Run AWS_REGION=different-region aws s3 ls, using a different-region then the one you have configured
    • Validate the buckets from the previous command are different

In the previous version, this would return the same value for both commands, and this should fix that.

Other options is quering for something specific by ARN that exists in only in the DEFAULT_REGION, and with this patch, the second command will fail, where previously it would find it.

Changelog

Fix DEFAULT_REGION logic for aws plugin to allow for overrides using AWS_REGION.

NickLaMuro avatar Aug 06 '24 00:08 NickLaMuro