-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Risk of Terraform state drift when storage_profile_blob_driver_enabled is true #424
Comments
To reproduce using this module this is the minimal code:
and this is the Terraform state drift after creating the first
|
@lonegunmanb I am not sure how to move forward with this. The state drift is in a resource outside of the Adding the service endpoint in terraform fixes the drift:
However how can we enforce this when using |
Next steps:
|
I confirm that adding
There is still state drift, but the impact is much smaller and does not involve the destroy and create of the cluster:
|
Thanks @zioproto for tracing this issue, a If we use Another approach is using a datasource block which contains a |
I think using |
Introduction
When
storage_profile_blob_driver_enabled
is True, the CSI driver running in the AKS cluster will create a Service Endpoint"Microsoft.Storage"
as soon as the firstPersistentVolumeClaim
is created. This change done by the CSI driver is not tracked in the Terraform state and causes stage drift. Because of the dependencies in the modules this state drift causes the destroy and creation of a new cluster.Is there an existing issue for this?
Greenfield/Brownfield provisioning
greenfield
Terraform Version
1.5.5
Module Version
7.3.0
AzureRM Provider Version
v3.68.0
Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster
Terraform Configuration Files
tfvars variables values
N/A
Debug Output/Panic Output
Expected Behaviour
Terraform plan should show no changes
Actual Behaviour
Terraform will perform the following actions:
Steps to Reproduce
apply the following with
kubectl
:Once the Pod is running the Terraform state has drifted, run terraform again to confirm.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: