Tools to switch local Terraform versions:
If you encounter an rds instance will try to connect to localhost:3306
:
Error: Could not connect to server: dial tcp 127.0.0.1:3306: connect: connection refused
Error: Could not connect to server: dial tcp 127.0.0.1:3306: connect: connection refused
Try one of the following:
- Update to terraform version 0.14.x.
- Make sure resources are not tainted
- Do a local plan to get more verbose output and pay attention to exactly what connection is being refused
- It can also be because of this bug hashicorp/terraform#27785, then do a local targeted plan and apply on the RDS instance
The AWS Terraform provider has a bug and cannot update inbound rules, so you need to manually update the CIDR for all affected inbound rules to avoid collision
For a long time, Terraform could not put binaries into k8s secrets, but that is resolved with v2.0.1 of the kubernetes provider: hashicorp/terraform-provider-kubernetes#704
Make sure to update modules in lock step from v0.12 and onwards. If you jump straight to the latest version, you will most probably encounter error like:
To work with module... its original provider configuration at provider["registry.terraform.io/-/aws"]
is required, but it has been removed. This occurs when a provider
configuration is removed while objects created by that provider still exist in
the state. Re-add the provider configuration to destroy
module..., after which you can remove the provider configuration again.