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_recovery_services_vault - new property classic_vmware_replicate_enabled #20473

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

ziyeqf
Copy link
Contributor

@ziyeqf ziyeqf commented Feb 15, 2023

test

terraform-provider-azurerm ❯ TF_ACC=1 go test -v ./internal/services/recoveryservices -run=TestAccRecoveryServicesVault -timeout=600m -parallel 20            [ tengzh/recovery/vmware/vault_update][$⇕][🐹 v1.19.5][⏱ 10ms][16:05:43]
=== RUN   TestAccRecoveryServicesVault_basic
=== PAUSE TestAccRecoveryServicesVault_basic
=== RUN   TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== PAUSE TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== RUN   TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== PAUSE TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== RUN   TestAccRecoveryServicesVault_zrs
=== PAUSE TestAccRecoveryServicesVault_zrs
=== RUN   TestAccRecoveryServicesVault_complete
=== PAUSE TestAccRecoveryServicesVault_complete
=== RUN   TestAccRecoveryServicesVault_update
=== PAUSE TestAccRecoveryServicesVault_update
=== RUN   TestAccRecoveryServicesVault_requiresImport
=== PAUSE TestAccRecoveryServicesVault_requiresImport
=== RUN   TestAccRecoveryServicesVault_SystemAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_SystemAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_UserAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_UserAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_immutability
=== PAUSE TestAccRecoveryServicesVault_immutability
=== RUN   TestAccRecoveryServicesVault_softDelete
=== PAUSE TestAccRecoveryServicesVault_softDelete
=== RUN   TestAccRecoveryServicesVault_storageModeType
=== PAUSE TestAccRecoveryServicesVault_storageModeType
=== RUN   TestAccRecoveryServicesVault_crossRegionRestore
=== PAUSE TestAccRecoveryServicesVault_crossRegionRestore
=== RUN   TestAccRecoveryServicesVault_sku
=== PAUSE TestAccRecoveryServicesVault_sku
=== RUN   TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
=== PAUSE TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
=== RUN   TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
=== PAUSE TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
=== RUN   TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== PAUSE TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== RUN   TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== PAUSE TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== RUN   TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
=== PAUSE TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
=== RUN   TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== PAUSE TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== CONT  TestAccRecoveryServicesVault_basic
=== CONT  TestAccRecoveryServicesVault_crossRegionRestore
=== CONT  TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== CONT  TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== CONT  TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
=== CONT  TestAccRecoveryServicesVault_storageModeType
=== CONT  TestAccRecoveryServicesVault_requiresImport
=== CONT  TestAccRecoveryServicesVault_zrs
=== CONT  TestAccRecoveryServicesVault_immutability
=== CONT  TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== CONT  TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== CONT  TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
=== CONT  TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
=== CONT  TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== CONT  TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== CONT  TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== CONT  TestAccRecoveryServicesVault_complete
=== CONT  TestAccRecoveryServicesVault_update
=== CONT  TestAccRecoveryServicesVault_UserAssignedIdentity
=== CONT  TestAccRecoveryServicesVault_softDelete
--- PASS: TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType (196.46s)
=== CONT  TestAccRecoveryServicesVault_SystemAssignedIdentity
--- PASS: TestAccRecoveryServicesVault_zrs (415.18s)
=== CONT  TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
--- PASS: TestAccRecoveryServicesVault_basic (417.14s)
=== CONT  TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
--- PASS: TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled (423.75s)
=== CONT  TestAccRecoveryServicesVault_sku
--- PASS: TestAccRecoveryServicesVault_complete (424.74s)
--- PASS: TestAccRecoveryServicesVault_UserAssignedIdentity (426.30s)
--- PASS: TestAccRecoveryServicesVault_requiresImport (439.65s)
--- PASS: TestAccRecoveryServicesVault_crossRegionRestore (596.33s)
--- PASS: TestAccRecoveryServicesVault_SystemAssignedIdentity (403.77s)
--- PASS: TestAccRecoveryServicesVault_storageModeType (628.92s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption (690.57s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithKeyVaultKey (713.42s)
--- PASS: TestAccRecoveryServicesVault_immutability (756.27s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity (771.18s)
--- PASS: TestAccRecoveryServicesVault_update (773.64s)
--- PASS: TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage (795.37s)
--- PASS: TestAccRecoveryServicesVault_updateSkuWithExistingEncryption (809.09s)
--- PASS: TestAccRecoveryServicesVault_ToggleCrossRegionRestore (866.35s)
--- PASS: TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey (947.61s)
--- PASS: TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled (1078.45s)
--- PASS: TestAccRecoveryServicesVault_softDelete (1207.75s)
--- PASS: TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey (863.69s)
--- PASS: TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage (883.62s)
--- PASS: TestAccRecoveryServicesVault_sku (1172.84s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices      1597.923s

@ziyeqf
Copy link
Contributor Author

ziyeqf commented Feb 17, 2023

test

terraform-provider-azurerm ❯ TF_ACC=1 go test -v ./internal/services/recoveryservices -run=TestAccRecoveryServicesVault -timeout=600m -parallel 20             [ tengzh/recovery/vmware/vault_update][$⇡][🐹 v1.19.5][⏱ 8ms][15:14:37]
=== RUN   TestAccRecoveryServicesVault_basic
=== PAUSE TestAccRecoveryServicesVault_basic
=== RUN   TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== PAUSE TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== RUN   TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== PAUSE TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== RUN   TestAccRecoveryServicesVault_zrs
=== PAUSE TestAccRecoveryServicesVault_zrs
=== RUN   TestAccRecoveryServicesVault_complete
=== PAUSE TestAccRecoveryServicesVault_complete
=== RUN   TestAccRecoveryServicesVault_update
=== PAUSE TestAccRecoveryServicesVault_update
=== RUN   TestAccRecoveryServicesVault_requiresImport
=== PAUSE TestAccRecoveryServicesVault_requiresImport
=== RUN   TestAccRecoveryServicesVault_SystemAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_SystemAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_UserAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_UserAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_immutability
=== PAUSE TestAccRecoveryServicesVault_immutability
=== RUN   TestAccRecoveryServicesVault_softDelete
=== PAUSE TestAccRecoveryServicesVault_softDelete
=== RUN   TestAccRecoveryServicesVault_storageModeType
=== PAUSE TestAccRecoveryServicesVault_storageModeType
=== RUN   TestAccRecoveryServicesVault_crossRegionRestore
=== PAUSE TestAccRecoveryServicesVault_crossRegionRestore
=== RUN   TestAccRecoveryServicesVault_sku
=== PAUSE TestAccRecoveryServicesVault_sku
=== RUN   TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
=== PAUSE TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
=== RUN   TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
=== PAUSE TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
=== RUN   TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== PAUSE TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== RUN   TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== PAUSE TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== RUN   TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== PAUSE TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== RUN   TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
=== PAUSE TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
=== RUN   TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
=== PAUSE TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
=== RUN   TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== PAUSE TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== CONT  TestAccRecoveryServicesVault_basic
=== CONT  TestAccRecoveryServicesVault_crossRegionRestore
=== CONT  TestAccRecoveryServicesVault_requiresImport
=== CONT  TestAccRecoveryServicesVault_immutability
=== CONT  TestAccRecoveryServicesVault_storageModeType
=== CONT  TestAccRecoveryServicesVault_softDelete
=== CONT  TestAccRecoveryServicesVault_UserAssignedIdentity
=== CONT  TestAccRecoveryServicesVault_zrs
=== CONT  TestAccRecoveryServicesVault_update
=== CONT  TestAccRecoveryServicesVault_complete
=== CONT  TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType
=== CONT  TestAccRecoveryServicesVault_ToggleCrossRegionRestore
=== CONT  TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage
=== CONT  TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey
=== CONT  TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption
=== CONT  TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled
=== CONT  TestAccRecoveryServicesVault_encryptionWithKeyVaultKey
=== CONT  TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage
=== CONT  TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey
=== CONT  TestAccRecoveryServicesVault_updateSkuWithExistingEncryption
--- PASS: TestAccRecoveryServicesVault_basicWithCrossRegionRestoreAndWrongStorageType (177.15s)
=== CONT  TestAccRecoveryServicesVault_sku
--- PASS: TestAccRecoveryServicesVault_basicWithClassicVmwareReplicateEnabled (367.73s)
=== CONT  TestAccRecoveryServicesVault_SystemAssignedIdentity
--- PASS: TestAccRecoveryServicesVault_complete (368.30s)
=== CONT  TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled
--- PASS: TestAccRecoveryServicesVault_zrs (381.80s)
=== CONT  TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity
--- PASS: TestAccRecoveryServicesVault_requiresImport (390.72s)
--- PASS: TestAccRecoveryServicesVault_UserAssignedIdentity (395.03s)
--- PASS: TestAccRecoveryServicesVault_storageModeType (551.17s)
--- PASS: TestAccRecoveryServicesVault_basic (563.15s)
--- PASS: TestAccRecoveryServicesVault_crossRegionRestore (565.94s)
--- PASS: TestAccRecoveryServicesVault_immutability (673.04s)
--- PASS: TestAccRecoveryServicesVault_SystemAssignedIdentity (340.00s)
--- PASS: TestAccRecoveryServicesVault_update (718.70s)
--- PASS: TestAccRecoveryServicesVault_updateSkuWithExistingEncryption (757.22s)
--- PASS: TestAccRecoveryServicesVault_changeInfrastructureEncryptionEnabledShouldHaveClearlyErrorMessage (762.19s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithKeyVaultKey (762.25s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithInfrastructureEncryption (784.79s)
--- PASS: TestAccRecoveryServicesVault_turnOffEncryptionWithKeyVaultKeyShouldHaveClearlyErrorMessage (791.04s)
--- PASS: TestAccRecoveryServicesVault_ToggleCrossRegionRestore (819.33s)
--- PASS: TestAccRecoveryServicesVault_turnOnEncryptionWithKeyVaultKey (855.29s)
--- PASS: TestAccRecoveryServicesVault_switchEncryptionKeyVaultKey (1059.38s)
--- PASS: TestAccRecoveryServicesVault_softDelete (1061.48s)
--- PASS: TestAccRecoveryServicesVault_encryptionWithUserAssignedIdentity (690.96s)
--- PASS: TestAccRecoveryServicesVault_TogglePublicNetworkAccessEnabled (839.21s)
--- PASS: TestAccRecoveryServicesVault_sku (1095.10s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices      1273.529s

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @ziyeqf. Left some comments and questions in-line but once those are resolved we can take another look!

website/docs/r/recovery_services_vault.html.markdown Outdated Show resolved Hide resolved
website/docs/r/recovery_services_vault.html.markdown Outdated Show resolved Hide resolved
Comment on lines 1301 to 1307
resource "azurerm_recovery_services_vault" "test" {
name = "acctest-Vault-%d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
sku = "Standard"
classic_vmware_replication_enabled = true
soft_delete_enabled = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

Suggested change
resource "azurerm_recovery_services_vault" "test" {
name = "acctest-Vault-%d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
sku = "Standard"
classic_vmware_replication_enabled = true
soft_delete_enabled = false
resource "azurerm_recovery_services_vault" "test" {
name = "acctest-Vault-%d"
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
sku = "Standard"
classic_vmware_replication_enabled = true
soft_delete_enabled = false

"classic_vmware_replication_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Computed: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be computed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated comment in code, and I'm worried if we set default value for it, it may break some users vault as they might have changed this on Portal.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ziyeqf LGTM 🥭

@stephybun stephybun merged commit b7a0a97 into hashicorp:main Feb 21, 2023
@github-actions github-actions bot added this to the v3.45.0 milestone Feb 21, 2023
stephybun added a commit that referenced this pull request Feb 21, 2023
@github-actions
Copy link

This functionality has been released in v3.45.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants