-
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_log_analytics_workspace
: allow changing sku
between CapacityReservation
and PerGB2018
#22597
Conversation
Signed-off-by: ziyeqf <[email protected]>
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 @ziyeqf, this is off to a good start, however we'll need to avoid using d.GetRawConfig()
. If you can update this then we'll circle back for re-review and testing. Thanks!
capacityReservationLevel, ok := d.GetOk(propName) | ||
if ok { | ||
// read from raw config as it's an optional + computed property, GetOk() will read value from state. | ||
capacityReservationLevel := d.GetRawConfig().AsValueMap()[propName] |
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.
Please do not use GetRawConfig
as this will not translate to terraform-plugin-framework
@@ -45,6 +45,8 @@ The following arguments are supported: | |||
|
|||
~> **NOTE:** A new pricing model took effect on `2018-04-03`, which requires the SKU `PerGB2018`. If you're provisioned resources before this date you have the option of remaining with the previous Pricing SKU and using the other SKUs defined above. More information about [the Pricing SKUs is available at the following URI](https://aka.ms/PricingTierWarning). | |||
|
|||
~> **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except changing between `PerGB2018` and `CapacityReservation`, but changing it to `CapacityReservation` or changing `reservation_capacity_in_gb_per_day` to a higher tier will lead to a 31-days commitment period, during which the sku could not be changed to a lower one. More information about [the commitment perioud](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) |
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.
~> **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except changing between `PerGB2018` and `CapacityReservation`, but changing it to `CapacityReservation` or changing `reservation_capacity_in_gb_per_day` to a higher tier will lead to a 31-days commitment period, during which the sku could not be changed to a lower one. More information about [the commitment perioud](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) | |
~> **NOTE:** Changing `sku` forces a new Log Analytics Workspace to be created, except when changing between `PerGB2018` and `CapacityReservation`. However, changing `sku` to `CapacityReservation` or changing `reservation_capacity_in_gb_per_day` to a higher tier will lead to a 31-days commitment period, during which the SKU cannot be changed to a lower one. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers) for further information. |
Signed-off-by: ziyeqf <[email protected]>
Signed-off-by: ziyeqf <[email protected]>
we might need to note |
@ziyeqf - what do you mean by |
oh, I mean it's not |
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.
LGTM 👍
kindly ping for merge :) |
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. |
fix #12177
changing between
CapacityReservation
andPerGB2018
does not force new resource to be created, but it will lead to a 31-days commitment period during which it could not be changed to lower pricing tier. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#commitment-tiers)test
rerun the failed one