-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform doesn't delete the forwarding rules #57
Comments
terraform version
|
Also, the VM's get destroyed and recreated for every modification to the files that doesn't change the VM config, for instance updating the forwarding rules also destroys the VM and recreated the same. |
Which folder option did you deploy? standalone, HA LB, HA api? If deploying HA via API and a failover already occurred or IP move occurred...hence updating the forwarding rule, then it will no longer match TFSTATE and result in a failure like you see. Just a guess without knowing the folder you deployed. |
HA via API |
enable debug silly logs for runtime init onboarding in order to see why VM onboard fails Currently, f5 runtime init line looks like
You need to modify to look like...
Reference runtime init repo for more info on "Controls" |
This occurred a few times for me on destroy, fixed with update to bigip.tf: Forwarding rule for Public IPresource "google_compute_forwarding_rule" "vip1" { |
@AnthonyF5 were you receiving the same error as original ticket issue? Same HA via API template? |
Yes it was the same repo HA via API for GCP. The second target became an issue on my last destroy so I updated depends_on to include both: |
Next time this happens during a failed deploy, I would suggest trying the taint commands. This still seems like a tfstate issue due to the IP mapping and how instances are associated with target instances. In my testing, a failed or wiped VM needs to be tainted. Alternatively, terraform destroy the entire deployment and start over. Suggestion
|
Upon changing the VM variables the terraform update fails with the following error:
│ Error: Error when reading or editing TargetInstance: googleapi: Error 400: The target_instance resource 'ZONE:northamerica-northeast1-a/PROJECT:977287114090/TARGET_INSTANCE:myf5demo-ti-c389' is already being used by 'REGION:northamerica-northeast1/PROJECT:977287114090/FORWARDING_RULE:myf5demo-forwarding-rule-c389', resourceInUseByAnotherResource
Workaround: To manually delete the forwarding rules using the target instances. And, re-run terraform apply works.
The text was updated successfully, but these errors were encountered: