Skip to content

[PROPOSAL] Allow specifying environment variables in workflows #542

@pratikmallya

Description

@pratikmallya

As a user of atlantis, I want to be able to specify a custom list of environment variables and use the default init, plan, apply steps. This allows me to not write custom commands when running terraform. Specifically:

  • atlantis does some parsing of the apply output that makes it much cleaner and I want to reuse that instead of writing custom bash/awk scripts to do the same
  • the atlantis.yaml file looks much cleaner without custom commands

It also seems like there are many related asks to this where the users seem to be asking for the ability to specify environment variables.

My proposal:

  • add a new field called envs to the Step type which would hold key value pairs specifying the environment: variable mapping e.g.
workflows:
  team_A:
    plan:
      envs:
          GOOGLE_APPLICATION_CREDENTIALS: GOOGLE_APPLICATION_CREDENTIALS_TEAM_A
      steps:
      - init 
      - plan
      - apply
  team_B:
    plan:
      envs:
          GOOGLE_APPLICATION_CREDENTIALS: GOOGLE_APPLICATION_CREDENTIALS_TEAM_B
      steps:
      - init 
      - plan
      - apply

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality/enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions