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 for caching issue #4618

Closed
wants to merge 6 commits into from

Conversation

WodansSon
Copy link
Collaborator

Real fix for #4461

@WodansSon
Copy link
Collaborator Author

image

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.

@WodansSon,

This PR contains a breaking/behavioural change to how the resource works. I don't think we can do this until 2.0?

"cache_use_dynamic_compression": {
Type: schema.TypeBool,
Optional: true,
Default: false,
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 this will end up causing people a diff?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think this will be an issue since it's data type is bool, it is always false by default... WDYT?

"cache_query_parameter_strip_directive": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
string(frontdoor.StripAll),
string(frontdoor.StripNone),
}, false),
Default: string(frontdoor.StripNone),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a breaking change? we can't do this until 2.0

Copy link
Collaborator Author

@WodansSon WodansSon Oct 15, 2019

Choose a reason for hiding this comment

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

No, this is not a breaking change because the value is never evaluated unless the cache_use_dynamic_compression is set to true. So this is basically a NoOp… WDYT?

Choose a reason for hiding this comment

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

Looks like setting it to StripNone or StripAll won't change the 'caching' field but only the 'Query string caching behaviour'. Is there a way to change the 'caching' field?

@@ -198,7 +199,7 @@ func resourceArmFrontDoor() *schema.Resource {
string(frontdoor.HTTPSOnly),
string(frontdoor.MatchRequest),
}, false),
Default: string(frontdoor.MatchRequest),
Default: string(frontdoor.HTTPSOnly),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a breaking change? we can't do this until 2.0

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reverted default value change to avoide the breaking change, will open issue to update this in the 2.0 timeframe.

@ghost ghost added size/M and removed size/S labels Oct 15, 2019
@ghost ghost added size/L and removed size/M labels Oct 17, 2019
// portal-front-door/ -> healthProbeSettings/healthProbeSettings-1571100669337
//
// but in the HealthProbeSettings block the casing of the HealthProbeSettings is (notice the uppercase 'H')::
// portal-front-door/ -> HealthProbeSettings/healthProbeSettings-1571100669337
Copy link
Contributor

Choose a reason for hiding this comment

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

it'd be worth raising this as a bug in the API - since the ARM Specification states that the same Resource ID should be returned in the same casing for the same API call, wherever it's present.

It's probably also worth calling out specifically that whilst the ARM Specification "technically" says Resource ID's are case insensitive; in practice they're not since both downstream API's and downstream client's don't consume them in that fashion - which I think is a larger discussion we need to have with the ARM Team 🙃

@tombuildsstuff tombuildsstuff added this to the v1.41.0 milestone Dec 18, 2019
@WodansSon WodansSon closed this Jan 9, 2020
@WodansSon WodansSon deleted the rf_frontdoor_redirectconfig branch January 9, 2020 22:57
@ghost
Copy link

ghost commented Jan 16, 2020

This has been released in version 1.41.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 = "~> 1.41.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 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 Mar 28, 2020
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.

4 participants