-
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_cost_management_scheduled_action
- New resource
#21325
azurerm_cost_management_scheduled_action
- New resource
#21325
Conversation
5642d85
to
34f704f
Compare
a6633db
to
e496cc2
Compare
e110076
to
a0a6103
Compare
Rebased, tests still passing |
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 for this PR @aristosvo! I've done a first pass through and left some comments and questions in line. Once those are resolved we can take another look through and run the tests.
internal/services/costmanagement/scheduled_action_resource_base.go
Outdated
Show resolved
Hide resolved
internal/services/costmanagement/scheduled_action_resource_base.go
Outdated
Show resolved
Hide resolved
internal/services/costmanagement/scheduled_action_resource_base.go
Outdated
Show resolved
Hide resolved
internal/services/costmanagement/scheduled_action_resource_base.go
Outdated
Show resolved
Hide resolved
} | ||
|
||
props := scheduledactions.ScheduledAction{ | ||
Kind: utils.ToPtr(scheduledactions.ScheduledActionKindEmail), |
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.
Are there other useful scheduled action kinds that might want to be exposed in future? If so it might be good to specify that in the resource name, i.e. azurerm_subscription_cost_management_email_scheduled_action
and to remove the email prefix for all of the arguments.
If not happy to the keep the name as is since otherwise they get a bit long 😅
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.
The same API is also used to create azurerm_cost_anomaly_alert
(Kind=Insight Alert
), you could argue that this one is a azurerm_scheduled_cost_email
or azurerm_cost_management_scheduled_view_email
.., the question here is what the scope is of this resource and what Microsoft seems fit long term. It might be that this resource is extended to have more Kind
s, or that it might extend to email multiple resource types: next to views also CSV files based on a query, whatsoever.
In the API docs they are also talking about reports
, in the Cost Management Docs it is referred to as scheduled_alerts
..
Options:
-
azurerm_cost_management_scheduled_view_email
(Most precise technical description) -
azurerm_cost_management_scheduled_report
(Best functional description IMHO) -
azurerm_cost_management_scheduled_alert
(Closest to docs, confusing to me tbh)
Your choice 😵
internal/services/costmanagement/scheduled_action_resource_base.go
Outdated
Show resolved
Hide resolved
website/docs/r/subscription_cost_management_scheduled_action.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/subscription_cost_management_scheduled_action.html.markdown
Outdated
Show resolved
Hide resolved
website/docs/r/subscription_cost_management_scheduled_action.html.markdown
Outdated
Show resolved
Hide resolved
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
35ec5ff
to
77d3fc9
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 so much @aristosvo! I have one final remark about some (I think) unused files. But other than that this looks like it's good to go!
Hi @stephybun! Thanks! What is your opinion about the name of the resource, is that something that is still open for discussion or should we leave it like this for now? |
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 name is okay as is for now, if we need more granularity in the future then it shouldn't conflict with anything... hoping that doesn't come bite me on the bum later on 😅
Thanks again @aristosvo! LGTM 🌻
azurerm_subscription_cost_management_scheduled_action
- New resourceazurerm_cost_management_scheduled_action
- New resource
This functionality has been released in v3.53.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. |
Fixes #21198
Acceptance Tests
TODO