Open martin-aders opened 8 months ago
Tested the patch. Azure only creates a Load Balancer but no corresponding IngressController resource on the cluster. However, the second ingress is only listed on the ingressProfiles list in the az/terraform state once an IngressController has been applied to the cluster. That's not so elegant but at least the patch solves the immediate problem of forced cluster recreation. Suggestions?
Patch has been updated according to the PR review and an acceptance test has been added to verify multiple load balancers are actually created. Waiting for the acceptance tests to be re-ran.
Is there an existing issue for this?
Community Note
Terraform Version
1.7.4
AzureRM Provider Version
3.90.0
Affected Resource(s)/Data Source(s)
azurerm_redhat_openshift_cluster
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
I would expect that terraform plan would detect that there is a new ingress being listed. Once the user adds a second ingress_profile block to the terraform openshift resource, the plan should suggest to fetch the data of this second ingress and update the state accordingly. No cluster recreation.
Not sure whether the Azure API allows creation of an ARO cluster with two ingresses defined. However, it should be at least possible to allow a second ingress to be present after creation of the ARO. Otherwise the ARO cluster cannot be managed anymore using terraform.
The minimal expectation is that all non-default ingresses would at least be ignored for the plan.
Actual Behaviour
Terraform plan suggests to recreate the cluster, based on a detected change on the ingress_profile:
Steps to Reproduce
1) Create a new ARO cluster, e.g. using the supplied sample config 2) Add a second IngressController to the cluster. Wait until the corresponding load balancer is ready on the Azure Portal. 3) Run terraform plan 4) Be surprised that your cluster must be recreated because there was a change on the ingress_profile. 5) Look at the Azure OpenShift API and see that indeed the ingressProfiles is a list containing two ingress profiles.
Important Factoids
No response
References