Open davidkarlsen opened 11 months ago
Hi @davidkarlsen ,
Thank you for taking time to report this issue and apologize for the late response.
It seems to be an issue on the API side. There's a workaround for this, hope it could help you.
azapi_resource.aro
block, and name it "import" for example, then change its type to Microsoft.RedHatOpenShift/openShiftClusters@2023-07-01-preview
terraform import azapi_resource.import /subscriptions/****/resourceGroups/****/providers/Microsoft.RedHatOpenShift/openShiftClusters/****?api-version=2023-07-01-preview
to import the resource into terraform stateterraform plan
to check the diff. When import a new resource, azapi provider will add every configurable fields in the state, so you'll see there're lots of fields are not defined in the config, you can add the necessary fields to the config then run terraform apply
to update the terraform state.terraform state rm azapi_resource.aro
command to remove the old resource from terraform state. And remove the azapi_resource.aro
block from config.
I have this resource, which I bumped the api from one version to another (https://learn.microsoft.com/en-us/azure/templates/microsoft.redhatopenshift/openshiftclusters?pivots=deployment-language-terraform) - but now I provide an explicit value for a property which was not there before (it was an opt-in feature before, that I had to enable at provider level).
now it fails with:
which is a bit strange - because I set the same value as which is returned with az aro list (the value is UserDefinedRouting).
how can I get out of this?