try new tf output var func
This commit is contained in:
Родитель
86042cabb7
Коммит
9f0466be08
2
Makefile
2
Makefile
|
@ -65,7 +65,7 @@ cyclo: ; $(info $(M) running gocyclo...) @ ## Run gocyclo on all source files
|
|||
$Q $(GOCYCLO) -over 19 $$($(GO_FILES))
|
||||
|
||||
terraform.tfstate: azuredeploy.tf $(wildcard terraform.tfvars) .terraform ; $(info $(M) running terraform...) @ ## Run terraform to provision infrastructure needed for testing
|
||||
$Q TF_VAR_azure_client_secret="$${AZURE_CLIENT_SECRET}" terraform apply -auto-approve
|
||||
$Q TF_VAR_azure_client_secret="$${ARM_CLIENT_SECRET}" terraform apply -auto-approve
|
||||
$Q terraform output > .env
|
||||
|
||||
.terraform:
|
||||
|
|
|
@ -150,15 +150,14 @@ output "AZURE_TENANT_ID" {
|
|||
}
|
||||
|
||||
output "AZURE_CLIENT_ID" {
|
||||
value = "${data.azurerm_client_config.current.service_principal_application_id == "" ? azurerm_azuread_application.test.0.application_id : data.azurerm_client_config.current.client_id}"
|
||||
value = "${element(compact(concat(azurerm_azuread_application.test.*.application_id, list(data.azurerm_client_config.current.client_id))),0)}"
|
||||
}
|
||||
|
||||
output "AZURE_CLIENT_SECRET" {
|
||||
value = "${data.azurerm_client_config.current.service_principal_application_id == "" ? azurerm_azuread_service_principal_password.test.0.value : var.azure_client_secret}"
|
||||
value = "${element(compact(concat(azurerm_azuread_service_principal_password.test.*.value, list(var.azure_client_secret))),0)}"
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
output "STORAGE_ACCOUNT_NAME" {
|
||||
value = "${azurerm_storage_account.test.name}"
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче