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

provider/openstack: Rename provider to loadbalancer_provider #12239

Merged
merged 2 commits into from
Feb 28, 2017

Conversation

jtopjian
Copy link
Contributor

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.

Fixes #12237

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.
@@ -75,7 +75,7 @@ func resourceLoadBalancerV2() *schema.Resource {
ForceNew: true,
},

"provider": &schema.Schema{
"loadbalancer_provider": &schema.Schema{
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe we can just make this change - it's not backwards compatible

We are going to have to deprecate provider and then introduce the new loadbalancer_provider field

we will have to cater for both until 0.10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stack72 I can definitely do a deprecation thing here.

Just curious, though: would provider have worked during any previous release? Was it only recent that the error reported in #12237 would happen? If so, that would definitely help my sanity :)

…vider

This commit switches to using a deprecation path for removal of the
previous "provider" argument in favor of the new "loadbalancer_provider".
if v, ok := d.GetOk("loadbalancer_provider"); ok {
lbProvider = v.(string)
}

Copy link
Contributor Author

@jtopjian jtopjian Feb 27, 2017

Choose a reason for hiding this comment

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

@stack72 I couldn't decide on leaving this part as-is or adding the following:

if v, ok := d.GetOk("provider"); ok && lbProvider == "" {
        lbProvider = v.(string)
}

The above would set lbProvider if provider was set and the new preferred loadbalancer_provider wasn't set. However, since having an argument of provider will error out anyway, is it worth adding the above block of code in?

@rcreasey
Copy link

rcreasey commented Feb 27, 2017

FYI, I've validated this actually correctly sets the openstack_lb_loadbalancer_v2 provider attribute against an actual OpenStack Neutron API.

edit: disregard previous comments; secgroups change looks good.

@stack72 stack72 merged commit 85de5f1 into hashicorp:master Feb 28, 2017
stack72 pushed a commit that referenced this pull request Feb 28, 2017
* provider/openstack: Rename provider to loadbalancer_provider

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.

* provider/openstack: Switch to a deprecation path for loadbalancer provider

This commit switches to using a deprecation path for removal of the
previous "provider" argument in favor of the new "loadbalancer_provider".
yanndegat pushed a commit to yanndegat/terraform that referenced this pull request Mar 13, 2017
…rp#12239)

* provider/openstack: Rename provider to loadbalancer_provider

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.

* provider/openstack: Switch to a deprecation path for loadbalancer provider

This commit switches to using a deprecation path for removal of the
previous "provider" argument in favor of the new "loadbalancer_provider".
@ghost
Copy link

ghost commented Apr 16, 2020

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.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants