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

azurerm_nginx_certificate: support update key_virtual_path, certificate_virtual_path and key_vault_secret_id fields #22100

Merged
merged 4 commits into from
Jun 12, 2023

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Jun 9, 2023

fixes: #22092 . these fieds should support update.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Hi @wuxu92
This change looks mostly OK, but could you update the docs to reflect the removal of ForceNew from the affected properties?

Thanks!

@@ -156,7 +201,7 @@ func (m CertificateResource) Read() sdk.ResourceFunc {

func (m CertificateResource) Delete() sdk.ResourceFunc {
return sdk.ResourceFunc{
Timeout: 10 * time.Minute,
Timeout: 30 * time.Minute,
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to bump this timeout to 30 minutes. We have found 10minutes to suffice and typical range is 1-3 minutes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is a context deadline exceeded log in the origin issue, so I increased the delete timeout here

Error: deleting Certificate (Subscription: "ee920d60-90f3-4a92-b5e7-bb284c3a6ce2"
Resource Group Name: "tf-22bc9-e2e-tf-xzpd4e"
Nginx Deployment Name: "tf-22bc9-e2e-tf-xzpd4e"
Certificate Name: "tf-22bc9-e2e-tf-xzpd4e"): polling after CertificatesDelete: context deadline exceeded

Copy link
Contributor

Choose a reason for hiding this comment

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

Should have included additionally that the timeout comes from the delete. The delete should never work as you cannot delete an in use certificate in this service. In the example in the bug my certificate was in use and thus not deletable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The delete API should return an error instead of timeout in this case. could you please have a check on this?

Copy link
Contributor

@agazeley agazeley Jun 12, 2023

Choose a reason for hiding this comment

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

Made an inquiry to the team on expected behavior and potentially applying a fix.

@wuxu92
Copy link
Contributor Author

wuxu92 commented Jun 10, 2023

@jackofallops document updated

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 792e998 into hashicorp:main Jun 12, 2023
14 of 15 checks passed
@github-actions github-actions bot added this to the v3.61.0 milestone Jun 12, 2023
katbyte added a commit that referenced this pull request Jun 12, 2023
@wuxu92 wuxu92 deleted the nginx/updatecert branch June 13, 2023 00:48
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
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.

azurerm_nginx_certificate recreates when key_vault_secret_id is modified
4 participants