vmc.SiteRecovery
Explore with Pulumi AI
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 tovmc.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:
- Sddc
Id string - The SDDC identifier.
- Site
Recovery stringId - Srm
Extension stringKey Suffix - 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
Site
Recovery Timeouts
- Sddc
Id string - The SDDC identifier.
- Site
Recovery stringId - Srm
Extension stringKey Suffix - 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
Site
Recovery Timeouts Args
- sddc
Id String - The SDDC identifier.
- site
Recovery StringId - srm
Extension StringKey Suffix - 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
Site
Recovery Timeouts
- sddc
Id string - The SDDC identifier.
- site
Recovery stringId - srm
Extension stringKey Suffix - 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
Site
Recovery Timeouts
- sddc_
id str - The SDDC identifier.
- site_
recovery_ strid - srm_
extension_ strkey_ suffix - 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
Site
Recovery Timeouts Args
- sddc
Id String - The SDDC identifier.
- site
Recovery StringId - srm
Extension StringKey Suffix - 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:
- Draas
H5Url string - Id string
- The provider-assigned unique ID for this managed resource.
- Site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - Srm
Node Dictionary<string, string> - The site Recovery node created after activation.
- User
Id string - User id that last updated this record.
- User
Name string - User name that last updated this record.
- Vr
Node Dictionary<string, string> - The vSphere Replication node created after activation.
- Draas
H5Url string - Id string
- The provider-assigned unique ID for this managed resource.
- Site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - Srm
Node map[string]string - The site Recovery node created after activation.
- User
Id string - User id that last updated this record.
- User
Name string - User name that last updated this record.
- Vr
Node map[string]string - The vSphere Replication node created after activation.
- draas
H5Url String - id String
- The provider-assigned unique ID for this managed resource.
- site
Recovery StringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Node Map<String,String> - The site Recovery node created after activation.
- user
Id String - User id that last updated this record.
- user
Name String - User name that last updated this record.
- vr
Node Map<String,String> - The vSphere Replication node created after activation.
- draas
H5Url string - id string
- The provider-assigned unique ID for this managed resource.
- site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Node {[key: string]: string} - The site Recovery node created after activation.
- user
Id string - User id that last updated this record.
- user
Name string - User name that last updated this record.
- vr
Node {[key: string]: string} - The vSphere Replication node created after activation.
- draas_
h5_ strurl - id str
- The provider-assigned unique ID for this managed resource.
- site_
recovery_ strstate - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - 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.
- draas
H5Url String - id String
- The provider-assigned unique ID for this managed resource.
- site
Recovery StringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Node Map<String> - The site Recovery node created after activation.
- user
Id String - User id that last updated this record.
- user
Name String - User name that last updated this record.
- vr
Node 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.
- Draas
H5Url string - Sddc
Id string - The SDDC identifier.
- Site
Recovery stringId - Site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - Srm
Extension stringKey Suffix - 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 Dictionary<string, string> - The site Recovery node created after activation.
- Timeouts
Site
Recovery Timeouts - User
Id string - User id that last updated this record.
- User
Name string - User name that last updated this record.
- Vr
Node Dictionary<string, string> - The vSphere Replication node created after activation.
- Draas
H5Url string - Sddc
Id string - The SDDC identifier.
- Site
Recovery stringId - Site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - Srm
Extension stringKey Suffix - 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 map[string]string - The site Recovery node created after activation.
- Timeouts
Site
Recovery Timeouts Args - User
Id string - User id that last updated this record.
- User
Name string - User name that last updated this record.
- Vr
Node map[string]string - The vSphere Replication node created after activation.
- draas
H5Url String - sddc
Id String - The SDDC identifier.
- site
Recovery StringId - site
Recovery StringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Extension StringKey Suffix - 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 Map<String,String> - The site Recovery node created after activation.
- timeouts
Site
Recovery Timeouts - user
Id String - User id that last updated this record.
- user
Name String - User name that last updated this record.
- vr
Node Map<String,String> - The vSphere Replication node created after activation.
- draas
H5Url string - sddc
Id string - The SDDC identifier.
- site
Recovery stringId - site
Recovery stringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Extension stringKey Suffix - 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 {[key: string]: string} - The site Recovery node created after activation.
- timeouts
Site
Recovery Timeouts - user
Id string - User id that last updated this record.
- user
Name string - User name that last updated this record.
- vr
Node {[key: string]: string} - The vSphere Replication node created after activation.
- draas_
h5_ strurl - sddc_
id str - The SDDC identifier.
- site_
recovery_ strid - site_
recovery_ strstate - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm_
extension_ strkey_ suffix - 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
Site
Recovery Timeouts Args - 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.
- draas
H5Url String - sddc
Id String - The SDDC identifier.
- site
Recovery StringId - site
Recovery StringState - The site recovery state. Allowed values include:
ACTIVATED
,ACTIVATING
,CANCELED
,DEACTIVATED
,DEACTIVATING
,DELETED
, andFAILED
. * - srm
Extension StringKey Suffix - 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 Map<String> - The site Recovery node created after activation.
- timeouts Property Map
- user
Id String - User id that last updated this record.
- user
Name String - User name that last updated this record.
- vr
Node Map<String> - The vSphere Replication node created after activation.
Supporting Types
SiteRecoveryTimeouts, SiteRecoveryTimeoutsArgs
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.