#atlantis (2020-11)

atlantis

Discuss the Atlantis (<http://runatlantis.iorunatlantis.io>)

**Archive: ** https://archive.sweetops.com/atlantis/

2020-11-05

joshmyers avatar
joshmyers

Anyone here using the Slack Atlantis webhook integration?

joshmyers avatar
joshmyers
Slack configuration not working · Issue #1210 · runatlantis/atlantis

Hi, We integrated slack to atlantis with following config in config.yaml file slack-token: xxxxxxxxx webhooks: event: apply workspace-regex: .* kind: slack channel: test and when starting atlantis …

joshmyers avatar
joshmyers

Bah, looks like Slack have deprecated methods in their API and slack-go hasn’t been updated yet (and Atlantis will be using an old version)

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

this is my next thing to setup

joshmyers avatar
joshmyers

It doesn’t work natively via Atlantis due to Slack API deprecations

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

i am using the upstream tf module as well and don’t see any integration points either

joshmyers avatar
joshmyers

Nope, you need to add some webhook config to the Atlantis image which is undocumented

joshmyers avatar
joshmyers
cloudposse/slack-notifier

Command line utility to send messages with attachments to Slack channels via Incoming Webhooks - cloudposse/slack-notifier

joshmyers avatar
joshmyers

There is loads of open issues in https://github.com/slack-go/ about the Slack deprecated APIs

slack-go

slack-go has 2 repositories available. Follow their code on GitHub.

jose.amengual avatar
jose.amengual

is there another go slack library?

joshmyers avatar
joshmyers

Probably, but it isn’t the one Atlantis is using.

joshmyers avatar
joshmyers

Not forking Atlantis for undocumented/hacky features when there are good alternatives like https://github.com/cloudposse/slack-notifier

joshmyers avatar
joshmyers

Everyone is running TF through some wrapper anyway, right

jose.amengual avatar
jose.amengual

Atlantis is falling behind sadly

2020-11-13

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

this has just started happening for us, does anyone have any ideas?

running "/usr/local/bin/terraform init -input=false -no-color -upgrade" in "/home/atlantis/.atlantis/repos/ume-platform-engineering/tf-organisation/9/default": exit status 1

Error: Unsupported Terraform Core version

  on config.tf line 10, in terraform:
  10:   required_version = "= 0.13.4"

This configuration does not support Terraform version 0.13.3. To proceed,
either choose another supported Terraform version or update this version
constraint. Version constraints are normally set for good reason, so updating
the constraint may lead to other errors or unexpected behavior.
joshmyers avatar
joshmyers

Yeah, you have a required_version = "= 0.13.4" constraint somewhere and you are trying to use 0.13.3 with it….

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

the constraint is there

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

and the image we are using is v0.15.1

Steve Wade (swade1987) avatar
Steve Wade (swade1987)


If you’re using the Atlantis Docker image and aren’t setting the --default-tf-version flag
then the default version of Terraform will now be 0.13.4. Simply set the above
flag to your desired default version to avoid any issues.

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

i might just explicitly set that verison

joshmyers avatar
joshmyers
10:03:13 AM

we’re using tfenv inside Atlantis to manage versions for us so that Atlantis uses the same path as we do if working with the codebase locally ¯_(ツ)_/¯

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

i managed to get atlantis to plan but now on the apply i am getting …

stat /home/atlantis/.atlantis/repos/ume-platform-engineering/tf-organisation/9: no such file or directory
Steve Wade (swade1987) avatar
Steve Wade (swade1987)

the atlantis.yml in the repo is

version: 3
projects:
  - name: latest
    dir: .
    autoplan:
      when_modified: ["*.tf"]
      enabled: true
Steve Wade (swade1987) avatar
Steve Wade (swade1987)

this has been working fine for ages i think its because the upstream tf module uses the latest image by default

joshmyers avatar
joshmyers

Yeah, don’t do that.

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

the fact they default to latest is crazy imo

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

what i don’t know now though is why the apply errors out

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

any ideas as i am stumped

joshmyers avatar
joshmyers

Where do you see that stat log line? os.Stat is called in a few places in Atlantis codebase

joshmyers avatar
joshmyers

I’m assuming it is complaining about the PLANFILE not being present for the apply after a plan?

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

weird after doing a new plan and apply it worked

jose.amengual avatar
jose.amengual

I was going to say that is you close and open the pr it will clean the cloned dir in the Atlantis server and that way you could fix that error

jose.amengual avatar
jose.amengual

But a new plan does a similar thing

2020-11-16

jose.amengual avatar
jose.amengual

@here we are in the process of forking Atlantis to keep a more active project and with more maintainers to make the project better and add some needed features, what you will like to see merged from existing PRs and or new features?

3
RB avatar
  • Hiding previous comments
  • Allowing default plan and custom plans - they seem mutually exclusive from my testing
  • Allowlist select users or groups to do applies
  • More logging
jose.amengual avatar
jose.amengual

can you expand on Custom plans? and more logging(server side or repo side)?

joshmyers avatar
joshmyers

API to trigger ad-hoc plan/apply

1
joshmyers avatar
joshmyers

Hiding previous comments < this is already a thing.

Vlad Ionescu (he/him) avatar
Vlad Ionescu (he/him)

@Erik Osterman (Cloud Posse) mentioned that CloudPosse moved away from Atlantis due to some highly-desired features not making the cut. He might have some ideas

Please do announce us of when you’re forking it and what your plans are!

jose.amengual avatar
jose.amengual

I will make sure to keep you guys updated

1
jose.amengual avatar
jose.amengual

Erik already gave me a list of things of what he will like to see

Douglas Clow avatar
Douglas Clow

Ability to run a custom script that generate atlantis.yaml dynamically instead of reading it from within the triggering repo. The script would have access to the cloned repo so it can generate the configuration based on the repo folder structure and other values in the repo.

jose.amengual avatar
jose.amengual

you mean like generating a default config base on the repo structure?

Douglas Clow avatar
Douglas Clow

Here’s an example based on the old geodesic folder structure:

Douglas Clow avatar
Douglas Clow
02:11:07 AM
Douglas Clow avatar
Douglas Clow

If we could make arbitrary scripts that ran whenever there was a webhook event, thats even better. Another potential application is a script that clones external repositories and merges it into the triggered repo so that “common” projects could be pulled in.

jose.amengual avatar
jose.amengual

That is interesting, but it will be a bit tricky

jose.amengual avatar
jose.amengual

Atlantis clones the repo after and event is trigger so a setting of this type will have to be an the server config level

jose.amengual avatar
jose.amengual

Mmmm is actually not that complicated, and it could support pulling the common folder from VCS or S3 ot local

1
joshmyers avatar
joshmyers
transcend-io/terragrunt-atlantis-config

Generate Atlantis config for Terragrunt projects. Contribute to transcend-io/terragrunt-atlantis-config development by creating an account on GitHub.

jose.amengual avatar
jose.amengual

Cool

zeid.derhally avatar
zeid.derhally

thanks for doing this. Will try to pitch in when i can

jose.amengual avatar
jose.amengual

np

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

you can already hide previous comments?

RB avatar
--hide-prev-plan-comments flag fails on github.com PRs on 0.15.0 · Issue #1161 · runatlantis/atlantis

Problem I have ATLANTIS_HIDE_PREV_PLAN_COMMENTS=true and running 0.15.0 as a github app in ECS Fargate. I run plan manually in my repo using the following. atlantis plan -d iam-policies/engineer Wh…

RB avatar

feel free to help with that by commenting the thread. a lot of people are stuck on it. im also using atlantis as a gh app.

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

i am using gitlab, i should give this a try

jose.amengual avatar
jose.amengual

that is interesting since It works for me but I’m not on 0.15.0

jose.amengual avatar
jose.amengual

but I’m using webhooks, which I do not believe is related to the issue

jose.amengual avatar
jose.amengual
12:16:45 AM
jose.amengual avatar
jose.amengual

this is in pair with master if a few weeks back

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

@jose.amengual where do you set the flag on the server config?

jose.amengual avatar
jose.amengual

I actually did not set it

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

i am using the upstream terraform module with fargate

jose.amengual avatar
jose.amengual

I start atlantis like this :

dlv debug --headless --listen=:2345 --log --api-version=2  \
~/workspace/Go/src/github.com/runatlantis/atlantis/main.go -- \
server --atlantis-url="<https://73c90a215719.ngrok.io>" --gh-user="jamengual" \
--gh-token="wretwertwertwertwerwe" --gh-webhook-secret="ertwerwertwert" \
--repo-allowlist="github.com/jamengual/atlantis_testing" --log-level="debug" \
--config=atlantis-repo-config-staging.yaml
Steve Wade (swade1987) avatar
Steve Wade (swade1987)

what version?

jose.amengual avatar
jose.amengual

0.15.1

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

weird and your old comments get deleted on a new plan?

jose.amengual avatar
jose.amengual

they do sometimes

jose.amengual avatar
jose.amengual

I can’t really tell if they do since this is my testing branch but in general they seem to get hidden not deleted

joshmyers avatar
joshmyers

I see this functionality working as expected…

joshmyers avatar
joshmyers
09:22:25 AM
Steve Wade (swade1987) avatar
Steve Wade (swade1987)

it looks like this is only available in github @joshmyers

jose.amengual avatar
jose.amengual

I have been added as a Maintainer on the Atlantis project and we are now working trough PRs and merging some and there is some cool features coming soon

2
Steve Wade (swade1987) avatar
Steve Wade (swade1987)

Do you have a TL;DR on new features?

jose.amengual avatar
jose.amengual

there is a bunch of merged pr you can look at and we are reviewing a few more

jose.amengual avatar
jose.amengual

we will be cutting a release late this week or next week

jose.amengual avatar
jose.amengual

we are new as contributors so we are automating a few things so that we can iterate faster

jose.amengual avatar
jose.amengual

there is one new PR that we are looking at that will stream the terraform run on the atlantis UI so you can see what is happening

jose.amengual avatar
jose.amengual

the Github Teams PR needs test which currently I’m working on it

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

finally

jose.amengual avatar
jose.amengual

there has been a lot of work on Workflow customization lately

jose.amengual avatar
jose.amengual

repo side and server side

Steve Wade (swade1987) avatar
Steve Wade (swade1987)

streaming the tf apply output somewhere would be epic

2020-11-17

2020-11-19

2020-11-20

2020-11-21

2020-11-23

2020-11-24

2020-11-25

2020-11-30

    keyboard_arrow_up