#atlantis - November 2020

atlantisArchived
34 messages

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

November 2020
joshmyers
joshmyersalmost 6 years ago
Anyone here using the Slack Atlantis webhook integration?
joshmyers
joshmyersalmost 6 years ago
joshmyers
joshmyersalmost 6 years ago(edited)
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)
Steve Wade (swade1987)almost 6 years ago(edited)
this is my next thing to setup ☝️
joshmyers
joshmyersalmost 6 years ago
It doesn’t work natively via Atlantis due to Slack API deprecations
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
i am using the upstream tf module as well and don't see any integration points either
joshmyers
joshmyersalmost 6 years ago
Nope, you need to add some webhook config to the Atlantis image which is undocumented
joshmyers
joshmyersalmost 6 years ago
joshmyers
joshmyersalmost 6 years ago
There is loads of open issues in https://github.com/slack-go/ about the Slack deprecated APIs 😞
PePe Amengual
PePe Amengualalmost 6 years ago
is there another go slack library?
joshmyers
joshmyersalmost 6 years ago
Probably, but it isn’t the one Atlantis is using.
joshmyers
joshmyersalmost 6 years ago
Not forking Atlantis for undocumented/hacky features when there are good alternatives like https://github.com/cloudposse/slack-notifier
joshmyers
joshmyersalmost 6 years ago
Everyone is running TF through some wrapper anyway, right 😉
PePe Amengual
PePe Amengualalmost 6 years ago
Atlantis is falling behind sadly
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
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
joshmyersalmost 6 years ago
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)
Steve Wade (swade1987)almost 6 years ago
the constraint is there
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
and the image we are using is v0.15.1
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago

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)
Steve Wade (swade1987)almost 6 years ago
i might just explicitly set that verison
joshmyers
joshmyersalmost 6 years ago
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)
Steve Wade (swade1987)almost 6 years ago
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)
Steve Wade (swade1987)almost 6 years ago
the atlantis.yml in the repo is

version: 3
projects:
  - name: latest
    dir: .
    autoplan:
      when_modified: ["*.tf"]
      enabled: true

Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
this has been working fine for ages i think its because the upstream tf module uses the latest image by default 🤦
joshmyers
joshmyersalmost 6 years ago
Yeah, don’t do that.
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
the fact they default to latest is crazy imo
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
what i don't know now though is why the apply errors out
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
any ideas as i am stumped
joshmyers
joshmyersalmost 6 years ago
Where do you see that stat log line? os.Stat is called in a few places in Atlantis codebase
joshmyers
joshmyersalmost 6 years ago
I’m assuming it is complaining about the PLANFILE not being present for the apply after a plan?
Steve Wade (swade1987)
Steve Wade (swade1987)almost 6 years ago
weird after doing a new plan and apply it worked
PePe Amengual
PePe Amengualalmost 6 years ago
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
PePe Amengual
PePe Amengualalmost 6 years ago
But a new plan does a similar thing
PePe Amengual
PePe Amengualalmost 6 years ago
@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?