Open DamaniN opened 1 year ago
This could be solved using the azureCloudAccountTenant
GraphQL endpoint. We should probably add Tenant
as a concept to the Go SDK, to be used in the TF provider.
To fix this issue we need improvements to the GraphQL API. The issue has been raised with the engineering team.
Expected Behavior
Using the Azure CNP integration, an update of
polaris_azure_service_principal
should detect if the Azure AD tenant still exists in RSC.Current Behavior
I destroyed a Terraform script that removed the
polaris_azure_subscription
resource. This resource was linked to the last subscription in the tenant. This action also causes RSC to delete the last tenant. I then went to add the subscription back again by running a plan on the same resource. This resulted in the following error:I looked in RSC and noticed that the tenant domain was not there anymore. I then re-ran my TF script that creates the tenant domain in RSC via the
polaris_azure_service_principal
resource. Re-running the existing TF configuration resulted in the following message:This action should have resulted in TF finding that the tenant domain no longer existed and therefore putting it back. I was able to prove/workaround this by tainting the
polaris_azure_service_principal.polaris
resource and re-running the apply operation.Failure Information (for bugs)
See text above
Steps to Reproduce
polaris_azure_service_principal
resource.polaris_azure_subscription
resource.polaris_azure_subscription
resource, but do not destroy thepolaris_azure_service_principal
resource.polaris_azure_subscription
resource.Context
Failure Logs
See above.