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

Bug: azurerm_frontdoor fix the way backend_pool_load_balancing/backend_pool_health_probe are saved to state file, exposed new attributes in backend_pool_health_probe block enabled and probe_method #5924

Merged
merged 13 commits into from
Mar 3, 2020

Conversation

WodansSon
Copy link
Collaborator

@WodansSon WodansSon commented Feb 27, 2020

Correcting a bug in the backend_pool_load_balancing and backend_pool_health_probe flatten function which showed false positives in the config -> state compare.

(fixes #5499)
(fixes #5903)

@WodansSon WodansSon added this to the v2.1.0 milestone Feb 27, 2020
@WodansSon WodansSon requested a review from katbyte February 27, 2020 01:32
@ghost ghost added the size/XS label Feb 27, 2020
@ghost ghost added size/S documentation and removed size/XS labels Feb 27, 2020
@WodansSon WodansSon changed the title Bug: azurerm_frontdoor fix the way backend_pool_load_balancing and backend_pool_health_probe are saved to state file Bug: azurerm_frontdoor fix the way backend_pool_load_balancing/backend_pool_health_probe are saved to state file, expose new attribute to enable/disable backend_pool_health_probe Feb 27, 2020
@ghost ghost added size/L and removed size/S labels Feb 28, 2020
@WodansSon WodansSon changed the title Bug: azurerm_frontdoor fix the way backend_pool_load_balancing/backend_pool_health_probe are saved to state file, expose new attribute to enable/disable backend_pool_health_probe Bug: azurerm_frontdoor fix the way backend_pool_load_balancing/backend_pool_health_probe are saved to state file, exposed new attributes in backend_pool_health_probe block enabled and probe_method Feb 28, 2020
@ghost ghost added size/M and removed size/L labels Feb 29, 2020
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.

aside from some minor comments LGTM 👍

string(frontdoor.GET),
string(frontdoor.HEAD),
}, false),
Default: string(frontdoor.GET),
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor aesthetics/consistency, Could we put the default above validatefunc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@@ -870,6 +898,8 @@ func expandArmFrontDoorHealthProbeSettingsModel(input []interface{}, frontDoorPa
IntervalInSeconds: utils.Int32(intervalInSeconds),
Path: utils.String(path),
Protocol: frontdoor.Protocol(protocol),
HealthProbeMethod: healthProbeMethod,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can just do

Suggested change
HealthProbeMethod: healthProbeMethod,
HealthProbeMethod: frontdoor.HealthProbeMethol(v ["probe_method"].(string))

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, should work... fixed.

@@ -299,6 +309,69 @@ resource "azurerm_frontdoor" "test" {
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger)
}

func testAccAzureRMFrontDoor_basicDisabled(data acceptance.TestData) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add a provior block up here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

func testAccAzureRMFrontDoor_basicDisabled(data acceptance.TestData) string {
return fmt.Sprintf(`
resource "azurerm_resource_group" "test" {
name = "acctestRG-%d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ad frontdoor here

Suggested change
name = "acctestRG-%d"
name = "acctestRG-frontdoor-%d"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

}

resource "azurerm_frontdoor" "test" {
name = "acctestfd-%d"
Copy link
Collaborator

Choose a reason for hiding this comment

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

uppercase where supported

Suggested change
name = "acctestfd-%d"
name = "acctest-FD-%d"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@ghost ghost added size/XL and removed size/M labels Feb 29, 2020
@WodansSon
Copy link
Collaborator Author

image

@WodansSon WodansSon merged commit 314d9a8 into master Mar 3, 2020
@WodansSon WodansSon deleted the b_frontdoor_healthload_balancing branch March 3, 2020 19:19
WodansSon added a commit that referenced this pull request Mar 3, 2020
@ghost
Copy link

ghost commented Mar 11, 2020

This has been released in version 2.1.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.1.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 3, 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 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 Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants