Skip to content

Commit 122df2e

Browse files
authored
Merge pull request #8761 from iftachk/atlantis-onboard-kops-infra-ci
configure kops-infra-ci to use atlantis
2 parents 363b3f5 + 2ce019e commit 122df2e

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

.atlantis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ projects:
1010
branch: /main/
1111
dir: infra/aws/terraform/artifacts.k8s.io
1212
workflow: aws
13+
- name: kops-infra-ci
14+
branch: /main/
15+
dir: infra/aws/terraform/kops-infra-ci
16+
workflow: aws
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
assume_role = {
2+
role_arn = "arn:aws:iam::354561287328:role/OrganizationAccountAccessRole"
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
atlantis_role_arn = "arn:aws:iam::354561287328:role/OrganizationAccountAccessRole"

infra/aws/terraform/kops-infra-ci/locals.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ limitations under the License.
1616

1717

1818
locals {
19-
kops-infra-ci-name = "kops-infra-ci"
20-
kops-infra-ci-index = index(data.aws_organizations_organization.current.accounts.*.name, local.kops-infra-ci-name)
21-
kops-infra-ci-account-id = data.aws_organizations_organization.current.accounts[local.kops-infra-ci-index].id
22-
2319
prefix = "k8s-infra-kops"
2420
cluster_name = "${local.prefix}-prow-build"
2521
cluster_autoscaler_version = "v${var.eks_version}.5"

infra/aws/terraform/kops-infra-ci/providers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ provider "aws" {
1919
alias = "kops-infra-ci"
2020

2121
assume_role {
22-
role_arn = "arn:aws:iam::${local.kops-infra-ci-account-id}:role/OrganizationAccountAccessRole"
22+
role_arn = var.atlantis_role_arn
2323
}
2424
}
2525

infra/aws/terraform/kops-infra-ci/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,8 @@ variable "vpc_cidr" {
4646
description = "CIDR of the VPC"
4747
default = "10.128.0.0/16"
4848
}
49+
50+
variable "atlantis_role_arn" {
51+
description = "The ARN of the Atlantis IAM role"
52+
default = null
53+
}

0 commit comments

Comments
 (0)