zambien / terraform-provider-apigee

A Terraform Apigee provider
MIT License
49 stars 39 forks source link

Feature Request: Vhosts #50

Open tibers opened 4 years ago

tibers commented 4 years ago

In an effort to facilitate blue/green deployments, it would be useful to be able move around vhosts. This also means when we bump into apigee API weirdness (like the whole retries thing) we can enable users to bump into that on the green deployment side, and once it's all happy, we can move the vhost from blue to green.

I started to beat out the TF code here but I am not good at TF or go: https://github.com/tibers/terraform-provider-apigee https://github.com/tibers/go-apigee-edge

This currently doesn't compile so no MR. However if anyone wants to steal the code (or point out where I'm doing it wrong) I hope it's useful.

jonohill commented 4 years ago

Thanks for making a start with this. We'd love to be able to configure virtualhosts too. I had a quick look at your code and I can see in go-apigee-edge/virtual_hosts.go you've got some variables with the same name as their type, i.e. VirtualHost VirtualHost, so if you change it to virtualHost VirtualHost it will compile. I see there's still a bit of work to do on defining the VirtualHost struct with all the fields too, which currently prevents terraform-provider-apigee from compiling. If you've got the time it would be a great feature to continue working on. I'm hoping we'll get some time to contribute in the future too.

tibers commented 4 years ago

Thanks for the hint!

So a couple of things:

  1. I don't remember what the heck I was doing. :)
  2. The model which google wants to move to with apigee is that the virtualhost config gets moved into the istio component, which will be the new ingress for the new version of "hybrid apigee" which is coming out in ~6 months or so, which is why this hasn't been pressing.
zambien commented 4 years ago

I haven't had a need to use virtual hosts for blue/green just due to the way we handle deployments. Although I agree it could be useful. How are people working around this right now using this provider? Any input on use cases we should consider?

Sourceless commented 4 years ago

We've been configuring virtual hosts by hand, and have quite a few environments, so it would be nice for us to automate that.