Skip to content

Commit 32d773e

Browse files
authored
Merge pull request #8684 from upodroid/atlantis-bump
bump atlantis and configure it to run against our AWS organization
2 parents 4b1eeb5 + 277ea19 commit 32d773e

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

.atlantis.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,27 @@ parallel_plan: true
66
parallel_apply: true
77
abort_on_execution_order_fail: true
88
projects:
9-
- name: k8s-infra-ii-sandbox
10-
branch: /main/
11-
dir: infra/gcp/terraform/k8s-infra-ii-sandbox
12-
workspace: default
13-
terraform_version: v1.3.0
9+
- name: artifacts.k8s.io
10+
branch: /main/
11+
dir: infra/aws/terraform/artifacts.k8s.io
12+
workflow: aws
13+
# For AWS, atlantis needs to assume a specific role in each account except the management account
14+
# so we read it from the folder that atlantis will work on
15+
workflows:
16+
aws:
17+
plan:
18+
steps:
19+
- init:
20+
extra_args: ["--backend-config", "atlantis.config"]
21+
- plan:
22+
extra_args: ["-var-file", "atlantis.tfvars"]
23+
apply:
24+
steps:
25+
- apply:
26+
extra_args: ["-var-file", "atlantis.tfvars"]
27+
import:
28+
steps:
29+
- init:
30+
extra_args: ["--backend-config", "atlantis.config"]
31+
- import:
32+
extra_args: ["-var-file", "atlantis.tfvars"]

kubernetes/gke-utility/atlantis/kustomization.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resources:
99

1010
images:
1111
- name: ghcr.io/runatlantis/atlantis
12-
newTag: v0.34.0
12+
newTag: v0.36.0
1313

1414
configMapGenerator:
1515
- name: atlantis-config
@@ -29,6 +29,12 @@ patchesStrategicMerge:
2929
containers:
3030
- name: atlantis
3131
env:
32+
- name: AWS_ROLE_ARN
33+
value: arn:aws:iam::348685125169:role/atlantis
34+
- name: AWS_WEB_IDENTITY_TOKEN_FILE
35+
value: /var/run/secrets/aws-iam-token/serviceaccount/token
36+
- name: AWS_REGION
37+
value: us-east-2
3238
- name: ATLANTIS_CONFIG
3339
value: /config/atlantis.yaml
3440
- name: ATLANTIS_GH_TOKEN
@@ -51,7 +57,18 @@ patchesStrategicMerge:
5157
volumeMounts:
5258
- name: config
5359
mountPath: /config
60+
- mountPath: /var/run/secrets/aws-iam-token/serviceaccount
61+
name: aws-iam-token
62+
readOnly: true
5463
volumes:
5564
- name: config
5665
configMap:
5766
name: atlantis-config
67+
- name: aws-iam-token
68+
projected:
69+
defaultMode: 420
70+
sources:
71+
- serviceAccountToken:
72+
audience: sts.amazonaws.com
73+
expirationSeconds: 86400
74+
path: token

0 commit comments

Comments
 (0)