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

Options not being parsed properly #17

Closed
azuretek opened this issue Feb 28, 2018 · 5 comments
Closed

Options not being parsed properly #17

azuretek opened this issue Feb 28, 2018 · 5 comments

Comments

@azuretek
Copy link

I'm using docker atlantisnorth/atlantis:latest and I'm trying to run a plan in a specific directory and it's not working. When I pass the -d option it passes it to terraform and I get this error from terraform:

flag provided but not defined: -d

The command I use is atlantis plan -d . -w <my_env>

Really though this is kinda secondary to my root issue, I have other directories holding spec tests and templates and I'm trying to just force the plan to run in the root directory instead of walking the tree.

Maybe this could just be a feature request? Maybe make an option in the atlantis.yaml to ignore specific directories? It looks like it already ignores a few directories by default, maybe make that configurable?

@lkysow
Copy link
Member

lkysow commented Feb 28, 2018

Hi @azuretek, you need to use runatlantis/atlantis. Sorry, I renamed the repo recently. You can use the 0.3.0 version.

Regarding your feature request, are you asking to be able to run atlantis plan without the -d . option and have a config option to ignore certain files?

I don't have an ignore option in mind, but what I'm thinking about is implementing autoplan via an atlantis.yaml schema:

plan:
    on_push:
      enabled: true # true by default. If false, planning must be done via comment for this project.
      when_modified: ["*.tf"]

So you could put that in your root, and on a new pull request we'd automatically run plan in the root[

@azuretek
Copy link
Author

azuretek commented Mar 1, 2018

Will use the new repo, thanks!

I do like that as an option, I just want to avoid a plan failure if I have a folder that doesn't have any .tf files in it. Maybe the when_modified pattern matcher could solve that issue?

@azuretek
Copy link
Author

azuretek commented Mar 1, 2018

Doesn't look like 0.3.0 is live yet, https://hub.docker.com/r/runatlantis/atlantis/tags/

@lkysow
Copy link
Member

lkysow commented Mar 1, 2018

ack sorry, haven't set up circle-ci hooks for new tags yet so I need to remember to re-run the master build after a tag. Should be up in a sec.

@lkysow
Copy link
Member

lkysow commented Mar 1, 2018

Okay, it's up there now!

With the new version if you run atlantis plan -d . it will only run plan in the root so you won't have any failures.

@lkysow lkysow closed this as completed Mar 1, 2018
ghaiszaher referenced this issue in ghaiszaher/atlantis Oct 7, 2022
meringu pushed a commit to meringu/atlantis that referenced this issue May 29, 2023
* added new flags `plan-backend`, `plan-s3-bucket`, `plan-s3-prefix` and deleted `s3-bucket`
* interface `plan.Backend` that is implemented by `file` and `s3`
* simplified s3 code
* didn't end up following my suggestions in runatlantis#30 since storing stuff in metadata requires you to `Get` the object *first* and then use the metadata. By parsing the `Key` to get repo, pull, path, and env, it skips an initial `Get` step, and I can download directly to the correct directory
* allow users to specify `application/json` or `application/x-www-form-urlencoded` for the webhook delivery type
* remove sending of special header for pull request api (fixes runatlantis#11)

Closes runatlantis#30 and runatlantis#17 and runatlantis#11
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