Made edits per Code Review

This commit is contained in:
Tom Archer 2023-05-24 11:59:56 -07:00
parent b316c4dd0d
commit 88d524b952
3 changed files with 15 additions and 0 deletions

View File

@ -72,4 +72,6 @@ resource "azurerm_kubernetes_cluster" "k8s" {
client_id = azuread_service_principal.app.application_id
client_secret = azuread_service_principal_password.app.value
}
depends_on = [time_sleep.wait_30_seconds]
}

View File

@ -14,6 +14,10 @@ terraform {
source = "hashicorp/random"
version = "~>3.0"
}
time = {
source = "hashicorp/time"
version = "0.9.1"
}
}
}

View File

@ -16,6 +16,15 @@ resource "azuread_service_principal_password" "app" {
service_principal_id = azuread_service_principal.app.id
}
# Sleep for 30 seconds to allow for propagation
# of the Service Principal creation before attempting
# to create the AKS cluster.
resource "time_sleep" "wait_30_seconds" {
create_duration = "30s"
depends_on = [azuread_service_principal_password.app]
}
# Output the Service Principal and password
output "sp" {
value = azuread_service_principal.app.id