-
Notifications
You must be signed in to change notification settings - Fork 82
provision aws tokens for rust-lang/rust #666
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
base: master
Are you sure you want to change the base?
Conversation
@@ -2,7 +2,7 @@ terraform { | |||
required_providers { | |||
github = { | |||
source = "integrations/github" | |||
version = "~> 6.2.3" | |||
version = "~> 6.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows to update to versions >= 6.3
] | ||
Action = [ | ||
"s3:GetObject", | ||
"s3:DeleteObject", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is Delete needed? I copied because it was already there, but I don't think the CI needs to delete objects 🤔
Same for the caches bucket.
locals { | ||
rustc_builds = "rustc-builds" | ||
rustc_builds_alt = "rustc-builds-alt" | ||
iam_prefix = "rustc-ci--rust-lang--${var.repo}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This iam_prefix should guarantee that the iam stuff doesn't conflict with the existing one in the legacy account
7569cac
to
b00f87c
Compare
b717629
to
74a99a2
Compare
applied to staging |
e14451a
to
951f380
Compare
951f380
to
1409906
Compare
Related to rust-lang/infra-team#188
This PR creates two new terragrunt states:
/legacy/rustc-ci-staging/
to configure https://github.com/rust-lang/bors-kindergarten/legacy/rustc-ci-prod/
to configure https://github.com/rust-lang/rustI copied
terragrunt/modules/static-website
from the corresponding terraform module as it wasn't in terragrunt yet.Why I didn't setup the staging resources in the ci-staging account
rust-lang.org
Route 53 Hosted Zone. This means it would be more complex to get this done because we would need to find a way to use a different domain (such asci-staging.infra.rust-lang.org
). Me and JD verified that in terragrunt this was never done.ci-prod
aws account. Having the staging resources in the legacy account and moving the staging resources to theci-staging
account first, is going to be handy to prevent possible issues that might happen to the prod resources.Commands I ran to import the state in prod
Resources that we want to create
aws_cloudfront_response_headers_policy.s3
(it's not in the terraform state)aws_iam_role.try_builds
aws_iam_role_policy.try_builds
aws_iam_user_policy.artifacts_write
aws_iam_user_policy.caches_write
aws_s3_bucket_acl.artifacts
(the aws_s3_bucket_acl needs to be created because I fixed a warning in the terraform code).aws_s3_bucket_acl.caches
aws_s3_bucket_lifecycle_configuration.artifacts_lifecycle
(the aws_s3_bucket_lifecycle_configuration needs to be created because I fixed a warning in the terraform code).aws_s3_bucket_lifecycle_configuration.caches_lifecycle
module.artifacts_user.aws_iam_access_key.ci
module.artifacts_user.aws_iam_user.ci
module.artifacts_user.github_actions_environment_secret.aws_access_key_id[0]
module.artifacts_user.github_actions_environment_secret.aws_secret_access_key[0]
module.caches_user.aws_iam_access_key.ci
module.caches_user.github_actions_environment_secret.aws_access_key_id[0]
module.caches_user.github_actions_environment_secret.aws_secret_access_key[0]
module.caches_cdn.module.certificate.aws_acm_certificate_validation.cert
(if imported, terraform errors:resource aws_acm_certificate_validation doesn't support import
)What do to after this PR is approved