Skip to content
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

Global IP data source #148

Open
tomwganem opened this issue May 7, 2017 · 3 comments
Open

Global IP data source #148

tomwganem opened this issue May 7, 2017 · 3 comments
Labels

Comments

@tomwganem
Copy link
Contributor

I follow an active/standby pattern with my terraform clusters. I'm currently in need of a global ip that can be transferred between terraform clusters, depending on which one is active. I think the best way to do this is to have a global ip datasource and control the global ip lifecycle outside of terraform.

@renier renier added the feature label May 9, 2017
@tomwganem
Copy link
Contributor Author

Some more thoughts on the subject:

Would it be possible to not destroy a global ip resource when the "routes_to" attribute is updated?

Since softlayer supports having a global ip that is unrouted, and my use case for using global ips requires that I'm able to re-route them to different servers as needed, it would be extremely helpful if terraform could do that routing for me, as opposed to simply destroying the resource.

Another issue is that global ips do not clean up easily. The process that cleans up global ips runs very infrequently. So if in the course of testing terraform changes, terraform creates 5 global ips, but then destroys them when it detects a change to "routes_to", then I'm stuck, because an account can't have more than 5 global ips, and while the billing item in softlayer no longer exists, softlayer still detects that there are global ips under "SoftLayer_Account/getGlobalIpRecords" and will refuse to create any more until they are cleaned up.

@renier renier changed the title No global_ip datasource Global IP data source May 22, 2017
@renier
Copy link
Contributor

renier commented May 22, 2017

@tomwganem The global ip resource should already support updating the routes_to attribute without having to destroy the resource. If that is not how it works, you should file a separate bug for it.

@minsikl
Copy link
Contributor

minsikl commented May 26, 2017

@tomwganem If you want to update routes_to with terraform, you can edit the value of routes_to in .tf file and execute terraform apply. If you want to update routes_to using another system such as SL portal, you can use ignore_change block as follows:

resource "softlayer_global_ip" "test-global-ip" {
    routes_to = "X.X.X.X"
    lifecycle {
       ignore_changes = ["routes_to"]
    }
}

Then, terraform will ignore the update even if the routes_to is updated in SL portal. If you want to protect global IP from terraform destroy operation, you can use prevent_destroy block. For more detail, please refer the link

Global IP cleaning up problem also happens when you cancel global IPs in SL portal menu. It is necessary to open SL ticket for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants