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
Configuration after changes (2 elb certificates are being deleted)
resource"opentelekomcloud_lb_certificate_v2""elb_certificates" {
count=1# <-- Only change, from 3 to 1name="pixx${count.index}.com"domain="pixx${count.index}.com"private_key=file("/home/linux/ssl-${count.index}/priv.key")
certificate=file("/home/linux/ssl-${count.index}/cert.crt")
# Resource elb_listener is the same
}
Create a opentelekomcloud_lb_certificate_v2 resource with "count" (list should have at least 2 entries)
Create a opentelekomcloud_lb_listener_v2 resource and assign the lb_certificates from step 1 to the sni_container_refs variable over a for loop
Run the file with terraform apply
Reduce the count in the newly created opentelekomcloud_lb_certificate_v2 resource (so in real time you would delete some certificates from the elastic load balancer)
Run terraform apply again
Expected Behavior
Terraform first updates the opentelekomcloud_lb_listener_v2 resource and removes the lb_certificates from the sni_container_refs list (as they are deleted), and then removes the certificates from the Elastic Load Balancer
Actual Behavior
Terraform tries to delete the certificates from the Elastic Load Balancer before removing them from the sni_container_refs list, which is not possible and results in a timeout
Additional Information
A short summary about my case and problem:
I use the resource opentelekomcloud_lb_listener_v2 in Terraform as a list with all certificates the load balancer should have (for simplicity I use only count = 3 in the original configuration above, but in real I have a list in my .tfvars - file with all certificates).
After that, I want to use some of these certificates in a SNI list for my public HTTPS load balancer. So I have a for loop inside the sni_container_refs variable that returns a list of all the certificate ids I want to use (you can see the final result in the terraform show - output).
Now I want to delete some certificates as they may have expired.
In the above configuration (see configuration after changes) I just reduced the count number to 1. In real time I would delete some entries from my list in the .tfvars file.
The above output from terraform apply shows the right things: the two certificates are deleted and removed from the list in the sni_container_refs variable.
But After the apply, terraform tries to delete the certificates before removing them from the sni_container_refs variable, which is not possible (at least that's my guess) and therefore leads to a timeout after 5 minutes
The text was updated successfully, but these errors were encountered:
grafburg
changed the title
Timeout when deleting an ELB certificate assigned to a listener
Timeout when deleting an ELB certificate assigned to sni_container_refs inside a lb_listener
Mar 30, 2021
grafburg
changed the title
Timeout when deleting an ELB certificate assigned to sni_container_refs inside a lb_listener
Timeout when deleting a lb_certificate assigned to sni_container_refs inside a lb_listener
Mar 30, 2021
Get rid of acc test workaround for `lb_listener`
Summary of the Pull Request
Make default_tls_container_ref and client_ca_tls_container_ref computed
Change type of sni_container_refs to TypeSet
Part of #981
PR Checklist
Refers to: #981#944
Tests added/passed.
Schema updated.
Acceptance Steps Performed
=== RUN TestAccLBV2Listener_basic
--- PASS: TestAccLBV2Listener_basic (86.02s)
=== RUN TestAccLBV2Listener_tls
--- PASS: TestAccLBV2Listener_tls (83.56s)
PASS
Process finished with the exit code 0
Reviewed-by: Rodion Gyrbu <fpsoff@outlook.com>
Reviewed-by: Anton Sidelnikov <None>
Reviewed-by: None <None>
Fix certificate deletion
Summary of the Pull Request
Remove certificate from listeners if the deletion fails
Fixes#944
PR Checklist
Refers to: #944
Tests added/passed.
Acceptance Steps Performed
=== RUN TestAccLBV2ListenerSni
--- PASS: TestAccLBV2ListenerSni (416.19s)
PASS
Process finished with the exit code 0
Reviewed-by: None <None>
Reviewed-by: Rodion Gyrbu <fpsoff@outlook.com>
Reviewed-by: Anton Sidelnikov <None>
Terraform Version
Affected Resource(s)
opentelekomcloud_lb_listener_v2
opentelekomcloud_lb_certificate_v2
Terraform Configuration Files
Original configuration:
Configuration after changes (2 elb certificates are being deleted)
Debug Output/Panic Output
"Terraform show" with the original config
"Terraform apply" with the configuration after changes (count from 3 to 1)
Steps to Reproduce
Expected Behavior
Terraform first updates the opentelekomcloud_lb_listener_v2 resource and removes the lb_certificates from the sni_container_refs list (as they are deleted), and then removes the certificates from the Elastic Load Balancer
Actual Behavior
Terraform tries to delete the certificates from the Elastic Load Balancer before removing them from the sni_container_refs list, which is not possible and results in a timeout
Additional Information
A short summary about my case and problem:
I use the resource opentelekomcloud_lb_listener_v2 in Terraform as a list with all certificates the load balancer should have (for simplicity I use only count = 3 in the original configuration above, but in real I have a list in my .tfvars - file with all certificates).
After that, I want to use some of these certificates in a SNI list for my public HTTPS load balancer. So I have a for loop inside the sni_container_refs variable that returns a list of all the certificate ids I want to use (you can see the final result in the terraform show - output).
Now I want to delete some certificates as they may have expired.
In the above configuration (see configuration after changes) I just reduced the count number to 1. In real time I would delete some entries from my list in the .tfvars file.
The above output from terraform apply shows the right things: the two certificates are deleted and removed from the list in the sni_container_refs variable.
But After the apply, terraform tries to delete the certificates before removing them from the sni_container_refs variable, which is not possible (at least that's my guess) and therefore leads to a timeout after 5 minutes
The text was updated successfully, but these errors were encountered: