Atlantis: Terraform Pull Request Automation Guide

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ย. 2024

ความคิดเห็น • 4

  • @RaduPopa-jd6oc
    @RaduPopa-jd6oc 4 หลายเดือนก่อน +2

    Hey, thank you for your video. One thing I don't understand is why would you apply the changes in the PR before merging into main branch.
    Isn't the point of GitOps that the "main" branch would be the source of truth for your infrastructure? If there are 2 developers creating pull requests and both of them applying their changes, how would a third colleague know what is the latest state of the infrastructure?

    • @Chathumal2011
      @Chathumal2011 4 หลายเดือนก่อน

      The main branch always contains the current infrastructure state. So if someone needs to create new infra change he has to first clone the main branch and create a PR, ataltins apply it and finally merge. I think it will not allow us to merge to main branch without fulfilling all the checks in the PR which includes applying the terraform changes.
      If 2 developers working on the changes on same 'terraform state' file ( means they both are working on the same directory ), atlantis plan will run only for the 1st Pull Requests ( who ever creats ) and will be shown the changes as a comment. Then if the 2nd one creates another PR, atlantis will not plan his changes and instead he will be notified (as a comment of course) that another PR (1st PR in this case) is in progress and need to close it in order to proceed. Then they both can discuss each other to proceed with which one first.
      Lets say these 2 guyz are from different teams and don't know each other, then the 2nd guy has to wait until the 1st guy plans and applies his changes. Once done, the 2nd guy has to pull the changes from the main branch and update the PR. Then continue with atlantis plan and apply.

  • @robertcarlsson1781
    @robertcarlsson1781 หลายเดือนก่อน

    Wouldn’t the proper way in a production scenario to have a review before the Atlantis Apply? Imho that’s the ”dangerous” part of this pull request.

  • @gladifineran1664
    @gladifineran1664 ปีที่แล้ว

    *promo sm*