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

New Resource: azurerm_site_recovery_vmware_replication_policy_association #21389

Merged

Conversation

ziyeqf
Copy link
Contributor

@ziyeqf ziyeqf commented Apr 12, 2023

It a bit strange to associate a policy (which is already in the same vault) to the vault, but it's needed to do the association to do further actions...

To run the test, it requires a VMWare machine connected to the Recovery Services Vault. It could not be deployed automatically in acctest. So, it needs to deploy one and provide the resource id in environment variables.

Test

terraform-provider-azurerm ❯ TF_ACC=1 go test -v ./internal/services/recoveryservices -run=TestAccSiteRecoveryVMWareReplicationPolicyAssociation_basic -timeout=600m
=== RUN   TestAccSiteRecoveryVMWareReplicationPolicyAssociation_basic
=== PAUSE TestAccSiteRecoveryVMWareReplicationPolicyAssociation_basic
=== CONT  TestAccSiteRecoveryVMWareReplicationPolicyAssociation_basic
--- PASS: TestAccSiteRecoveryVMWareReplicationPolicyAssociation_basic (244.53s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/recoveryservices      244.576s

@jackofallops
Copy link
Member

Hi @ziyeqf - Can you expand on the detail for the reason for this new association resource? Specifically expand on what the "further actions" are?

@ziyeqf
Copy link
Contributor Author

ziyeqf commented Apr 13, 2023

Hi @jackofallops , I'd like to.

  1. The difference between the existing association resource. This new one is used to associate a VMWare replication policy, specially for V2ARCM(VMWare To Azure modernized experience). The existing one azurerm_site_recovery_hyperv_replication_policy_association is used to associate a policy with an H2A(HyperV To Azure) Site.
  2. The further action means to replicate a virtual machine from VMWare. When using Portal, the association is created together with the policy, but they are actually two resources. While by calling API, it needs to do it in separate steps.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 🚎

@katbyte katbyte merged commit 4b6f5c9 into hashicorp:main May 24, 2023
katbyte added a commit that referenced this pull request May 24, 2023
@github-actions github-actions bot added this to the v3.58.0 milestone May 24, 2023
@github-actions
Copy link

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

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 May 29, 2024
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