-
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
azurerm_eventgrid_event_subscription
: Support delivery_property
#13595
azurerm_eventgrid_event_subscription
: Support delivery_property
#13595
Conversation
Bit of guidance required - what's the correct approach to take when the Azure API doesn't return a value, because it's marked as sensitive/secret? In this PR, you can create 'Static' properties and set 'Secret' to true - if you do this, then subsequent calls to the API will just return you a value that says 'Hidden'. This caused issues as described in #6688 The implementation linked from issue 6688 seems to be 'don't return the value if it's a secret, then ignore it in the ImportSteps' - which I've followed, but I still experienced failing tests until I marked the test as ExpectNonEmptyPlan: true (which feels like cheating :) ) Concerned the current state would cause constant changes on updates when using 'Secret' properties due to Diffs - if anyone could have a look at this and let me know if I've missed something, or a better approach to handle this. |
@dylanmorley - when azure does not return a secret value what we do is just pull it across from the config - ie in the read we do a d.Get() to get the old value and set that. |
Thanks @katbyte, updated to follow suggested approach - amended + added a test for scenario. |
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.
Thanks @dylanmorley this looks good so far - left a couple of comments inline.
It might be also be a good idea to include an update test for this.
Thanks!
Added update test specifically for delvery property changes, these are all grouped under deliveryProperties to run these subset of tests, e.g.
|
0986fe8
to
010aa80
Compare
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.
Thanks @dylanmorley - LGTM 🙌
azurerm_eventgrid_event_subscription
: Support delivery propertiesazurerm_eventgrid_event_subscription
: Support delivery_property
This functionality has been released in v2.81.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
As per #12145, supporting custom delivery properties for endpoints that support them.
delivery_property
definitions for aazurerm_eventgrid_event_subscription
resource