Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional tfe-token flag. Get working with 0.12. #419

Merged
merged 3 commits into from
Jan 10, 2019
Merged

Commits on Jan 9, 2019

  1. Configuration menu
    Copy the full SHA
    7caa043 View commit details
    Browse the repository at this point in the history
  2. Add new --tfe-token flag for TFE backend.

    The new flag takes in a Terraform Enterprise API token and attempts to
    write a config file for that token to ~/.terraformrc on startup.
    If the file already exists and its contents would change as a result of
    us writing it, we error out.
    This flag is useful if you're using the TFE backend for any of your
    projects as that requires a .terraformrc file with a token for
    authentication.
    lkysow committed Jan 9, 2019
    Configuration menu
    Copy the full SHA
    fb86e89 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2019

  1. Don't add extra -var flags when using TF >= 0.12

    In Terraform 0.12 and above, you aren't allowed to set -var foo=bar
    flags unless the foo variable is actually defined in code. Previously,
    we were setting the following variables:
    - atlantis_user
    - atlantis_repo
    - atlantis_repo_owner
    - atlantis_repo_name
    - atlantis_pull_num
    
    Users could then use these variables if they wanted to, in their code.
    The main use case was to name the assume role session in AWS:
    
    provider "aws" {
      assume_role {
        role_arn     = "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"
        session_name = "${var.atlantis_user}-${var.atlantis_repo_owner}-${var.atlantis_repo_name}-${var.atlantis_pull_num}"
      }
    }
    
    This is longer possible in 0.12.
    lkysow committed Jan 10, 2019
    Configuration menu
    Copy the full SHA
    e0dcb5a View commit details
    Browse the repository at this point in the history