Skip to content

Commit

Permalink
Client config objectid (#24)
Browse files Browse the repository at this point in the history
* Terraform 1.2.1

* Update providers

* Switch to azuread_client_config, mitigating hashicorp/terraform-provider-azurerm#16982
  • Loading branch information
geekzter authored May 28, 2022
1 parent 19570b1 commit 9a2f052
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 70 deletions.
2 changes: 1 addition & 1 deletion terraform/.terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.7
1.2.1
134 changes: 68 additions & 66 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {
workspace_moniker = terraform.workspace == "default" ? "" : terraform.workspace
}

# Usage: https://www.terraform.io/docs/providers/azurerm/d/client_config.html
data azuread_client_config current {}
data azurerm_client_config current {}
data azurerm_subscription primary {}

Expand All @@ -47,7 +47,7 @@ resource azurerm_resource_group rg {
environment = local.environment
provisioner = "terraform"
provisioner-client-id = data.azurerm_client_config.current.client_id
provisioner-object-id = data.azurerm_client_config.current.object_id
provisioner-object-id = data.azuread_client_config.current.object_id
repository = "azure-aks"
runid = var.run_id
shutdown = "true"
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module aks {

admin_username = "aksadmin"
application_gateway_subnet_id= module.network.application_gateway_subnet_id
client_object_id = data.azurerm_client_config.current.object_id
client_object_id = data.azuread_client_config.current.object_id
dns_prefix = "ew-aks"
dns_host_suffix = var.dns_host_suffix
location = var.location
Expand Down

0 comments on commit 9a2f052

Please sign in to comment.