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

feat(ci-staging): add connection for rust-lang-ci gh org #642

Merged
Merged
Show file tree
Hide file tree
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
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
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these changes so that the terraform diff was clear

}
}
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"
}
Loading