-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix issues with frontdoor custom https configuration #7498
Conversation
Hi @WodansSon
and my tf state file is missing all the custom https config even if they have been created correctly. |
# Conflicts: # azurerm/internal/services/frontdoor/frontdoor_resource.go
Missing website documentation for new resource and any required updates to the existing documentation |
Co-authored-by: Tim Jacomb <[email protected]>
… code to resource_arm_frontdoor_custom_https_configuration_resource file.
website/docs/r/frontdoor_custom_https_configuration.html.markdown
Outdated
Show resolved
Hide resolved
Hi @WodansSon I have fixed the issue I asked about some time ago + a few others, did some clean up and have added docs. It would be great if you could have a look. It's all working as far as I can see apart from one use case:
|
@WodansSon I think there might be a misunderstanding. |
@luigibk you need to format the HCL in your test code to get rid of the lint error. I tried fixing it for you but I was denied permission to push to your fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luigibk, I've left code suggestions to fix the lint errors.
azurerm/internal/services/frontdoor/tests/frontdoor_custom_https_configuration_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/tests/frontdoor_custom_https_configuration_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/tests/frontdoor_custom_https_configuration_resource_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luigibk, thanks for the PR, this is looking good... left a few comments, but overall it looks pretty good, this is really close to being able to be merged! 🚀
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Show resolved
Hide resolved
}, | ||
|
||
Schema: map[string]*schema.Schema{ | ||
"front_door_name": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this to front_door_id
instead of front_door_name
? If you want to keep the front_door_name
attribute can also you expose the front_door_id
as a new attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best solution is to actually add a frontend_endpoint_id
and remove both front_door_name
and frontend_endpoint_name
as they can be derived from the id. That way it should be easier to manage from a user perspective and the implementation should not be more complex after removing those 2 fields. How does such a solution sound to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea, but because of the way Terraform works the core would not be able to build a proper dependency graph during the plan phase, if I am not mistaken, which is why we generally use the parent resources id attribute. You can give it a try and see if it builds a correct provisioning graph, but my gut is telling me it won't be able to connect the two together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the parent resource for the custom https configuration is the frontend endpoint. I've started work on this and it looks good so far. Hopefully won't be long before I commit it.
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/frontdoor/frontdoor_custom_https_configuration_resource.go
Outdated
Show resolved
Hide resolved
https://github.community/t/how-can-we-enable-allow-edits-from-maintainers-by-default/2847/7 We'll keep that in mind in future, for now if you have any follow up changes you want to do yourself feel free to send us a PR and we'll merge it in |
@WodansSon thanks for your review and comments. I have merged all of them but one and left a comment about the suggestion of adding a front_door_id. |
Ahhh... that makes sense, thanks for the heads up. Yes, there are two things I think still need to be addressed:
Thanks again, this is so close, just a couple of tweaks and it will be ready to merge. Thanks! |
Hi @WodansSon |
About the read timeout, it's currently set at 5minutes in frontdoor: and changing it to 5 hours breaks this test: so I have left those timeouts at 5 minutes for now |
@WodansSon thanks for helping with this. I have just pushed the change related to replacing frontdoor_name and frontend_endpoint_name with the frontend_endpoint_id. |
It looks like Tom over wrote my change and reverted the value back to 5 minutes, so this is fine. Can we make sure the documentation also reflects this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luigibk this LGTM now! 🚀
This has been released in version 2.20.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.20.0"
}
# ... other configuration ... |
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! |
This PR aims to introduce the following changes:
A fix for the below issue which prevents custom https configurations in frontdoor from being updated properly
Separating the custom https configuration resource from the main frontdoor resource. This should allow for parallel update of these resources as currently they are processed serially and that always leads to a timeout given enough frontend endpoints or endless waiting given how long each custom https configuration update can take (e.g. certificate update).
(fixes #6057 )