#atlantis (2021-06)

atlantis

Discuss the Atlantis (http://runatlantis.io|runatlantis.io) *Archive: * https://archive.sweetops.com/atlantis/

2021-06-20

2021-06-18

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

is there a way to get atlantis to create a workspace if it does not exist?

jose.amengual avatar
jose.amengual

if is possible in TF, is possible in atlantis

jose.amengual avatar
jose.amengual

if you are talking about TF workspace

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

Yes

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

If the workspace doesn’t exist Atlantis can’t handle it apparently (from my colleague)

jose.amengual avatar
jose.amengual

Atlantis runs terraform so if the terraform supports it then atlantis will

jose.amengual avatar
jose.amengual

if terraform does not create the workspace if it does not exist then it will not

jose.amengual avatar
jose.amengual

and that is NOT the same as a workspace in atlantis

jose.amengual avatar
jose.amengual

there is no way to dynamically generate the atlantis.yaml with a project name that matches a workspace

jose.amengual avatar
jose.amengual

there is com terragrunt plugins that can do something like that

joshmyers avatar
joshmyers

You can generate your atlantis.yaml using pre_workflow_hooks

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

I think the issue is the terraform workspace isn’t being created

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

But it’s 7pm here in London so everyone has finished work now. I’ll ask again on Monday thanks guys

Michael Warkentin avatar
Michael Warkentin

Are you using custom workflows? I think by default atlantis should create a workspace if it doesn’t exist however it doesn’t work if you’ve got a custom workflow going on.

2021-06-09

joshmyers avatar
joshmyers

Anyone else using --hide-prev-plan-comments and using the in built conftest stuff? When posting the conftest results, it is marking the plan as outdated (hiding) ….

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

we use the flag without conftest but it doesn’t work at all in gitlab

joshmyers avatar
joshmyers

Working now pulled from master rather than latest release

2021-06-03

2021-06-02

Steve Wade (swade1987) avatar
Steve Wade (swade1987)
03:47:20 PM

can anyone explain this … its happening on all our terraform roots

jose.amengual avatar
jose.amengual

check atlantis logs

jose.amengual avatar
jose.amengual

enable debug

jose.amengual avatar
jose.amengual

check permission of the atlantis user

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

all we get in the logs is …

{
    "level": "error",
    "ts": 1622712784.8012686,
    "caller": "events/automerger.go:37",
    "msg": "automerging failed: unable to merge merge request, it may not be in a mergeable state: PUT <https://gitlab.com/api/v4/projects/redacted/tf-env-security-groups/merge_requests/39/merge>: 405 {message: 405 Method Not Allowed}",
    "json": {
        "repo": "redacted/tf-env-security-groups",
        "pull": "39"
    },
    "stacktrace": "github.com/runatlantis/atlantis/server/events.(*AutoMerger).automerge\n\t/home/circleci/project/server/events/automerger.go:37\ngithub.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run\n\t/home/circleci/project/server/events/apply_command_runner.go:161\ngithub.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\t/home/circleci/project/server/events/command_runner.go:212"
}
tomv avatar

is there anyone that uses atlantis with a combination of encrypted tfvars files and workspaces? It looks like it should be possible, but just wondering if anyone else has done it before i go down the rabbit hole of spending a day or two getting it implemented

David avatar
David

I got a demo working with https://github.com/mozilla/sops quite a few months ago. I didn’t end up going with that approach, but I know it worked not that long ago

mozilla/sops attachment image

Simple and flexible tool for managing secrets. Contribute to mozilla/sops development by creating an account on GitHub.

    keyboard_arrow_up