Skip to content

Commit

Permalink
azurerm_recovery_services_vault_resource_guard_association: fix acc…
Browse files Browse the repository at this point in the history
…test (#23301)

* `azurerm_recovery_services_vault_resource_guard_association`: fix acctest

Signed-off-by: ziyeqf <[email protected]>

* add comments

Signed-off-by: ziyeqf <[email protected]>

---------

Signed-off-by: ziyeqf <[email protected]>
  • Loading branch information
ziyeqf authored Sep 19, 2023
1 parent 75bcf46 commit 4d9e601
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ func (r VaultGuardProxyResource) ResourceType() string {

func (r VaultGuardProxyResource) Arguments() map[string]*schema.Schema {
return map[string]*schema.Schema{
// todo 4.0: remove the `name` field as the service only allow create `VaultProxy`
"name": {
Deprecated: "The `name` field will be removed in v4.0 of the AzureRM Provider.",
Type: pluginsdk.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "VaultProxy",
ValidateFunc: validation.StringIsNotEmpty,
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resource "azurerm_data_protection_resource_guard" "test" {
}
resource "azurerm_recovery_services_vault_resource_guard_association" "test" {
name = "tftest"
name = "VaultProxy"
vault_id = azurerm_recovery_services_vault.test.id
resource_guard_id = azurerm_data_protection_resource_guard.test.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "azurerm_recovery_services_vault" "vault" {
}
resource "azurerm_recovery_services_vault_resource_guard_association" "test" {
name = "example-guard-proxy"
name = "VaultProxy"
vault_id = azurerm_recovery_services_vault.test.id
resource_guard_id = azurerm_data_protection_resource_guard.test.id
}
Expand All @@ -44,7 +44,9 @@ resource "azurerm_recovery_services_vault_resource_guard_association" "test" {

The following arguments are supported:

* `name` - (Required) Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created.
* `name` - (Optional) Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created.

-> **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider.

* `vault_id` - (Required) ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.

Expand Down

0 comments on commit 4d9e601

Please sign in to comment.