1. Packages
  2. Azure Classic
  3. API Docs
  4. recoveryservices
  5. VaultResourceGuardAssociation

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

azure.recoveryservices.VaultResourceGuardAssociation

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi

    Manages an association of a Resource Guard and Recovery Services Vault.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleResourceGuard = new Azure.DataProtection.ResourceGuard("exampleResourceGuard", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
        });
    
        var vault = new Azure.RecoveryServices.Vault("vault", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = "Standard",
            SoftDeleteEnabled = true,
        });
    
        var test = new Azure.RecoveryServices.VaultResourceGuardAssociation("test", new()
        {
            VaultId = azurerm_recovery_services_vault.Test.Id,
            ResourceGuardId = azurerm_data_protection_resource_guard.Test.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dataprotection"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dataprotection.NewResourceGuard(ctx, "exampleResourceGuard", &dataprotection.ResourceGuardArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("Standard"),
    			SoftDeleteEnabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = recoveryservices.NewVaultResourceGuardAssociation(ctx, "test", &recoveryservices.VaultResourceGuardAssociationArgs{
    			VaultId:         pulumi.Any(azurerm_recovery_services_vault.Test.Id),
    			ResourceGuardId: pulumi.Any(azurerm_data_protection_resource_guard.Test.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.dataprotection.ResourceGuard;
    import com.pulumi.azure.dataprotection.ResourceGuardArgs;
    import com.pulumi.azure.recoveryservices.Vault;
    import com.pulumi.azure.recoveryservices.VaultArgs;
    import com.pulumi.azure.recoveryservices.VaultResourceGuardAssociation;
    import com.pulumi.azure.recoveryservices.VaultResourceGuardAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleResourceGuard = new ResourceGuard("exampleResourceGuard", ResourceGuardArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .build());
    
            var vault = new Vault("vault", VaultArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .sku("Standard")
                .softDeleteEnabled(true)
                .build());
    
            var test = new VaultResourceGuardAssociation("test", VaultResourceGuardAssociationArgs.builder()        
                .vaultId(azurerm_recovery_services_vault.test().id())
                .resourceGuardId(azurerm_data_protection_resource_guard.test().id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_resource_guard = azure.dataprotection.ResourceGuard("exampleResourceGuard",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location)
    vault = azure.recoveryservices.Vault("vault",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku="Standard",
        soft_delete_enabled=True)
    test = azure.recoveryservices.VaultResourceGuardAssociation("test",
        vault_id=azurerm_recovery_services_vault["test"]["id"],
        resource_guard_id=azurerm_data_protection_resource_guard["test"]["id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleResourceGuard = new azure.dataprotection.ResourceGuard("exampleResourceGuard", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
    });
    const vault = new azure.recoveryservices.Vault("vault", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: "Standard",
        softDeleteEnabled: true,
    });
    const test = new azure.recoveryservices.VaultResourceGuardAssociation("test", {
        vaultId: azurerm_recovery_services_vault.test.id,
        resourceGuardId: azurerm_data_protection_resource_guard.test.id,
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleResourceGuard:
        type: azure:dataprotection:ResourceGuard
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
      vault:
        type: azure:recoveryservices:Vault
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          sku: Standard
          softDeleteEnabled: true
      test:
        type: azure:recoveryservices:VaultResourceGuardAssociation
        properties:
          vaultId: ${azurerm_recovery_services_vault.test.id}
          resourceGuardId: ${azurerm_data_protection_resource_guard.test.id}
    

    Create VaultResourceGuardAssociation Resource

    new VaultResourceGuardAssociation(name: string, args: VaultResourceGuardAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def VaultResourceGuardAssociation(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      name: Optional[str] = None,
                                      resource_guard_id: Optional[str] = None,
                                      vault_id: Optional[str] = None)
    @overload
    def VaultResourceGuardAssociation(resource_name: str,
                                      args: VaultResourceGuardAssociationArgs,
                                      opts: Optional[ResourceOptions] = None)
    func NewVaultResourceGuardAssociation(ctx *Context, name string, args VaultResourceGuardAssociationArgs, opts ...ResourceOption) (*VaultResourceGuardAssociation, error)
    public VaultResourceGuardAssociation(string name, VaultResourceGuardAssociationArgs args, CustomResourceOptions? opts = null)
    public VaultResourceGuardAssociation(String name, VaultResourceGuardAssociationArgs args)
    public VaultResourceGuardAssociation(String name, VaultResourceGuardAssociationArgs args, CustomResourceOptions options)
    
    type: azure:recoveryservices:VaultResourceGuardAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args VaultResourceGuardAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VaultResourceGuardAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VaultResourceGuardAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VaultResourceGuardAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VaultResourceGuardAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    VaultResourceGuardAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VaultResourceGuardAssociation resource accepts the following input properties:

    ResourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    VaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    Name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    ResourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    VaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    Name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId String
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId String
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name String

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resource_guard_id str
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vault_id str
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name str

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId String
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId String
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name String

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VaultResourceGuardAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VaultResourceGuardAssociation Resource

    Get an existing VaultResourceGuardAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VaultResourceGuardAssociationState, opts?: CustomResourceOptions): VaultResourceGuardAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            resource_guard_id: Optional[str] = None,
            vault_id: Optional[str] = None) -> VaultResourceGuardAssociation
    func GetVaultResourceGuardAssociation(ctx *Context, name string, id IDInput, state *VaultResourceGuardAssociationState, opts ...ResourceOption) (*VaultResourceGuardAssociation, error)
    public static VaultResourceGuardAssociation Get(string name, Input<string> id, VaultResourceGuardAssociationState? state, CustomResourceOptions? opts = null)
    public static VaultResourceGuardAssociation get(String name, Output<String> id, VaultResourceGuardAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    ResourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    VaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    Name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    ResourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    VaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name String

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId String
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId String
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name string

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId string
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId string
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name str

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resource_guard_id str
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vault_id str
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
    name String

    Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to VaultProxy.

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

    Deprecated:The name field will be removed in v4.0 of the AzureRM Provider.

    resourceGuardId String
    ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
    vaultId String
    ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.

    Import

    Resource Guards can be imported using the resource id, e.g.

    $ pulumi import azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/backupResourceGuardProxies/proxy1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.67.0 published on Wednesday, Feb 21, 2024 by Pulumi