coveooss / tgf

A Terragrunt frontend that allow execution of Terragrunt/Terraform through Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to skip AWS authentication

sryabkov opened this issue · comments

It looks like no matter what I do, tgf tries to authenticate to AWS

For example

$ tgf --current-version
Unable to authentify to AWS: Error finding AWS credentials (did you set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables?): NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors
Pararameter store is ignored

tgf v1.19.1

We are not using AWS. Is there a way to have tgf stop trying to authenticate with AWS on startup?

In fact, there is already a mechanism to ignore AWS configuration when AWS is not used.

The verification steps are:

  • are there environment variables named AWS_PROFILE, AWS_ACCESS_KEY_ID or AWS_CONFIG_FILE defined?

  • is there is an executable named aws in the path? (which aws)

  • is there a folder named .aws under the HOME directory?

If none of these conditions is met, tgf should not try to authenticate to AWS.

Do you have one of these conditions in your environment?

@jocgir Thank you for the quick response!

I use multiple clouds, so I do have awscli installed, but I am using GCP it in the current project for which I am experimenting with tgf. It is inconvenient/impractical to go around re-naming ~/.aws or uninstalling/changing path for aws. tgf has so many different configuration settings (e.g. --no-home, --no-temp, --ignore-user-config), is there not one to disable AWS?

Thank you. I added an option to disable AWS. #52

@jocgir Awesome! Thank you and thank you for making the change and releasing it so quickly!