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

Support for Secure Webhook Receiver in azurerm_monitor_action_group #10509

Merged
merged 10 commits into from
Mar 5, 2021

Conversation

yupwei68
Copy link
Contributor

@yupwei68 yupwei68 commented Feb 9, 2021

Fix #10510

Manually tests pass.

It requires configuring your AAD application to expose a protected API to be called by a daemon app, and enabling Action Groups to use your Azure AD Application (which include New-AzureADServiceAppRoleAssignment in MS Graph), which could not be integrated into acctest e2e testing currently.

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.

Thanks @yupwei68 - left a comment about the schema inline

@yupwei68
Copy link
Contributor Author

Thanks @katbyte for comments. Changes have been pushed. Please continue reviewing.

@ghost ghost added size/L and removed size/M labels Mar 3, 2021
@yupwei68
Copy link
Contributor Author

yupwei68 commented Mar 4, 2021

@katbyte I've added the acctest. Please continue reviewing.
=== RUN TestAccMonitorActionGroup_secureWebhookReceiver
=== PAUSE TestAccMonitorActionGroup_secureWebhookReceiver
=== CONT TestAccMonitorActionGroup_secureWebhookReceiver
--- PASS: TestAccMonitorActionGroup_secureWebhookReceiver (287.65s)

@yupwei68 yupwei68 requested a review from manicminer March 4, 2021 03:26
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @yupwei68

Thanks for pushing those changes - I've taken a look through and left some comments inline but if we can fix those up then this should otherwise be good to go 👍

Thanks!

@yupwei68
Copy link
Contributor Author

yupwei68 commented Mar 5, 2021

Thanks Tom for your comments. Changes have been updated. Please continue reviewing.

@ghost ghost removed the waiting-response label Mar 5, 2021
@yupwei68
Copy link
Contributor Author

yupwei68 commented Mar 5, 2021

=== RUN TestAccMonitorActionGroup_secureWebhookReceiver
=== PAUSE TestAccMonitorActionGroup_secureWebhookReceiver
=== CONT TestAccMonitorActionGroup_secureWebhookReceiver
--- PASS: TestAccMonitorActionGroup_secureWebhookReceiver (281.84s)

Test has passed.

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.

Thanks @yupwei68 - LGTM 👍

@katbyte katbyte added this to the v2.50.0 milestone Mar 5, 2021
@katbyte katbyte merged commit 643897b into hashicorp:master Mar 5, 2021
katbyte added a commit that referenced this pull request Mar 5, 2021
@ghost
Copy link

ghost commented Mar 5, 2021

This has been released in version 2.50.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.50.0"
}
# ... other configuration ...

@alastairtree
Copy link
Contributor

FYI I looks like something in this change may have broken data.azurerm_monitor_action_group as suddenly our deploys have broken once they upgraded to using 2.50. The error looks like below. Will do some investigation and will create an issue if required.

Error setting `webhook_receiver`: Invalid address to set: []string{"webhook_receiver", "0", "aad_auth"} 

@yupwei68
Copy link
Contributor Author

yupwei68 commented Mar 8, 2021

@alastairtree Unfortunately, I could not reproduce your error. I've created a webhook at version 2.49.0, and then update this at 2.50.0. They are applied successfully. Would you create an issue for this, with the details of reproducing steps and you've created the azurerm_monitor_action_group based on which version?

@alastairtree
Copy link
Contributor

It is the data source that's broken not the resource. See #10854

@marioanton
Copy link
Contributor

Same here, this is breaking the retrieval/refresh of action groups with webhooks not configured as securewebhooks.

@manicminer
Copy link
Member

There's a fix for this incoming in #10876

@ghost
Copy link

ghost commented Apr 4, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 4, 2021
@yupwei68 yupwei68 deleted the wyp-monitor-ag branch April 6, 2021 02:12
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.

Support for Secure Webhook Receiver in azurerm_monitor_action_group
6 participants