зеркало из https://github.com/microsoft/cobalt.git
removing hard coded repo name
This commit is contained in:
Родитель
aca5a9407a
Коммит
1cd55e4d69
|
@ -8,37 +8,37 @@ EOF
|
|||
}
|
||||
|
||||
resource "github_actions_secret" "sp_client_id" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_ARM_CLIENT_ID", upper(var.environment_name))
|
||||
plaintext_value = azuread_service_principal.sp.application_id
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "sp_client_secret" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_ARM_CLIENT_SECRET", upper(var.environment_name))
|
||||
plaintext_value = random_password.sp.result
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "tf_vars_file" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_TF_VARS", upper(var.environment_name))
|
||||
plaintext_value = local.tf_vars_file
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "storage_account" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_AZURE_STORAGE_ACCOUNT_NAME", upper(var.environment_name))
|
||||
plaintext_value = var.backend_storage_account_name
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "storage_container" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_AZURE_STORAGE_ACCOUNT_CONTAINER", upper(var.environment_name))
|
||||
plaintext_value = azurerm_storage_container.tfstate.name
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "storage_subscription" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = format("%s_AZURE_STORAGE_ACCOUNT_SUBSCRIPTION", upper(var.environment_name))
|
||||
plaintext_value = var.subscription_id
|
||||
}
|
||||
|
|
|
@ -28,3 +28,8 @@ variable "prefix" {
|
|||
type = string
|
||||
description = "Naming prefix for resources in Azure"
|
||||
}
|
||||
|
||||
variable "repository" {
|
||||
type = string
|
||||
description = "The Github repository"
|
||||
}
|
||||
|
|
|
@ -12,43 +12,43 @@ EOF
|
|||
}
|
||||
|
||||
resource "github_actions_secret" "registry" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "CI_REGISTRY"
|
||||
plaintext_value = azurerm_container_registry.acr.login_server
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "registry_user" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "CI_REGISTRY_USER"
|
||||
plaintext_value = azuread_service_principal.acr.application_id
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "registry_password" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "CI_REGISTRY_PASSWORD"
|
||||
plaintext_value = random_password.acr.result
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "docker_auth" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "DOCKER_AUTH_CONFIG"
|
||||
plaintext_value = local.docker_auth_json
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "storage_key" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "ARM_ACCESS_KEY"
|
||||
plaintext_value = azurerm_storage_account.ci.primary_access_key
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "sub_id" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "ARM_SUBSCRIPTION_ID"
|
||||
plaintext_value = data.azurerm_client_config.current.subscription_id
|
||||
}
|
||||
|
||||
resource "github_actions_secret" "tenant_id" {
|
||||
repository = "gh-actions-tf-bedrock"
|
||||
repository = var.repository
|
||||
secret_name = "ARM_TENANT_ID"
|
||||
plaintext_value = data.azurerm_client_config.current.tenant_id
|
||||
}
|
|
@ -5,6 +5,7 @@ output "backend-state-account-name" {
|
|||
|
||||
output "backend-state-account-key" {
|
||||
value = azurerm_storage_account.ci.primary_access_key
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
output "backend-state-bootstrap-container-name" {
|
||||
|
|
|
@ -18,3 +18,8 @@ variable "prefix" {
|
|||
type = string
|
||||
description = "Naming prefix for resources in Azure"
|
||||
}
|
||||
|
||||
variable "repository" {
|
||||
type = string
|
||||
description = "The Github repository"
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче