diff --git a/terraform/modules/spack_gitlab/runner_iam.tf b/terraform/modules/spack_gitlab/runner_iam.tf index a56941e64..7a100d9b8 100644 --- a/terraform/modules/spack_gitlab/runner_iam.tf +++ b/terraform/modules/spack_gitlab/runner_iam.tf @@ -30,6 +30,14 @@ locals { ], } } + + repo_ci_config = { + "default_variables" = { + "ARTIFACT_DOWNLOAD_ATTEMPTS" = "3", + "GET_SOURCES_ATTEMPTS" = "3", + "RESTORE_CACHE_ATTEMPTS" = "3", + } + } } data "aws_caller_identity" "current" {} @@ -124,6 +132,14 @@ resource "gitlab_project_variable" "binary_mirror_role_arn" { value = each.value.arn } +resource "gitlab_project_variable" "default_variables" { + for_each = local.repo_ci_config.default_variables + + project = data.gitlab_project.spack_packages.id + key = each.key + value = each.value +} + # pre_build.py needs access to this to request PR prefix scoped permissions resource "gitlab_project_variable" "pr_binary_mirror_bucket_arn" { project = data.gitlab_project.spack.id @@ -139,6 +155,14 @@ resource "gitlab_project_variable" "binary_mirror_role_arn_spack_packages" { value = each.value.arn } +resource "gitlab_project_variable" "default_variables_spack_packages" { + for_each = local.repo_ci_config.default_variables + + project = data.gitlab_project.spack_packages.id + key = each.key + value = each.value +} + # pre_build.py needs access to this to request PR prefix scoped permissions resource "gitlab_project_variable" "pr_binary_mirror_bucket_arn_spack_packages" { project = data.gitlab_project.spack_packages.id