https://www.runatlantis.io/ logo
Title
s

Seth Floyd

04/20/2023, 5:53 PM
I need help with server side repo config please. I installed with helm/kustomize so im working with a values.yaml and then an atlantis.yaml file to set up my repos. I get this error if i try to run plan:
repo config not allowed to set 'apply_requirements' key: server-side config needs 'allowed_overrides: [apply_requirements]'
In my values.yaml file I have the following:
## Use Server Side Repo Config,
## ref: <https://www.runatlantis.io/docs/server-side-repo-config.html>
## Example default configuration
repoConfig: |
#  ---
repos:
  - id: /.*/
    apply_requirements: []
    workflow: default
    allowed_overrides: [apply_requirements]
    allow_custom_workflows: false
Then in my Atlantis.yaml file I have this:
version: 3

projects:
  - &template
    dir: template
    autoplan:
      enabled: false
    apply_requirements: [mergeable, approved, undiverged]


  - <<: *template
    dir: service/thing1
    workspace: dev

  - <<: *template
    dir: service/thing1
    workspace: stage

  - <<: *template
    dir: service/thing1
    workspace: prod
What am I missing here?
p

PePe Amengual

04/20/2023, 6:24 PM
you need :
## Use Server Side Repo Config,
## ref: <https://www.runatlantis.io/docs/server-side-repo-config.html>
## Example default configuration
repoConfig: |
#  ---
repos:
  - id: /.*/
    workflow: default
    allowed_overrides: [apply_requirements]
    allow_custom_workflows: false
s

Seth Floyd

04/20/2023, 6:38 PM
Hmm…I removed that line I overlooked and I still get the same error
p

PePe Amengual

04/20/2023, 7:04 PM
are you sure the repo configs is being parsed correctly?
did you check the debug logs to see if is actually being parsed?
s

Seth Floyd

04/20/2023, 7:21 PM
As far as I can tell it is. Other things that are set in there are working. No erros in the logs until I try to push something or run plan.
p

PePe Amengual

04/20/2023, 7:22 PM
mmm
latest version of atlantis?
s

Seth Floyd

04/20/2023, 7:28 PM
chart: atlantis-4.10.2. newer one came out yesterday…4.12.4. I can try and bump to that and see
p

PePe Amengual

04/20/2023, 7:29 PM
please do
s

Seth Floyd

04/21/2023, 12:03 AM
So im running latest greatest and I still get that same error. Ive tried a few more things and its still not working. The syntax for those files is correct yes?
p

PePe Amengual

04/21/2023, 12:04 AM
I will remove the yaml anchors just to make sure, just to try to make the file the simples possible
and see if it reads it
s

Seth Floyd

04/21/2023, 2:30 PM
I have played with this a little more. If I comment out what I have above in the values.yaml file then my plans and applies work. If I enable that block the config files are not being read fully. Parts of it are because I can still run plans. If I try to run an apply after approving the pr Atlantis throws an error that my role does not have the correct permissions for Put or Get from my DynamoDB table. If I comment that block out again it all works fine. 🤷
Figured it out finally…I think my yaml linter was messing with me…This works now… The double space at the beginning of those lower lines was the trick.
repoConfig: |
 ---
 repos:
 - id: /.*/
   workflow: default
   allowed_overrides: [apply_requirements]
   apply_requirements: [approved]
p

PePe Amengual

04/21/2023, 7:21 PM
ahhhhhhh I told you!!!! LOL , glad you figure it out
that is one thing I hate about yaml….
s

Seth Floyd

04/21/2023, 7:24 PM
Yea…I dont know who decided that was a good idea….i can read json all day long but I get lost reading yaml when its super long like this values file is. Thanks for the help.
p

PePe Amengual

04/21/2023, 7:25 PM
I didn’t do anything, you did