Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Request: Support AWS Credentials File #123

Open
Aghassi opened this issue Dec 27, 2018 · 0 comments
Open

Request: Support AWS Credentials File #123

Aghassi opened this issue Dec 27, 2018 · 0 comments

Comments

@Aghassi
Copy link

Aghassi commented Dec 27, 2018

Currently, the only way to run this script is with secrets. Secrets are not very useful when your company authenticates your AWS accounts via CLI and stores the AWS temp credentials locally.

Suggest changing aws_access_key and aws_secret_key to the following

variables.tf:

// variable "aws_access_key" {
//   description = "Access key used to create instances"
// }

// variable "aws_secret_key" {
//   description = "Secret key used to create instances"
// }

variable "aws_creds_file" {
  description = "AWS Credentials File"
}

variable "aws_profile" {
  description = "AWS Profile"
}

circleci.tf


provider "aws" {
  region                  = "${var.aws_region}"
  shared_credentials_file = "${var.aws_creds_file}"
  profile                 = "${var.aws_profile}"
}

terraform.tfvars

// aws_access_key = "..."
// aws_secret_key = "..."
aws_creds_file = "~/.aws/credentials"
aws_profile = "default"

As an example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant