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

Run apply only for a specific project in a multiproject repo #22

Closed
psalaberria002 opened this issue Mar 5, 2018 · 6 comments
Closed

Comments

@psalaberria002
Copy link
Contributor

Hi!

I have been playing with a multi-project repository (dev, prod), and I cannot find a way to execute plan or apply only for a specific project.

When I run atlantis plan I get the following message:

To perform exactly these actions, run the following command to apply:
    terraform apply "/tmp/atlantis/data/repos/psalaberria002/atlantis-example/2/default/prod/default.tfplan"

I would like to do atlantis apply "/tmp/atlantis/data/repos/psalaberria002/atlantis-example/2/default/prod/default.tfplan".

Is there a way to do this currently in Atlantis? Maybe there is an existing flag I have missed.

Thank you.

@lkysow
Copy link
Member

lkysow commented Mar 5, 2018 via email

@psalaberria002
Copy link
Contributor Author

Awesome. I see now the feature was added in v0.3. I was running v0.2.

Thank you.

@psalaberria002
Copy link
Contributor Author

I am having issues with -d.

atlantis-example
-dev
  - main.tf
-prod
  - main.tf

These are the logs when I run atlantis apply -d dev

2018/03/06 13:38:57 [INFO] psalaberria002/atlantis-example#3: Found workspace in "/tmp/atlantis/data/repos/psalaberria002/atlantis-example/3/default"
2018/03/06 13:38:57 [INFO] psalaberria002/atlantis-example#3: Found 1 plan(s) in our workspace: [/tmp/atlantis/data/repos/psalaberria002/atlantis-example/3/default/dev/default.tfplan]
2018/03/06 13:38:57 [INFO] psalaberria002/atlantis-example#3: Running apply for project at path "."
2018/03/06 13:38:57 [INFO] psalaberria002/atlantis-example#3: Acquired lock with id "psalaberria002/atlantis-example/./default"

Running apply for project at path "." instead of dev.

lkysow added a commit that referenced this issue Mar 6, 2018
- Fixes #22. We were running apply in the parent directory.
- Also changes error message if no plans are found to apply.
@lkysow lkysow closed this as completed in #23 Mar 6, 2018
@lkysow
Copy link
Member

lkysow commented Mar 6, 2018

🤦‍♂️ yeah that's a bug. I've pushed release 0.3.1 to fix. Sorry for the trouble.

@psalaberria002
Copy link
Contributor Author

I was going to send a PR exactly when you pushed the fix. Next time ;) Thanks for the fast fix.

@lkysow
Copy link
Member

lkysow commented Mar 6, 2018

No problem, it was a dumb bug. That's the one major file without unit tests so of course it broke. Gonna test it today!

ghaiszaher referenced this issue in ghaiszaher/atlantis Oct 7, 2022
meringu pushed a commit to meringu/atlantis that referenced this issue May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants