flexibleengine.SdrsReplicationAttachV1
Explore with Pulumi AI
Manages a SDRS replication attch resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const domain1 = flexibleengine.getSdrsDomainV1({
name: "SDRS_HypeDomain01",
});
const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const group1 = new flexibleengine.SdrsProtectiongroupV1("group1", {
description: "test description",
sourceAvailabilityZone: "eu-west-0a",
targetAvailabilityZone: "eu-west-0b",
domainId: domain1.then(domain1 => domain1.id),
sourceVpcId: exampleVpc.vpcV1Id,
drType: "migration",
});
const instance1 = new flexibleengine.SdrsProtectedinstanceV1("instance1", {
groupId: group1.sdrsProtectiongroupV1Id,
serverId: "{{ server_id }}",
description: "test description",
});
const replication1 = new flexibleengine.SdrsReplicationPairV1("replication1", {
description: "test description",
groupId: group1.sdrsProtectiongroupV1Id,
volumeId: "{{ volume_id }}",
});
const attach1 = new flexibleengine.SdrsReplicationAttachV1("attach1", {
instanceId: instance1.sdrsProtectedinstanceV1Id,
replicationId: replication1.sdrsReplicationPairV1Id,
device: "/dev/vdb",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
domain1 = flexibleengine.get_sdrs_domain_v1(name="SDRS_HypeDomain01")
example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
group1 = flexibleengine.SdrsProtectiongroupV1("group1",
description="test description",
source_availability_zone="eu-west-0a",
target_availability_zone="eu-west-0b",
domain_id=domain1.id,
source_vpc_id=example_vpc.vpc_v1_id,
dr_type="migration")
instance1 = flexibleengine.SdrsProtectedinstanceV1("instance1",
group_id=group1.sdrs_protectiongroup_v1_id,
server_id="{{ server_id }}",
description="test description")
replication1 = flexibleengine.SdrsReplicationPairV1("replication1",
description="test description",
group_id=group1.sdrs_protectiongroup_v1_id,
volume_id="{{ volume_id }}")
attach1 = flexibleengine.SdrsReplicationAttachV1("attach1",
instance_id=instance1.sdrs_protectedinstance_v1_id,
replication_id=replication1.sdrs_replication_pair_v1_id,
device="/dev/vdb")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
domain1, err := flexibleengine.GetSdrsDomainV1(ctx, &flexibleengine.GetSdrsDomainV1Args{
Name: pulumi.StringRef("SDRS_HypeDomain01"),
}, nil)
if err != nil {
return err
}
exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
group1, err := flexibleengine.NewSdrsProtectiongroupV1(ctx, "group1", &flexibleengine.SdrsProtectiongroupV1Args{
Description: pulumi.String("test description"),
SourceAvailabilityZone: pulumi.String("eu-west-0a"),
TargetAvailabilityZone: pulumi.String("eu-west-0b"),
DomainId: pulumi.String(domain1.Id),
SourceVpcId: exampleVpc.VpcV1Id,
DrType: pulumi.String("migration"),
})
if err != nil {
return err
}
instance1, err := flexibleengine.NewSdrsProtectedinstanceV1(ctx, "instance1", &flexibleengine.SdrsProtectedinstanceV1Args{
GroupId: group1.SdrsProtectiongroupV1Id,
ServerId: pulumi.String("{{ server_id }}"),
Description: pulumi.String("test description"),
})
if err != nil {
return err
}
replication1, err := flexibleengine.NewSdrsReplicationPairV1(ctx, "replication1", &flexibleengine.SdrsReplicationPairV1Args{
Description: pulumi.String("test description"),
GroupId: group1.SdrsProtectiongroupV1Id,
VolumeId: pulumi.String("{{ volume_id }}"),
})
if err != nil {
return err
}
_, err = flexibleengine.NewSdrsReplicationAttachV1(ctx, "attach1", &flexibleengine.SdrsReplicationAttachV1Args{
InstanceId: instance1.SdrsProtectedinstanceV1Id,
ReplicationId: replication1.SdrsReplicationPairV1Id,
Device: pulumi.String("/dev/vdb"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var domain1 = Flexibleengine.GetSdrsDomainV1.Invoke(new()
{
Name = "SDRS_HypeDomain01",
});
var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
{
Cidr = "192.168.0.0/16",
});
var group1 = new Flexibleengine.SdrsProtectiongroupV1("group1", new()
{
Description = "test description",
SourceAvailabilityZone = "eu-west-0a",
TargetAvailabilityZone = "eu-west-0b",
DomainId = domain1.Apply(getSdrsDomainV1Result => getSdrsDomainV1Result.Id),
SourceVpcId = exampleVpc.VpcV1Id,
DrType = "migration",
});
var instance1 = new Flexibleengine.SdrsProtectedinstanceV1("instance1", new()
{
GroupId = group1.SdrsProtectiongroupV1Id,
ServerId = "{{ server_id }}",
Description = "test description",
});
var replication1 = new Flexibleengine.SdrsReplicationPairV1("replication1", new()
{
Description = "test description",
GroupId = group1.SdrsProtectiongroupV1Id,
VolumeId = "{{ volume_id }}",
});
var attach1 = new Flexibleengine.SdrsReplicationAttachV1("attach1", new()
{
InstanceId = instance1.SdrsProtectedinstanceV1Id,
ReplicationId = replication1.SdrsReplicationPairV1Id,
Device = "/dev/vdb",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetSdrsDomainV1Args;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.SdrsProtectiongroupV1;
import com.pulumi.flexibleengine.SdrsProtectiongroupV1Args;
import com.pulumi.flexibleengine.SdrsProtectedinstanceV1;
import com.pulumi.flexibleengine.SdrsProtectedinstanceV1Args;
import com.pulumi.flexibleengine.SdrsReplicationPairV1;
import com.pulumi.flexibleengine.SdrsReplicationPairV1Args;
import com.pulumi.flexibleengine.SdrsReplicationAttachV1;
import com.pulumi.flexibleengine.SdrsReplicationAttachV1Args;
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) {
final var domain1 = FlexibleengineFunctions.getSdrsDomainV1(GetSdrsDomainV1Args.builder()
.name("SDRS_HypeDomain01")
.build());
var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
.cidr("192.168.0.0/16")
.build());
var group1 = new SdrsProtectiongroupV1("group1", SdrsProtectiongroupV1Args.builder()
.description("test description")
.sourceAvailabilityZone("eu-west-0a")
.targetAvailabilityZone("eu-west-0b")
.domainId(domain1.applyValue(getSdrsDomainV1Result -> getSdrsDomainV1Result.id()))
.sourceVpcId(exampleVpc.vpcV1Id())
.drType("migration")
.build());
var instance1 = new SdrsProtectedinstanceV1("instance1", SdrsProtectedinstanceV1Args.builder()
.groupId(group1.sdrsProtectiongroupV1Id())
.serverId("{{ server_id }}")
.description("test description")
.build());
var replication1 = new SdrsReplicationPairV1("replication1", SdrsReplicationPairV1Args.builder()
.description("test description")
.groupId(group1.sdrsProtectiongroupV1Id())
.volumeId("{{ volume_id }}")
.build());
var attach1 = new SdrsReplicationAttachV1("attach1", SdrsReplicationAttachV1Args.builder()
.instanceId(instance1.sdrsProtectedinstanceV1Id())
.replicationId(replication1.sdrsReplicationPairV1Id())
.device("/dev/vdb")
.build());
}
}
resources:
exampleVpc:
type: flexibleengine:VpcV1
properties:
cidr: 192.168.0.0/16
group1:
type: flexibleengine:SdrsProtectiongroupV1
properties:
description: test description
sourceAvailabilityZone: eu-west-0a
targetAvailabilityZone: eu-west-0b
domainId: ${domain1.id}
sourceVpcId: ${exampleVpc.vpcV1Id}
drType: migration
instance1:
type: flexibleengine:SdrsProtectedinstanceV1
properties:
groupId: ${group1.sdrsProtectiongroupV1Id}
serverId: '{{ server_id }}'
description: test description
replication1:
type: flexibleengine:SdrsReplicationPairV1
properties:
description: test description
groupId: ${group1.sdrsProtectiongroupV1Id}
volumeId: '{{ volume_id }}'
attach1:
type: flexibleengine:SdrsReplicationAttachV1
properties:
instanceId: ${instance1.sdrsProtectedinstanceV1Id}
replicationId: ${replication1.sdrsReplicationPairV1Id}
device: /dev/vdb
variables:
domain1:
fn::invoke:
function: flexibleengine:getSdrsDomainV1
arguments:
name: SDRS_HypeDomain01
Create SdrsReplicationAttachV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SdrsReplicationAttachV1(name: string, args: SdrsReplicationAttachV1Args, opts?: CustomResourceOptions);
@overload
def SdrsReplicationAttachV1(resource_name: str,
args: SdrsReplicationAttachV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def SdrsReplicationAttachV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
device: Optional[str] = None,
instance_id: Optional[str] = None,
replication_id: Optional[str] = None,
sdrs_replication_attach_v1_id: Optional[str] = None,
timeouts: Optional[SdrsReplicationAttachV1TimeoutsArgs] = None)
func NewSdrsReplicationAttachV1(ctx *Context, name string, args SdrsReplicationAttachV1Args, opts ...ResourceOption) (*SdrsReplicationAttachV1, error)
public SdrsReplicationAttachV1(string name, SdrsReplicationAttachV1Args args, CustomResourceOptions? opts = null)
public SdrsReplicationAttachV1(String name, SdrsReplicationAttachV1Args args)
public SdrsReplicationAttachV1(String name, SdrsReplicationAttachV1Args args, CustomResourceOptions options)
type: flexibleengine:SdrsReplicationAttachV1
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 SdrsReplicationAttachV1Args
- 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 SdrsReplicationAttachV1Args
- 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 SdrsReplicationAttachV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SdrsReplicationAttachV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SdrsReplicationAttachV1Args
- 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 sdrsReplicationAttachV1Resource = new Flexibleengine.SdrsReplicationAttachV1("sdrsReplicationAttachV1Resource", new()
{
Device = "string",
InstanceId = "string",
ReplicationId = "string",
SdrsReplicationAttachV1Id = "string",
Timeouts = new Flexibleengine.Inputs.SdrsReplicationAttachV1TimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := flexibleengine.NewSdrsReplicationAttachV1(ctx, "sdrsReplicationAttachV1Resource", &flexibleengine.SdrsReplicationAttachV1Args{
Device: pulumi.String("string"),
InstanceId: pulumi.String("string"),
ReplicationId: pulumi.String("string"),
SdrsReplicationAttachV1Id: pulumi.String("string"),
Timeouts: &flexibleengine.SdrsReplicationAttachV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var sdrsReplicationAttachV1Resource = new SdrsReplicationAttachV1("sdrsReplicationAttachV1Resource", SdrsReplicationAttachV1Args.builder()
.device("string")
.instanceId("string")
.replicationId("string")
.sdrsReplicationAttachV1Id("string")
.timeouts(SdrsReplicationAttachV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
sdrs_replication_attach_v1_resource = flexibleengine.SdrsReplicationAttachV1("sdrsReplicationAttachV1Resource",
device="string",
instance_id="string",
replication_id="string",
sdrs_replication_attach_v1_id="string",
timeouts={
"create": "string",
"delete": "string",
})
const sdrsReplicationAttachV1Resource = new flexibleengine.SdrsReplicationAttachV1("sdrsReplicationAttachV1Resource", {
device: "string",
instanceId: "string",
replicationId: "string",
sdrsReplicationAttachV1Id: "string",
timeouts: {
create: "string",
"delete": "string",
},
});
type: flexibleengine:SdrsReplicationAttachV1
properties:
device: string
instanceId: string
replicationId: string
sdrsReplicationAttachV1Id: string
timeouts:
create: string
delete: string
SdrsReplicationAttachV1 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 SdrsReplicationAttachV1 resource accepts the following input properties:
- Device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- Instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- Replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- Sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- Timeouts
Sdrs
Replication Attach V1Timeouts
- Device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- Instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- Replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- Sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- Timeouts
Sdrs
Replication Attach V1Timeouts Args
- device String
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id String - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id String - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication StringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- timeouts
Sdrs
Replication Attach V1Timeouts
- device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- timeouts
Sdrs
Replication Attach V1Timeouts
- device str
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance_
id str - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication_
id str - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs_
replication_ strattach_ v1_ id - The resource ID in format of <instance_id>:<replication_id>.
- timeouts
Sdrs
Replication Attach V1Timeouts Args
- device String
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id String - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id String - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication StringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SdrsReplicationAttachV1 resource produces the following output properties:
Look up Existing SdrsReplicationAttachV1 Resource
Get an existing SdrsReplicationAttachV1 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?: SdrsReplicationAttachV1State, opts?: CustomResourceOptions): SdrsReplicationAttachV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device: Optional[str] = None,
instance_id: Optional[str] = None,
replication_id: Optional[str] = None,
sdrs_replication_attach_v1_id: Optional[str] = None,
status: Optional[str] = None,
timeouts: Optional[SdrsReplicationAttachV1TimeoutsArgs] = None) -> SdrsReplicationAttachV1
func GetSdrsReplicationAttachV1(ctx *Context, name string, id IDInput, state *SdrsReplicationAttachV1State, opts ...ResourceOption) (*SdrsReplicationAttachV1, error)
public static SdrsReplicationAttachV1 Get(string name, Input<string> id, SdrsReplicationAttachV1State? state, CustomResourceOptions? opts = null)
public static SdrsReplicationAttachV1 get(String name, Output<String> id, SdrsReplicationAttachV1State state, CustomResourceOptions options)
resources: _: type: flexibleengine:SdrsReplicationAttachV1 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.
- Device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- Instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- Replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- Sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- Status string
- The status of the SDRS replication attach resource.
- Timeouts
Sdrs
Replication Attach V1Timeouts
- Device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- Instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- Replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- Sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- Status string
- The status of the SDRS replication attach resource.
- Timeouts
Sdrs
Replication Attach V1Timeouts Args
- device String
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id String - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id String - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication StringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- status String
- The status of the SDRS replication attach resource.
- timeouts
Sdrs
Replication Attach V1Timeouts
- device string
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id string - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id string - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication stringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- status string
- The status of the SDRS replication attach resource.
- timeouts
Sdrs
Replication Attach V1Timeouts
- device str
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance_
id str - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication_
id str - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs_
replication_ strattach_ v1_ id - The resource ID in format of <instance_id>:<replication_id>.
- status str
- The status of the SDRS replication attach resource.
- timeouts
Sdrs
Replication Attach V1Timeouts Args
- device String
- Specifies the device name, eg. /dev/vdb. Changing this creates a new replication attach.
- instance
Id String - Specifies the ID of a protected instance. Changing this creates a new replication attach.
- replication
Id String - Specifies the ID of a replication pair. Changing this creates a new replication attach.
- sdrs
Replication StringAttach V1Id - The resource ID in format of <instance_id>:<replication_id>.
- status String
- The status of the SDRS replication attach resource.
- timeouts Property Map
Supporting Types
SdrsReplicationAttachV1Timeouts, SdrsReplicationAttachV1TimeoutsArgs
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.