Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blog): fix blog post linting issue #4684

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 33 additions & 14 deletions runatlantis.io/blog/2024/integrating-atlantis-with-opentofu.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ Stack: Atlantis, Terragrunt, OpenTofu, Github, ALB, EKS.
We will implement it with your [Helm chart](https://www.runatlantis.io/docs/deployment.html#kubernetes-helm-chart):

**1** - Add the runatlantis repository.
```

```sh
helm repo add runatlantis https://runatlantis.github.io/helm-charts
```

**2** - Create file values.yaml and run:
```

```sh
helm inspect values runatlantis/atlantis > values.yaml
```

**3** - Edit the file values.yaml and add your credentials access and secret which will be used in the Atlantis webhook configuration:
See as create a [GitHubApp](https://docs.github.com/pt/apps/creating-github-apps/about-creating-github-apps).

```
```yaml
githubApp:
id: "CHANGE ME"
key: |
Expand All @@ -40,8 +44,10 @@ githubApp:
# secret webhook Atlantis
secret: "CHANGE ME"
```

**4** - Enter the org and repository from github that Atlantis will interact in orgAllowlist:
```

```yaml
# All repositories the org
orgAllowlist: github.com/MY-ORG/*

Expand All @@ -53,8 +59,10 @@ or
# All repositories that start with MY-REPO-IAC-
orgAllowlist: github.com/MY-ORG/MY-REPO-IAC-*
```

**5** - Now let’s configure the script that will be executed upon startup of the Atlantis init pod. In this step we download and install Terragrunt and OpenTofu, as well as include their binaries in the shared dir ```/plugins```.
```

```yaml
initConfig:
enabled: true
image: alpine:latest
Expand Down Expand Up @@ -84,15 +92,19 @@ initConfig:
chmod 755 "${TF_FILE}"
tofu -v
```

**6** - Here we configure the envs to avoid downloading alternative versions of Terraform and indicate to Terragrunt where it should fetch the OpenTofu binary.
```

```yaml
# envs
environment:
ATLANTIS_TF_DOWNLOAD: false
TERRAGRUNT_TFPATH: /plugins/tofu
```

**7** - Last but not least, here we specify which Atlantis-side configurations we will have for the repositories.
```

```yaml
# repository config
repoConfig: |
---
Expand All @@ -102,8 +114,10 @@ repoConfig: |
allow_custom_workflows: true
allowed_overrides: [workflow, apply_requirements, delete_source_branch_on_merge]
```

**8** - Configure Atlantis webhook ingress, in the example below we are using the AWS ALB.
```

```yaml
# ingress config
ingress:
annotations:
Expand All @@ -125,10 +139,12 @@ ingress:
path: /*
pathType: ImplementationSpecific
```

Save all changes made to ```values.yaml```

**9** - Using one of the Atlantis options custom workflows, we can create a file ```atlantis.yaml``` in the root folder of your repository, the example below should meet most scenarios, adapt as needed.
```

```yaml
version: 3
automerge: true
parallel_plan: true
Expand Down Expand Up @@ -158,13 +174,16 @@ workflows:
steps:
- run: terragrunt apply $PLANFILE
```

**10** - Now let’s go to the installation itself, search for the available versions of Atlantis:
```

```sh
helm search repo runatlantis
```

Replace ```CHART-VERSION``` with the version you want to install and run the command below:

```
```sh
helm upgrade -i atlantis runatlantis/atlantis --version CHART-VERSION -f values.yaml --create-namespace atlantis
```

Expand All @@ -174,8 +193,8 @@ See as Atlantis [work](../../docs/using-atlantis.md).

Find out more at:

https://www.runatlantis.io/guide.html.
https://opentofu.org/docs/.
https://github.com/runatlantis/atlantis/issues/3741.
- <https://www.runatlantis.io/guide.html>.
- <https://opentofu.org/docs/>.
- <https://github.com/runatlantis/atlantis/issues/3741>.

Share it with your friends =)