1. Packages
  2. Vmc Provider
  3. API Docs
  4. SiteRecovery
vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware

vmc.SiteRecovery

Explore with Pulumi AI

vmc logo
vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware

    Provides a resource to activate and deactivate site recovery for an SDDC.

    Note: This resource implicitly depends on SDDC resource creation. SDDC must be provisioned before a site recovery can be activated. A 10-minute delay must be added to SDDC resource before site recovery can be activated. This delay is added using the local-exec provisioner. For details on how to provision an SDDC refer to vmc.Sddc.

    Create SiteRecovery Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SiteRecovery(name: string, args: SiteRecoveryArgs, opts?: CustomResourceOptions);
    @overload
    def SiteRecovery(resource_name: str,
                     args: SiteRecoveryArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def SiteRecovery(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     sddc_id: Optional[str] = None,
                     site_recovery_id: Optional[str] = None,
                     srm_extension_key_suffix: Optional[str] = None,
                     timeouts: Optional[SiteRecoveryTimeoutsArgs] = None)
    func NewSiteRecovery(ctx *Context, name string, args SiteRecoveryArgs, opts ...ResourceOption) (*SiteRecovery, error)
    public SiteRecovery(string name, SiteRecoveryArgs args, CustomResourceOptions? opts = null)
    public SiteRecovery(String name, SiteRecoveryArgs args)
    public SiteRecovery(String name, SiteRecoveryArgs args, CustomResourceOptions options)
    
    type: vmc:SiteRecovery
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SiteRecoveryArgs
    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 SiteRecoveryArgs
    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 SiteRecoveryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SiteRecoveryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SiteRecoveryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var siteRecoveryResource = new Vmc.SiteRecovery("siteRecoveryResource", new()
    {
        SddcId = "string",
        SiteRecoveryId = "string",
        SrmExtensionKeySuffix = "string",
        Timeouts = new Vmc.Inputs.SiteRecoveryTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := vmc.NewSiteRecovery(ctx, "siteRecoveryResource", &vmc.SiteRecoveryArgs{
    	SddcId:                pulumi.String("string"),
    	SiteRecoveryId:        pulumi.String("string"),
    	SrmExtensionKeySuffix: pulumi.String("string"),
    	Timeouts: &vmc.SiteRecoveryTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var siteRecoveryResource = new SiteRecovery("siteRecoveryResource", SiteRecoveryArgs.builder()
        .sddcId("string")
        .siteRecoveryId("string")
        .srmExtensionKeySuffix("string")
        .timeouts(SiteRecoveryTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    site_recovery_resource = vmc.SiteRecovery("siteRecoveryResource",
        sddc_id="string",
        site_recovery_id="string",
        srm_extension_key_suffix="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const siteRecoveryResource = new vmc.SiteRecovery("siteRecoveryResource", {
        sddcId: "string",
        siteRecoveryId: "string",
        srmExtensionKeySuffix: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: vmc:SiteRecovery
    properties:
        sddcId: string
        siteRecoveryId: string
        srmExtensionKeySuffix: string
        timeouts:
            create: string
            delete: string
    

    SiteRecovery Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SiteRecovery resource accepts the following input properties:

    SddcId string
    The SDDC identifier.
    SiteRecoveryId string
    SrmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    Timeouts SiteRecoveryTimeouts
    SddcId string
    The SDDC identifier.
    SiteRecoveryId string
    SrmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    Timeouts SiteRecoveryTimeoutsArgs
    sddcId String
    The SDDC identifier.
    siteRecoveryId String
    srmExtensionKeySuffix String
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    timeouts SiteRecoveryTimeouts
    sddcId string
    The SDDC identifier.
    siteRecoveryId string
    srmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    timeouts SiteRecoveryTimeouts
    sddc_id str
    The SDDC identifier.
    site_recovery_id str
    srm_extension_key_suffix str
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    timeouts SiteRecoveryTimeoutsArgs
    sddcId String
    The SDDC identifier.
    siteRecoveryId String
    srmExtensionKeySuffix String
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    timeouts Property Map

    Outputs

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

    DraasH5Url string
    Id string
    The provider-assigned unique ID for this managed resource.
    SiteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    SrmNode Dictionary<string, string>
    The site Recovery node created after activation.
    UserId string
    User id that last updated this record.
    UserName string
    User name that last updated this record.
    VrNode Dictionary<string, string>
    The vSphere Replication node created after activation.
    DraasH5Url string
    Id string
    The provider-assigned unique ID for this managed resource.
    SiteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    SrmNode map[string]string
    The site Recovery node created after activation.
    UserId string
    User id that last updated this record.
    UserName string
    User name that last updated this record.
    VrNode map[string]string
    The vSphere Replication node created after activation.
    draasH5Url String
    id String
    The provider-assigned unique ID for this managed resource.
    siteRecoveryState String
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmNode Map<String,String>
    The site Recovery node created after activation.
    userId String
    User id that last updated this record.
    userName String
    User name that last updated this record.
    vrNode Map<String,String>
    The vSphere Replication node created after activation.
    draasH5Url string
    id string
    The provider-assigned unique ID for this managed resource.
    siteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmNode {[key: string]: string}
    The site Recovery node created after activation.
    userId string
    User id that last updated this record.
    userName string
    User name that last updated this record.
    vrNode {[key: string]: string}
    The vSphere Replication node created after activation.
    draas_h5_url str
    id str
    The provider-assigned unique ID for this managed resource.
    site_recovery_state str
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srm_node Mapping[str, str]
    The site Recovery node created after activation.
    user_id str
    User id that last updated this record.
    user_name str
    User name that last updated this record.
    vr_node Mapping[str, str]
    The vSphere Replication node created after activation.
    draasH5Url String
    id String
    The provider-assigned unique ID for this managed resource.
    siteRecoveryState String
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmNode Map<String>
    The site Recovery node created after activation.
    userId String
    User id that last updated this record.
    userName String
    User name that last updated this record.
    vrNode Map<String>
    The vSphere Replication node created after activation.

    Look up Existing SiteRecovery Resource

    Get an existing SiteRecovery 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?: SiteRecoveryState, opts?: CustomResourceOptions): SiteRecovery
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            draas_h5_url: Optional[str] = None,
            sddc_id: Optional[str] = None,
            site_recovery_id: Optional[str] = None,
            site_recovery_state: Optional[str] = None,
            srm_extension_key_suffix: Optional[str] = None,
            srm_node: Optional[Mapping[str, str]] = None,
            timeouts: Optional[SiteRecoveryTimeoutsArgs] = None,
            user_id: Optional[str] = None,
            user_name: Optional[str] = None,
            vr_node: Optional[Mapping[str, str]] = None) -> SiteRecovery
    func GetSiteRecovery(ctx *Context, name string, id IDInput, state *SiteRecoveryState, opts ...ResourceOption) (*SiteRecovery, error)
    public static SiteRecovery Get(string name, Input<string> id, SiteRecoveryState? state, CustomResourceOptions? opts = null)
    public static SiteRecovery get(String name, Output<String> id, SiteRecoveryState state, CustomResourceOptions options)
    resources:  _:    type: vmc:SiteRecovery    get:      id: ${id}
    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:
    DraasH5Url string
    SddcId string
    The SDDC identifier.
    SiteRecoveryId string
    SiteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    SrmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    SrmNode Dictionary<string, string>
    The site Recovery node created after activation.
    Timeouts SiteRecoveryTimeouts
    UserId string
    User id that last updated this record.
    UserName string
    User name that last updated this record.
    VrNode Dictionary<string, string>
    The vSphere Replication node created after activation.
    DraasH5Url string
    SddcId string
    The SDDC identifier.
    SiteRecoveryId string
    SiteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    SrmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    SrmNode map[string]string
    The site Recovery node created after activation.
    Timeouts SiteRecoveryTimeoutsArgs
    UserId string
    User id that last updated this record.
    UserName string
    User name that last updated this record.
    VrNode map[string]string
    The vSphere Replication node created after activation.
    draasH5Url String
    sddcId String
    The SDDC identifier.
    siteRecoveryId String
    siteRecoveryState String
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmExtensionKeySuffix String
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    srmNode Map<String,String>
    The site Recovery node created after activation.
    timeouts SiteRecoveryTimeouts
    userId String
    User id that last updated this record.
    userName String
    User name that last updated this record.
    vrNode Map<String,String>
    The vSphere Replication node created after activation.
    draasH5Url string
    sddcId string
    The SDDC identifier.
    siteRecoveryId string
    siteRecoveryState string
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmExtensionKeySuffix string
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    srmNode {[key: string]: string}
    The site Recovery node created after activation.
    timeouts SiteRecoveryTimeouts
    userId string
    User id that last updated this record.
    userName string
    User name that last updated this record.
    vrNode {[key: string]: string}
    The vSphere Replication node created after activation.
    draas_h5_url str
    sddc_id str
    The SDDC identifier.
    site_recovery_id str
    site_recovery_state str
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srm_extension_key_suffix str
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    srm_node Mapping[str, str]
    The site Recovery node created after activation.
    timeouts SiteRecoveryTimeoutsArgs
    user_id str
    User id that last updated this record.
    user_name str
    User name that last updated this record.
    vr_node Mapping[str, str]
    The vSphere Replication node created after activation.
    draasH5Url String
    sddcId String
    The SDDC identifier.
    siteRecoveryId String
    siteRecoveryState String
    The site recovery state. Allowed values include: ACTIVATED, ACTIVATING, CANCELED, DEACTIVATED, DEACTIVATING, DELETED, and FAILED. *
    srmExtensionKeySuffix String
    The custom extension suffix for SRM must contain 13 characters or less, be composed of letters, numbers, ., - characters only. The suffix is appended to com.vmware.vcDr- to form the full extension key.
    srmNode Map<String>
    The site Recovery node created after activation.
    timeouts Property Map
    userId String
    User id that last updated this record.
    userName String
    User name that last updated this record.
    vrNode Map<String>
    The vSphere Replication node created after activation.

    Supporting Types

    SiteRecoveryTimeouts, SiteRecoveryTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Import the resource using the sddc_id.

    $ pulumi import vmc:index/siteRecovery:SiteRecovery site_recovery_1 sddc_id`
    

    For example:

    $ pulumi import vmc:index/siteRecovery:SiteRecovery site_recovery_1 afe7a0fd-3f0a-48b2-9ddb-0489c22732ae`
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vmc vmware/terraform-provider-vmc
    License
    Notes
    This Pulumi package is based on the vmc Terraform Provider.
    vmc logo
    vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware