You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
I'm using a certain kind of managed disk (PremiumV2_LRS). These disks support only incremental snapshots. However, the resource azurerm_snapshot doesn't seem to be able to be created with said flag.
The azurerm_snapshot.create_option attribute only supports Import and Copy. I dived into the code of both azurerm and Terraform Azure SDK, and did not find anything resembling "incremental" regarding snapshots.
I can create the snapshot with no issues using the az command line tool:
When using Terraform with create_option = "Copy" I get a meaningful error message regarding this limitation:
**Error: creating/updating Snapshot (Subscription: "(...)" Resource Group Name: "storage-resources" Snapshot Name: "metadata-disk-snapshot"): performing CreateOrUpdate: snapshots.SnapshotsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="OperationNotAllowed" Message="Only incremental snapshots are supported for disks of Sku PremiumV2\_LRS."**
with module.(...)\_metadata\_disk\_snapshot
on .terraform/modules/(...)/main.tf line 30, in resource "azurerm\_snapshot" "storage\_metadata\_disk\_snapshot":
And, of course, using create_option = "Import" does not work, because I'm using the disk ID as the source_uri:
**Error: creating/updating Snapshot (Subscription: "(...)" Resource Group Name: "storage-resources" Snapshot Name: "metadata-disk-snapshot"): performing CreateOrUpdate: snapshots.SnapshotsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidParameter" Message="Uri not of expected kind" Target="sourceUri"**
with module.(...)\_metadata\_disk\_snapshot
on .terraform/modules/(...)/main.tf line 30, in resource "azurerm\_snapshot" "storage\_metadata\_disk\_snapshot":
Is there an existing issue for this?
Community Note
Description
I'm using a certain kind of managed disk (
PremiumV2_LRS
). These disks support only incremental snapshots. However, the resourceazurerm_snapshot
doesn't seem to be able to be created with said flag.The
azurerm_snapshot.create_option
attribute only supportsImport
andCopy
. I dived into the code of both azurerm and Terraform Azure SDK, and did not find anything resembling "incremental" regarding snapshots.I can create the snapshot with no issues using the
az
command line tool:When using Terraform with
create_option = "Copy"
I get a meaningful error message regarding this limitation:And, of course, using
create_option = "Import"
does not work, because I'm using the disk ID as thesource_uri
:New or Affected Resource(s)/Data Source(s)
azurerm_snapshot
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: