Skip to content

Commit

Permalink
feat(ci-staging): add connection for rust-lang-ci gh org
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Dec 5, 2024
1 parent f8ad90d commit 9a59ee4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
3 changes: 2 additions & 1 deletion terragrunt/accounts/ci-staging/ci-runners/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ include {
}

inputs = {
code_connection_arn = "arn:aws:codeconnections:us-east-2:442426873467:connection/98864d5c-b905-4f8e-bd76-2f69cf181818"
rust_lang_code_connection_arn = "arn:aws:codeconnections:us-east-2:442426873467:connection/98864d5c-b905-4f8e-bd76-2f69cf181818"
rust_lang_ci_code_connection_arn = "arn:aws:codeconnections:us-east-2:442426873467:connection/dfa33048-75a5-4409-8700-5f099d558c52"
}
9 changes: 6 additions & 3 deletions terragrunt/modules/ci-runners/codebuild.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ resource "aws_codebuild_project" "ubuntu_small" {

source {
type = "GITHUB"
// Dummy repository.
// TODO: can we put the real repos even if we use github app?
location = "https://github.com/rust-lang/infra-team.git"
// test repository
location = "https://github.com/rust-lang/aws-runners-test"
git_clone_depth = 1

git_submodules_config {
fetch_submodules = false
}
}
}
3 changes: 2 additions & 1 deletion terragrunt/modules/ci-runners/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ resource "aws_iam_role_policy" "codebuild_policy" {
"codeconnections:GetConnection"
]
Resource = [
var.code_connection_arn
var.rust_lang_code_connection_arn,
var.rust_lang_ci_code_connection_arn
]
}
]
Expand Down
8 changes: 6 additions & 2 deletions terragrunt/modules/ci-runners/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Since you can't create the connection from the terraform provider (as of Dec 2024),
// you need to create the connection manually at
// https://us-east-2.console.aws.amazon.com/codesuite/settings/connections
variable "code_connection_arn" {
description = "Arn of the GitHub CodeConnection"
variable "rust_lang_code_connection_arn" {
description = "Arn of the GitHub CodeConnection for https://github.com/rust-lang"
}

variable "rust_lang_ci_code_connection_arn" {
description = "Arn of the GitHub CodeConnection for https://github.com/rust-lang-ci"
}

0 comments on commit 9a59ee4

Please sign in to comment.