-
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
New Resource: azurerm_app_service_managed_certificate #9378
New Resource: azurerm_app_service_managed_certificate #9378
Conversation
This is a problem though ... although I've worked around it for now. Azure SDK for Go: |
Thanks for getting this started @AdamCoulterOz - I've done some additional work on this over the weekend (I'll push it later today) and hit a possible 2nd issue with app service that I'm looking into (It may need us to bump the API to |
Thanks Steve... |
@AdamCoulterOz - Apologies, I missed that when I looked for an SDK bump in existing PR's. I think we should probably split it out of yours since we know there's at least one breaking change if that's OK, and include the additional property after to help keep things clean? I'll comment there also for completeness. |
@jackofallops yep that's cool, I figured you guys would want it that way too, happy to wait, as long as it can be in the next week or so 😄 a bit stuck on a project atm. |
It's my main focus this week, so 🤞 |
@jackofallops I've been working on this and I've realised there is no point creating this resource to be separate from We could do this much easier by adding a single attribute |
Thanks @AdamCoulterOz - I think, given the current state of the service, it would be better to keep them as separate resources. I've got this all working locally, but hit something of a road-block on setting up something for the acceptance tests (something that will be a problem no matter the implementation). I'm going to get some good manual test coverage done, and discuss with the team about taking this forward on that basis (there's precedent for this approach in App Service, so shouldn't be a problem). I'll push after I revert my manual hacks to the acctests later today so another member of the team can review.
|
@jackofallops if you're going to stick with
This is because in order to create a managed certificate you must already have an For example, the current other input attributes:
So there is no point allowing the user to specify any of them. |
Very good shout 👍 - I'll refactor now that I have working tests. |
CI not ready/able to run these tests yet, but passing locally:
|
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.
hey @AdamCoulterOz / @jackofallops
Thanks for pushing those changes - I've taken a look through and whilst this is mostly looking good I've left a few comments inline, if we can fix those up then this should otherwise be good to merge 👍
Thanks!
azurerm/internal/services/web/app_service_managed_certificate_resource.go
Outdated
Show resolved
Hide resolved
This has been released in version 2.38.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.38.0"
}
# ... other configuration ... |
@AdamCoulterOz sorry if i ask a dump question about the solution: does it handle the case where the cert has to be renewed? is it enough to just trigger terraform regularly? Is this documented? |
@imod as per this documentation from Microsoft the certificate is automatically renewed every 5 months (and remains valid for 6 months). My understanding is that once that cert is bound, you don't need to do anything to rotate it, and it just happens. We've tried to make it so the thumbprint (which changes with certificate renewal) isn't an identifying key in creating a managed certificate, so won't create a forced new resource if it does change later (i.e. is managed outside the scope of the terraformed certificate resource). |
@AdamCoulterOz given App Service will auto-rotate this for you behind the scenes, do you think it's worth adding an info box to the resource page to explain that behaviour? |
@tombuildsstuff Sure, I'll put in a PR for it. |
👍 awesome, thanks @AdamCoulterOz :) |
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
forked from @tiwood, updated with the latest master, and fixed the password issue you were having previously... it just needed to be set as an empty string, and it worked. This addresses part of #4824
I then needed to handle the 202 accepted "error" and wait 30 seconds for it to be created before trying to read it again.
I've tested this locally with my own Azure subscription.
This still needs to have tests added and documentation written. Its also probably worth creating the data resource at the same time.
fixes #7537