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

r/ovh_iploadbalancing_tcp_frontend: new resource #58

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

yanndegat
Copy link
Collaborator

No description provided.

@ghost ghost added the size/XL label Oct 1, 2018
@yanndegat
Copy link
Collaborator Author

hi @goblain

i'm adding this new resource
wonder if you could had a glimpse at it & review it ?

one major point: the refresh mechanism which is missing the farm/farm_server resources.
i'll make another PR to fix these too

@goblain
Copy link
Contributor

goblain commented Oct 1, 2018

will look in a moment, btw. I actually have a refresh that I use, but no tests around it (https://github.com/goblain/terraform-provider-ovh/blob/workinprogress/ovh/resource_ovh_iploadbalancing_refresh.go)

@goblain
Copy link
Contributor

goblain commented Oct 1, 2018

I do not specially like the idea that resource update triggers immediate refresh within it's change logic. If we have more then one change, it will add extreme delays to the operation. As I hinted above, I would lean more to having a refresh resource that can be used after all the changes were implemented, to trigger a single reload of full new config. This also helps to avoid application of partial state to the OVH loadbalancer, as it's then called only after full state is configured.

resource "ovh_iploadbalancing_refresh" "ingress" {
  service_name = "${data.ovh_iploadbalancing.lb.id}"
  keepers = [
    "${ovh_iploadbalancing_tcp_farm_server.ingress-80-compute-blue.*.address}",
    "${ovh_iploadbalancing_tcp_farm_server.ingress-443-compute-blue.*.address}"
  ]
}

is how I use it in my case, to trigger refresh after resources were changed

@yanndegat
Copy link
Collaborator Author

you're abs. right

then we'll try to work on your refresh resource
don't you mind to make a PR, i'll merge it and try to add the missing features ?

Copy link
Contributor

@goblain goblain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few notes on first pass on my side


if err := iploadbalancingRefresh(config.OVHClient, service, resp.Zone); err != nil {
return err
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned before, I would consider moving it to separate refresh resource

@yanndegat
Copy link
Collaborator Author

thanks a lot for your review

@yanndegat yanndegat merged commit 3d8e992 into ovh:master Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants