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

Loadbalancer backend address pool #21

Merged

Conversation

thetonymaster
Copy link
Contributor

No description provided.

@thetonymaster thetonymaster mentioned this pull request Aug 3, 2018
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @thetonymaster,

Left a few comments inline but this mostly LGTM 👍, my primary concern is the depreciated location property. As it will eventually be removed from azurerm we should probably not add it here in the first place.

ForceNew: true,
},

"location": deprecatedLocationSchema(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this is a new resource it might make more sense to remove location instead of deprecating it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense, will remove it from now on.

"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAzureStackLoadBalancerBackEndAddressPool_importBasic(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a blocker, but there is a push to add the import tests as a final step on the regular ones, feel free to do the same as you move resources over as it'll shorten test times & load on the env.

@@ -35,3 +35,14 @@ func azureStackNormalizeLocation(location interface{}) string {
func azureStackSuppressLocationDiff(k, old, new string, d *schema.ResourceData) bool {
return azureStackNormalizeLocation(old) == azureStackNormalizeLocation(new)
}

func deprecatedLocationSchema() *schema.Schema {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't need this in azure stack yet.

}

var poolId string
for _, BackendAddressPool := range *(*read.LoadBalancerPropertiesFormat).BackendAddressPools {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we get a nil check on read.LoadBalancerPropertiesFormat?

page_title: "Azure Resource Manager: azurestack_lb_backend_address_pool"
sidebar_current: "docs-azurestack-resource-loadbalancer-backend-address-pool"
description: |-
Create a LoadBalancer Backend Address Pool.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we change to to Manages?


# azurestack_lb_backend_address_pool

Create a LoadBalancer Backend Address Pool.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we change to to Manages?

},
{
ResourceName: addressPoolName,
ImportState: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@katbyte is this what you meant?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure is 🙂

@katbyte
Copy link
Collaborator

katbyte commented Aug 7, 2018

@thetonymaster,

Let me know when this is ready for another review, currently CI is failing with:

# github.com/terraform-providers/terraform-provider-azurestack/azurestack
azurestack/resource_arm_loadbalancer_backend_address_pool.go:108: Errorf call needs 2 args but has 3 args

@katbyte
Copy link
Collaborator

katbyte commented Aug 7, 2018

Tests pass:
screen shot 2018-08-07 at 13 59 16

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@katbyte katbyte merged commit 4da9392 into hashicorp:master Aug 7, 2018
katbyte added a commit that referenced this pull request Aug 7, 2018
@katbyte katbyte added this to the 0.3.0 milestone Aug 13, 2018
@ghost
Copy link

ghost commented Jun 27, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants