#aws-credentials #write #terraform

bin+lib actfv

Take .aws/credentials as input and write it into a Terraform compatible .tfvars file

5 unstable releases

0.3.0 Jun 21, 2023
0.2.0 Jun 13, 2023
0.1.2 Jun 10, 2023
0.1.1 Jun 10, 2023
0.1.0 Jun 10, 2023

#801 in Authentication

28 downloads per month

MIT/Apache

10KB
144 lines

actfv

Take .aws/credentials as input and write it into a Terraform compatible .tfvars file.

In some work scenarios, the aws credentials time out in a very short amount of time. This forces a new aws login, and then those credentials need to make it into terraform.

This utility allows running terraform and passing in a --var-file that contains these secrets. Make sure this file is outside of your version control or add it to .gitignore so you don't accidentally commit your aws credential information.

It will find and print out the following:

  • region
  • aws_access_key_id
  • aws_secret_access_key
  • aws_session_token

Usage

Usage: actfv.exe [OPTIONS] <SOURCE_FILE_PATH> <TARGET_FILE_PATH>

Arguments:
  <SOURCE_FILE_PATH>  Source aws credentials file. Ex: ~/.aws/credentials
  <TARGET_FILE_PATH>  Target file. Ex: mysecret.tfvars

Options:
  -p, --profile <PROFILE>  Watch the source file constantly for changes [default: default]
  -w, --watch              Watch the source file constantly for changes
  -h, --help               Print help
  -V, --version            Print version

Dependencies

~2–10MB
~95K SLoC