Skip to content

Commit

Permalink
fix(blog): fix blog post linting issue (runatlantis#4684)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
Signed-off-by: kvanzuijlen <[email protected]>
  • Loading branch information
chenrui333 authored and kvanzuijlen committed Jan 4, 2025
1 parent 7d3a664 commit bb850e3
Showing 1 changed file with 33 additions and 14 deletions.
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 =)

0 comments on commit bb850e3

Please sign in to comment.