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

How do I specify multiple directories for a single workflow? #2757

Closed
te-ak opened this issue Dec 6, 2022 · 5 comments
Closed

How do I specify multiple directories for a single workflow? #2757

te-ak opened this issue Dec 6, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@te-ak
Copy link

te-ak commented Dec 6, 2022

Overview of the Issue

How do I clean up my atlantis.yaml so that I can cleanly specific many sub directories?
I have this repo structure:
prod/

  • users/
  • groups/

Repo atlantis.yaml file:

---
version: 3
projects:
  - dir: prod/users
    workflow: terragrunt
    autoplan:
      enabled: true
      when_modified:
        - "*.tf*"
    apply_requirements:
      - mergeable
      - approved
  - dir: prod/groups
    workflow: terragrunt
    autoplan:
      enabled: true
      when_modified:
        - "*.tf*"
    apply_requirements:
      - mergeable
      - approved

I'd love to be able specify a wildcard for all directories under prod/
Or if I can just list them in brackets. I don't know what the syntax format would be.
I just don't want to have to worry about copying atlantis.yaml entries every time I add a new dir under prod/

Thank you!

@te-ak te-ak added the bug Something isn't working label Dec 6, 2022
@te-ak
Copy link
Author

te-ak commented Dec 6, 2022

oh wait, I think I found a working example here:
#2520 (comment)

@te-ak te-ak closed this as completed Dec 6, 2022
@te-ak te-ak reopened this Dec 6, 2022
@te-ak
Copy link
Author

te-ak commented Dec 6, 2022

This format:

- dir: [
    "prod",
    "prod/users"]

Gave me this error:

Plan Error

parsing atlantis.yaml: yaml: unmarshal errors:
  line 4: cannot unmarshal !!seq into string

@jamengual
Copy link
Contributor

jamengual commented Dec 6, 2022 via email

@Fabianoshz
Copy link
Contributor

I believe this is duplicate of #686

@nitrocode
Copy link
Member

You can do this now with a defined atlantis.yaml and the --enable-regexp-cmd flag. Like Fabianoshz said, let's close this in favor of the original ticket to consolidate conversation.

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

4 participants