Open gevraud opened 5 months ago
We get the same thing every time we plan/apply.
module.aks.azurerm_role_assignment.application_gateway_resource_group_reader and module.aks.azurerm_role_assignment.application_gateway_existing_vnet_network_contributor
will be re-created every time (known after apply)
For some reason the value of the principal_id
is changing at every Terraform plan.
@gevraud in your actual plan what do you see instead of "bbbb" ? Does the value actually change?
I confirm I was able to reproduce the problem on 8.0.0 but not on 9.0.0 or 9.1.0.
It is working properly in 9.0.0 and newer versions because since the version 9.0.0 there is this change: 6abee9eaf84ef95f7ca59017ff5251dea7957561 from PR https://github.com/Azure/terraform-azurerm-aks/pull/554
AKS had a change in the default behaviour that caused a state drift. When using 8.0.0 you should have also the following on top of the proposed plan:
Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan:
# module.aks.azurerm_kubernetes_cluster.main has changed
~ resource "azurerm_kubernetes_cluster" "main" {
id = "/subscriptions/xxxx/resourceGroups/<rg>/providers/Microsoft.ContainerService/managedClusters/ccccc"
name = "cccccc"
# (39 unchanged attributes hidden)
~ identity {
+ identity_ids = []
# (3 unchanged attributes hidden)
}
# (7 unchanged blocks hidden)
}
Those identity ids change propagate into the problem described in this issue.
Could you please try to reproduce on version 9.1.0 and confirm the problem is fixed ?
thanks
For some reason the value of the
principal_id
is changing at every Terraform plan.@gevraud in your actual plan what do you see instead of "bbbb" ? Does the value actually change? Hello,
I created permission without the module. I don't use the module permission anymore.
Regards
Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
1.8.2
Module Version
8.0.0
AzureRM Provider Version
3.101
Affected Resource(s)/Data Source(s)
azurerm_resource_group_template_deployment
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
no recreation should happen
Actual Behaviour
it recreates the permission each time Terraform is running
Steps to Reproduce
No response
Important Factoids
No response
References
No response