Skip to content
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_site_recovery_replicated_vm - Add support for target_disk_encryption_set_id in managed_disk #12374

Merged
merged 6 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ func resourceSiteRecoveryReplicatedVM() *pluginsdk.Resource {
}, true),
DiffSuppressFunc: suppress.CaseDifference,
},
"target_disk_encryption_set_id": {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: azure.ValidateResourceID,
DiffSuppressFunc: suppress.CaseDifference,
},
},
},
},
Expand Down Expand Up @@ -253,13 +260,15 @@ func resourceSiteRecoveryReplicatedItemCreate(d *pluginsdk.ResourceData, meta in
recoveryResourceGroupId := diskInput["target_resource_group_id"].(string)
targetReplicaDiskType := diskInput["target_replica_disk_type"].(string)
targetDiskType := diskInput["target_disk_type"].(string)
targetEncryptionDiskSetID := diskInput["target_disk_encryption_set_id"].(string)

managedDisks = append(managedDisks, siterecovery.A2AVMManagedDiskInputDetails{
DiskID: &diskId,
PrimaryStagingAzureStorageAccountID: &primaryStagingAzureStorageAccountID,
RecoveryResourceGroupID: &recoveryResourceGroupId,
RecoveryReplicaDiskAccountType: &targetReplicaDiskType,
RecoveryTargetDiskAccountType: &targetDiskType,
RecoveryDiskEncryptionSetID: &targetEncryptionDiskSetID,
})
}

Expand Down Expand Up @@ -453,6 +462,7 @@ func resourceSiteRecoveryReplicatedItemRead(d *pluginsdk.ResourceData, meta inte
diskOutput["target_resource_group_id"] = *disk.RecoveryResourceGroupID
diskOutput["target_replica_disk_type"] = *disk.RecoveryReplicaDiskAccountType
diskOutput["target_disk_type"] = *disk.RecoveryTargetDiskAccountType
diskOutput["target_disk_encryption_set_id"] = *disk.RecoveryDiskEncryptionSetID

disksOutput = append(disksOutput, diskOutput)
}
Expand Down
Loading