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

Atlantis apply all with project names fails #365

Closed
ygersie opened this issue Nov 29, 2018 · 4 comments
Closed

Atlantis apply all with project names fails #365

ygersie opened this issue Nov 29, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@ygersie
Copy link

ygersie commented Nov 29, 2018

I have a repo config similar to a workspaces setup but using projects with different terraform backends instead. Here's the atlantis.yaml:

---
version: 2

projects:
- name: qa-dus1
  dir: .
  workflow: qa-dus1
- name: pre-prod-dus1
  dir: .
  workflow: pre-prod-dus1
- name: prod-ams1
  dir: .
  workflow: prod-ams1
- name: prod-dus1
  dir: .
  workflow: prod-dus1

workflows:
  qa-dus1:
    plan:
      steps:
      - run: rm -rf .terraform
      - init:
          extra_args: [-backend-config=environments/qa/dus1.backend.tfvars]
      - plan:
          extra_args: [-var-file=environments/qa/dus1.tfvars]
  pre-prod-dus1:
    plan:
      steps:
      - run: rm -rf .terraform
      - init:
          extra_args: [-backend-config=environments/pre-prod/dus1.backend.tfvars]
      - plan:
          extra_args: [-var-file=environments/pre-prod/dus1.tfvars]
  prod-ams1:
    plan:
      steps:
      - run: rm -rf .terraform
      - init:
          extra_args: [-backend-config=environments/prod/ams1.backend.tfvars]
      - plan:
          extra_args: [-var-file=environments/prod/ams1.tfvars]
  prod-dus1:
    plan:
      steps:
      - run: rm -rf .terraform
      - init:
          extra_args: [-backend-config=environments/prod/dus1.backend.tfvars]
      - plan:
          extra_args: [-var-file=environments/prod/dus1.tfvars]

Now this works perfectly fine, however the apply "all" doesn't work stating I have to specify which project to apply. Although it is nice to have this option to enforce people to be careful about what they're applying where, I really don't want to go through a whole cycle of projects waiting for each apply to complete. I'm not sure why this is the case and Atlantis can't just run the PR plans in the same sequence of the projects array? Here's the message I'm getting:

building command for dir ".": must specify project name: more than one project defined in atlantis.yaml matched dir: "." workspace: "default"

And here's the generated tfplans:

repos/ecg-csi/terraform-myproject/41/default/pre-prod-dus1-default.tfplan
repos/ecg-csi/terraform-myproject/41/default/prod-ams1-default.tfplan
repos/ecg-csi/terraform-myproject/41/default/prod-dus1-default.tfplan
repos/ecg-csi/terraform-myproject/41/default/qa-dus1-default.tfplan

What can I do to make this a bit more manageable?

@lkysow
Copy link
Member

lkysow commented Nov 29, 2018

Hi Yorick, so are you commenting atlantis apply and you get that error?

@lkysow
Copy link
Member

lkysow commented Nov 29, 2018

Okay, I can reproduce the error. Yes, this is a bug.

@lkysow lkysow added the bug Something isn't working label Nov 29, 2018
@ygersie
Copy link
Author

ygersie commented Nov 29, 2018

Thanks for the swift reply and confirmation!

@lkysow
Copy link
Member

lkysow commented Apr 4, 2019

Fixed in release v0.7.0

@lkysow lkysow closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants