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

[Possible Regression] Atlantis will not apply all projects when multiple projects are configured. #528

Closed
hden opened this issue Mar 12, 2019 · 4 comments
Labels
question Further information is requested

Comments

@hden
Copy link

hden commented Mar 12, 2019

Expected

When configured with multiple projects, Atlantis should plan and later apply for all modified projects.

Actual

Since Atlantis v0.4.15, Atlantis will plan for all the projects, but will only apply for the last one after an atlantis apply command.

Extra Observations

  • Everything worked as expected as of v0.4.12 (~Dec 14, 2018).
  • Updated to v0.4.15 on Feb 19, 2019, and setup automerge, then the symptoms appeared.
---
version: 2
automerge: true
projects:
  - name: 01-toreta-ds-sandbox
    dir: environments/01-toreta-ds-sandbox
    terraform_version: v0.11.11
    autoplan:
      when_modified: ["../../modules/**/*.tf", "../../deployments/**/*.tf", "*.tf*"]
  - name: 02-toreta-ds-staging
    dir: environments/02-toreta-ds-staging
    terraform_version: v0.11.11
    autoplan:
      when_modified: ["../../modules/**/*.tf", "../../deployments/**/*.tf", "*.tf*"]
    apply_requirements: ["approved"]
  - name: 03-toreta-ds-production
    dir: environments/03-toreta-ds-production
    terraform_version: v0.11.11
    autoplan:
      when_modified: ["../../modules/**/*.tf", "../../deployments/**/*.tf", "*.tf*"]
    apply_requirements: ["approved"]
@tedwardd
Copy link

tedwardd commented Mar 12, 2019

Tested and unable to reproduce on v.0.5.0:

version: 2
automerge: true
projects:
- name: dummy1
  dir: ./sandbox/dummy1
  terraform_version: v0.11.11
  autoplan:
    when_modified: ["*.tf"]
    enabled: true
- name: dummy2
  dir: ./sandbox/dummy2
  terraform_version: v0.11.11
  autoplan:
    when_modified: ["*.tf"]
    enabled: true

See redacted Atlantis output below


Ran Apply for 2 projects:

  1. project: dummy1 dir: sandbox/dummy1 workspace: default
  2. project: dummy2 dir: sandbox/dummy2 workspace: default

1. project: dummy1 dir: sandbox/dummy1 workspace: default

Show Output
random_integer.project: Creating...
  max:    "" => "999999"
  min:    "" => "1"
  result: "" => "<computed>"
random_integer.project: Creation complete after 0s (ID: 330280)
google_project.dummy1: Creating...
  app_engine.#:        "" => "<computed>"
  auto_create_network: "" => "true"
  billing_account:     "" => "XXXXXXXXXXXXXX"
  folder_id:           "" => "XXXXXXXXXXXX"
  name:                "" => "dummy1"
  number:              "" => "<computed>"
  org_id:              "" => "<computed>"
  policy_data:         "" => "<computed>"
  policy_etag:         "" => "<computed>"
  project_id:          "" => "dummy1-330280"
  skip_delete:         "" => "<computed>"
google_project.dummy1: Still creating... (10s elapsed)
google_project.dummy1: Creation complete after 13s (ID: dummy1-330280)
google_project_iam_member.dummy1-owner: Creating...
  etag:    "" => "<computed>"
  member:  "" => "user:[email protected]"
  project: "" => "dummy1-330280"
  role:    "" => "roles/owner"
google_project_iam_member.dummy1-owner: Creation complete after 6s (ID: dummy1-330280/roles/owner/user:[email protected])

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

2. project: dummy2 dir: sandbox/dummy2 workspace: default

Show Output
random_integer.project: Creating...
  max:    "" => "999999"
  min:    "" => "1"
  result: "" => "<computed>"
random_integer.project: Creation complete after 0s (ID: 588179)
google_project.dummy2: Creating...
  app_engine.#:        "" => "<computed>"
  auto_create_network: "" => "true"
  billing_account:     "" => "XXXXXXXXXX"
  folder_id:           "" => "XXXXXXXXXX"
  name:                "" => "dummy2"
  number:              "" => "<computed>"
  org_id:              "" => "<computed>"
  policy_data:         "" => "<computed>"
  policy_etag:         "" => "<computed>"
  project_id:          "" => "dummy2-588179"
  skip_delete:         "" => "<computed>"
google_project.dummy2: Still creating... (10s elapsed)
google_project.dummy2: Creation complete after 14s (ID: dummy2-588179)
google_project_iam_member.dummy2-owner: Creating...
  etag:    "" => "<computed>"
  member:  "" => "user:[email protected]"
  project: "" => "dummy2-588179"
  role:    "" => "roles/owner"
google_project_iam_member.dummy2-owner: Creation complete after 4s (ID: dummy2-588179/roles/owner/user:[email protected])

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

@lkysow
Copy link
Member

lkysow commented Mar 13, 2019

Do you have multiple projects in the same dir and workspace? If so, you might be running into #365.

@hden
Copy link
Author

hden commented Mar 14, 2019

We have multiple projects in different dir. But similar to #365, we use different terraform backends (3 independent GCS bucket) instead of workspaces.

Plan

screenshot 2019-03-14 at 9 15 15

Apply

screenshot 2019-03-14 at 9 15 32

@lkysow lkysow added the bug Something isn't working label Mar 14, 2019
@hden
Copy link
Author

hden commented Mar 15, 2019

Confirmed fix by v0.5.0. Thanks.

@hden hden closed this as completed Mar 15, 2019
@lkysow lkysow removed the bug Something isn't working label Mar 18, 2019
@lkysow lkysow added the question Further information is requested label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants