-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Can't change subnet on ELB #727
Comments
Any update for this issue? I seem to run into it. |
I'm still facing this issue on below versions. terraform 0.11.1 Edit: I will take a look if this is easy to modify/fix. Edit 2: I took a stab at reordering Removal and Addition for elb resource. The new problem is that now I get an error regarding Multiple Subnets in same AZ.
|
This still happens on the following versions: terraform 0.11.6 |
Still happens for me too with last version |
Same error:
for terraform v0.11.11 and provider.aws v1.56.0. Is it that difficult to remove and attach the subnets one-by-one? |
I don't expect this will happen to me often, but wouldn't the solution here be to switch Terraform from modifying the ELB to making this a "force replace" scenario? Another thread recommended just deleting the ELBs in the console and re-running terraform, which seems like a good workaround here. |
That sounds like downtime to me. Given that you can change subnets in console without causing any downtime, this seems like an unacceptable workaround. |
Fair enough, my situation was moving the ELB from private to public, I wasn't considering that many are likely just switching the same type of subnet. In any case I'd rather have terraform orchestrate this move. |
Facing the same issue, was there a fix made in later versions? |
I am running into similar issue on following version. Any recommendation on how to address this issue?
Here is the entire plan with error: An execution plan has been generated and is shown below. Terraform will perform the following actions: module.jenkins_server.aws_elb.jenkins will be updated in-place
zone_id = "Z1H1FL5HABSF5" health_check {
Plan: 0 to add, 1 to change, 0 to destroy. Enter a value: yes module.jenkins_server.aws_elb.jenkins: Modifying... [id=some-service-global] Error: Failure removing ELB subnets: InvalidConfigurationRequest: Requested configuration change for LoadBalancer "some-service-global" is invalid because you attempted to detach all the subnets for this LoadBalancer and a LoadBalancer cannot be attached to zero subnets in VPC. |
This functionality has been released in v5.4.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This issue was originally opened by @FransUrbo as hashicorp/terraform#14072. It was migrated here as part of the provider split. The original body of the issue is below.
I'm converting a ELB to be an external (
internal = false
) one. That was done in a previous run, but I also realised I need to put it on the/a public network.So changing the subnet doesn't seem to work.
Terraform Version
0.9.1
Affected Resource(s)
Terraform Configuration Files
From
to
Gives me:
Expected Behavior
ELB subnet should be created without failing. ALTERNATIVELY (?) destroyed and created again with the new settings.
Actual Behavior
TF error out.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
The text was updated successfully, but these errors were encountered: