You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: A resource with the ID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/terraform/xxxxxxxxx/xxxxxxxxx.xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxx/xxxxxx-xxxxx-xxxx" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_kubernetes_cluster" for more information.
│
│ with module.aks.azurerm_kubernetes_cluster.main,
│ on .terraform/modules/aks/main.tf line 17, in resource "azurerm_kubernetes_cluster" "main":
│ 17: resource "azurerm_kubernetes_cluster" "main" {
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Hi @zioproto, I have attached the terraform apply output to the Debug Output/Panic Output planned output and I have attached the error I was facing while terraform apply in the' Actual Behavior' section.
The resource given in the error was already managed and created by Terraform. I was changing a configuration of the cluster previously the cluster does not enable the RBAC. when I tried to allow the rbac to the cluster it triggered the recreation of the cluster the thing is it was trying to create the replacement first and destroy it after the replacement was created and it was trying to create it with the same name. this was the issue. terraform apply output error.
Error: A resource with the ID "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/terraform/providers/Microsoft.ContainerService/managedClusters/xxxxxx-azure-test" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_kubernetes_cluster" for more information.
│
│ with module.aks.azurerm_kubernetes_cluster.main,
│ on .terraform/modules/aks/main.tf line 17, in resource "azurerm_kubernetes_cluster" "main":
│ 17: resource "azurerm_kubernetes_cluster" "main" {
│
I have tainted this resource module.aks.azurerm_kubernetes_cluster.main is tainted, so must be replaced
Is there an existing issue for this?
Greenfield/Brownfield provisioning
brownfield
Terraform Version
1.9.8
Module Version
9.0.0
AzureRM Provider Version
3.117.0
Affected Resource(s)/Data Source(s)
module.aks.azurerm_kubernetes_cluster.main
Terraform Configuration Files
tfvars variables values
Debug Output/Panic Output
Expected Behaviour
No response
Actual Behaviour
terraform apply error output
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: