-
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_cost_management_export
#11612
Conversation
Guys any progress on this one? |
any chances of getting this feature added to new release ? |
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 and your patience @MattiasAng. This is a great start! I've left some suggestions and it would be great if the merge conflicts could also be resolved.
azurerm/internal/services/costmanagement/cost_management_export_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/costmanagement/cost_management_export_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/costmanagement/cost_management_export_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/costmanagement/cost_management_export_resource_group_resource.go
Outdated
Show resolved
Hide resolved
hey @MattiasAng Thanks for this PR / apologies for the delayed review here. Within the Azure Provider we're moving away from generic resources which support a Although the new generic resource in this PR works, to be able to ship this and workaround the problems mentioned above we'd need to split this into a number of sub-resources. Whilst that initially sounds like a lot of code, we can use the technique used in the Policy Assignment resources to be able to split this out with minimal code, that involves:
Whilst that's a little more work within the Provider, ultimately that means that we can avoid these issues for users (who'll have less context about these issues) which is a worthwhile trade-off. As such whilst I'd like to thank you for this contribution (and apologies for the delay giving this feedback) - since we're going to have to take a different approach here (which is quite a bit more work) I'm going to suggest that @stephybun takes a look into splitting this into a base resource - at which point it's possible to add these other resources pretty easily. Thanks! |
There is an open PR which contains the cost management export base resource as well as resources for the scopes subscription and resource group, as such I am going to close this in favour of #14140. |
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 #11598.
Changes:
costmanagement
SDK to 2020-06-01providers
in resource ID inParseAzureResourceIDWithoutSubscription
.The parsing it quite ugly here but I couldn't come up with a better idea since ID always starts with the scope which creates a lot of different variations. Any feedback is welcome.
I haven't been able to run
TestAccCostManagementExport_managementgroup
due to requirement of EA subscription which I don't have access to at the moment.This resource will also supersed
azurerm_cost_management_export_resource_group
so let me know if we should add a note there.