published on Monday, Sep 21, 2026 by tencentcloudstack
published on Monday, Sep 21, 2026 by tencentcloudstack
Provides a resource to create a BDRC security group mapping.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.BdrcDisasterRecoverySitePair("example", {
disasterRecoveryType: "CROSS_ZONE",
sourceRegion: "ap-shanghai",
sourceZone: "ap-shanghai-3",
targetRegion: "ap-shanghai",
targetZone: "ap-shanghai-4",
sourceVpc: "vpc-lx6q09ji",
targetVpc: "vpc-jktad5e6",
sitePairProductType: "INSTANCE",
sitePairName: "tf-example",
copyType: "ASY",
});
const exampleBdrcSecurityGroupMapping = new tencentcloud.BdrcSecurityGroupMapping("example", {
sitePairId: example.sitePairId,
srcSecurityGroupId: "sg-ool7tmf8",
targetSecurityGroupId: "sg-jfy3gi92",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.BdrcDisasterRecoverySitePair("example",
disaster_recovery_type="CROSS_ZONE",
source_region="ap-shanghai",
source_zone="ap-shanghai-3",
target_region="ap-shanghai",
target_zone="ap-shanghai-4",
source_vpc="vpc-lx6q09ji",
target_vpc="vpc-jktad5e6",
site_pair_product_type="INSTANCE",
site_pair_name="tf-example",
copy_type="ASY")
example_bdrc_security_group_mapping = tencentcloud.BdrcSecurityGroupMapping("example",
site_pair_id=example.site_pair_id,
src_security_group_id="sg-ool7tmf8",
target_security_group_id="sg-jfy3gi92")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := tencentcloud.NewBdrcDisasterRecoverySitePair(ctx, "example", &tencentcloud.BdrcDisasterRecoverySitePairArgs{
DisasterRecoveryType: pulumi.String("CROSS_ZONE"),
SourceRegion: pulumi.String("ap-shanghai"),
SourceZone: pulumi.String("ap-shanghai-3"),
TargetRegion: pulumi.String("ap-shanghai"),
TargetZone: pulumi.String("ap-shanghai-4"),
SourceVpc: pulumi.String("vpc-lx6q09ji"),
TargetVpc: pulumi.String("vpc-jktad5e6"),
SitePairProductType: pulumi.String("INSTANCE"),
SitePairName: pulumi.String("tf-example"),
CopyType: pulumi.String("ASY"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewBdrcSecurityGroupMapping(ctx, "example", &tencentcloud.BdrcSecurityGroupMappingArgs{
SitePairId: example.SitePairId,
SrcSecurityGroupId: pulumi.String("sg-ool7tmf8"),
TargetSecurityGroupId: pulumi.String("sg-jfy3gi92"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.BdrcDisasterRecoverySitePair("example", new()
{
DisasterRecoveryType = "CROSS_ZONE",
SourceRegion = "ap-shanghai",
SourceZone = "ap-shanghai-3",
TargetRegion = "ap-shanghai",
TargetZone = "ap-shanghai-4",
SourceVpc = "vpc-lx6q09ji",
TargetVpc = "vpc-jktad5e6",
SitePairProductType = "INSTANCE",
SitePairName = "tf-example",
CopyType = "ASY",
});
var exampleBdrcSecurityGroupMapping = new Tencentcloud.BdrcSecurityGroupMapping("example", new()
{
SitePairId = example.SitePairId,
SrcSecurityGroupId = "sg-ool7tmf8",
TargetSecurityGroupId = "sg-jfy3gi92",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.BdrcDisasterRecoverySitePair;
import com.pulumi.tencentcloud.BdrcDisasterRecoverySitePairArgs;
import com.pulumi.tencentcloud.BdrcSecurityGroupMapping;
import com.pulumi.tencentcloud.BdrcSecurityGroupMappingArgs;
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 example = new BdrcDisasterRecoverySitePair("example", BdrcDisasterRecoverySitePairArgs.builder()
.disasterRecoveryType("CROSS_ZONE")
.sourceRegion("ap-shanghai")
.sourceZone("ap-shanghai-3")
.targetRegion("ap-shanghai")
.targetZone("ap-shanghai-4")
.sourceVpc("vpc-lx6q09ji")
.targetVpc("vpc-jktad5e6")
.sitePairProductType("INSTANCE")
.sitePairName("tf-example")
.copyType("ASY")
.build());
var exampleBdrcSecurityGroupMapping = new BdrcSecurityGroupMapping("exampleBdrcSecurityGroupMapping", BdrcSecurityGroupMappingArgs.builder()
.sitePairId(example.sitePairId())
.srcSecurityGroupId("sg-ool7tmf8")
.targetSecurityGroupId("sg-jfy3gi92")
.build());
}
}
resources:
example:
type: tencentcloud:BdrcDisasterRecoverySitePair
properties:
disasterRecoveryType: CROSS_ZONE
sourceRegion: ap-shanghai
sourceZone: ap-shanghai-3
targetRegion: ap-shanghai
targetZone: ap-shanghai-4
sourceVpc: vpc-lx6q09ji
targetVpc: vpc-jktad5e6
sitePairProductType: INSTANCE
sitePairName: tf-example
copyType: ASY
exampleBdrcSecurityGroupMapping:
type: tencentcloud:BdrcSecurityGroupMapping
name: example
properties:
sitePairId: ${example.sitePairId}
srcSecurityGroupId: sg-ool7tmf8
targetSecurityGroupId: sg-jfy3gi92
Example coming soon!
Create BdrcSecurityGroupMapping Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BdrcSecurityGroupMapping(name: string, args: BdrcSecurityGroupMappingArgs, opts?: CustomResourceOptions);@overload
def BdrcSecurityGroupMapping(resource_name: str,
args: BdrcSecurityGroupMappingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BdrcSecurityGroupMapping(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_pair_id: Optional[str] = None,
src_security_group_id: Optional[str] = None,
target_security_group_id: Optional[str] = None,
bdrc_security_group_mapping_id: Optional[str] = None)func NewBdrcSecurityGroupMapping(ctx *Context, name string, args BdrcSecurityGroupMappingArgs, opts ...ResourceOption) (*BdrcSecurityGroupMapping, error)public BdrcSecurityGroupMapping(string name, BdrcSecurityGroupMappingArgs args, CustomResourceOptions? opts = null)
public BdrcSecurityGroupMapping(String name, BdrcSecurityGroupMappingArgs args)
public BdrcSecurityGroupMapping(String name, BdrcSecurityGroupMappingArgs args, CustomResourceOptions options)
type: tencentcloud:BdrcSecurityGroupMapping
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_bdrc_security_group_mapping" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args BdrcSecurityGroupMappingArgs
- 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 BdrcSecurityGroupMappingArgs
- 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 BdrcSecurityGroupMappingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BdrcSecurityGroupMappingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BdrcSecurityGroupMappingArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BdrcSecurityGroupMapping 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 BdrcSecurityGroupMapping resource accepts the following input properties:
- Site
Pair stringId - Security group mapping belongs to the site pair ID.
- Src
Security stringGroup Id - Production end instance bound to the security group ID.
- Target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- Bdrc
Security stringGroup Mapping Id - ID of the resource.
- Site
Pair stringId - Security group mapping belongs to the site pair ID.
- Src
Security stringGroup Id - Production end instance bound to the security group ID.
- Target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- Bdrc
Security stringGroup Mapping Id - ID of the resource.
- site_
pair_ stringid - Security group mapping belongs to the site pair ID.
- src_
security_ stringgroup_ id - Production end instance bound to the security group ID.
- target_
security_ stringgroup_ id - Disaster recovery end instance bound to the security group ID.
- bdrc_
security_ stringgroup_ mapping_ id - ID of the resource.
- site
Pair StringId - Security group mapping belongs to the site pair ID.
- src
Security StringGroup Id - Production end instance bound to the security group ID.
- target
Security StringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security StringGroup Mapping Id - ID of the resource.
- site
Pair stringId - Security group mapping belongs to the site pair ID.
- src
Security stringGroup Id - Production end instance bound to the security group ID.
- target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security stringGroup Mapping Id - ID of the resource.
- site_
pair_ strid - Security group mapping belongs to the site pair ID.
- src_
security_ strgroup_ id - Production end instance bound to the security group ID.
- target_
security_ strgroup_ id - Disaster recovery end instance bound to the security group ID.
- bdrc_
security_ strgroup_ mapping_ id - ID of the resource.
- site
Pair StringId - Security group mapping belongs to the site pair ID.
- src
Security StringGroup Id - Production end instance bound to the security group ID.
- target
Security StringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security StringGroup Mapping Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the BdrcSecurityGroupMapping resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Life
State string - Life state of the security group mapping; NORMAL: normal.
- Security
Group stringMapping Id - Security group mapping ID.
- Source
Security stringGroup Id - Production end security group ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Life
State string - Life state of the security group mapping; NORMAL: normal.
- Security
Group stringMapping Id - Security group mapping ID.
- Source
Security stringGroup Id - Production end security group ID.
- id string
- The provider-assigned unique ID for this managed resource.
- life_
state string - Life state of the security group mapping; NORMAL: normal.
- security_
group_ stringmapping_ id - Security group mapping ID.
- source_
security_ stringgroup_ id - Production end security group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- life
State String - Life state of the security group mapping; NORMAL: normal.
- security
Group StringMapping Id - Security group mapping ID.
- source
Security StringGroup Id - Production end security group ID.
- id string
- The provider-assigned unique ID for this managed resource.
- life
State string - Life state of the security group mapping; NORMAL: normal.
- security
Group stringMapping Id - Security group mapping ID.
- source
Security stringGroup Id - Production end security group ID.
- id str
- The provider-assigned unique ID for this managed resource.
- life_
state str - Life state of the security group mapping; NORMAL: normal.
- security_
group_ strmapping_ id - Security group mapping ID.
- source_
security_ strgroup_ id - Production end security group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- life
State String - Life state of the security group mapping; NORMAL: normal.
- security
Group StringMapping Id - Security group mapping ID.
- source
Security StringGroup Id - Production end security group ID.
Look up Existing BdrcSecurityGroupMapping Resource
Get an existing BdrcSecurityGroupMapping 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?: BdrcSecurityGroupMappingState, opts?: CustomResourceOptions): BdrcSecurityGroupMapping@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bdrc_security_group_mapping_id: Optional[str] = None,
life_state: Optional[str] = None,
security_group_mapping_id: Optional[str] = None,
site_pair_id: Optional[str] = None,
source_security_group_id: Optional[str] = None,
src_security_group_id: Optional[str] = None,
target_security_group_id: Optional[str] = None) -> BdrcSecurityGroupMappingfunc GetBdrcSecurityGroupMapping(ctx *Context, name string, id IDInput, state *BdrcSecurityGroupMappingState, opts ...ResourceOption) (*BdrcSecurityGroupMapping, error)public static BdrcSecurityGroupMapping Get(string name, Input<string> id, BdrcSecurityGroupMappingState? state, CustomResourceOptions? opts = null)public static BdrcSecurityGroupMapping get(String name, Output<String> id, BdrcSecurityGroupMappingState state, CustomResourceOptions options)resources: _: type: tencentcloud:BdrcSecurityGroupMapping get: id: ${id}import {
to = tencentcloud_bdrc_security_group_mapping.example
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.
- Bdrc
Security stringGroup Mapping Id - ID of the resource.
- Life
State string - Life state of the security group mapping; NORMAL: normal.
- Security
Group stringMapping Id - Security group mapping ID.
- Site
Pair stringId - Security group mapping belongs to the site pair ID.
- Source
Security stringGroup Id - Production end security group ID.
- Src
Security stringGroup Id - Production end instance bound to the security group ID.
- Target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- Bdrc
Security stringGroup Mapping Id - ID of the resource.
- Life
State string - Life state of the security group mapping; NORMAL: normal.
- Security
Group stringMapping Id - Security group mapping ID.
- Site
Pair stringId - Security group mapping belongs to the site pair ID.
- Source
Security stringGroup Id - Production end security group ID.
- Src
Security stringGroup Id - Production end instance bound to the security group ID.
- Target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc_
security_ stringgroup_ mapping_ id - ID of the resource.
- life_
state string - Life state of the security group mapping; NORMAL: normal.
- security_
group_ stringmapping_ id - Security group mapping ID.
- site_
pair_ stringid - Security group mapping belongs to the site pair ID.
- source_
security_ stringgroup_ id - Production end security group ID.
- src_
security_ stringgroup_ id - Production end instance bound to the security group ID.
- target_
security_ stringgroup_ id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security StringGroup Mapping Id - ID of the resource.
- life
State String - Life state of the security group mapping; NORMAL: normal.
- security
Group StringMapping Id - Security group mapping ID.
- site
Pair StringId - Security group mapping belongs to the site pair ID.
- source
Security StringGroup Id - Production end security group ID.
- src
Security StringGroup Id - Production end instance bound to the security group ID.
- target
Security StringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security stringGroup Mapping Id - ID of the resource.
- life
State string - Life state of the security group mapping; NORMAL: normal.
- security
Group stringMapping Id - Security group mapping ID.
- site
Pair stringId - Security group mapping belongs to the site pair ID.
- source
Security stringGroup Id - Production end security group ID.
- src
Security stringGroup Id - Production end instance bound to the security group ID.
- target
Security stringGroup Id - Disaster recovery end instance bound to the security group ID.
- bdrc_
security_ strgroup_ mapping_ id - ID of the resource.
- life_
state str - Life state of the security group mapping; NORMAL: normal.
- security_
group_ strmapping_ id - Security group mapping ID.
- site_
pair_ strid - Security group mapping belongs to the site pair ID.
- source_
security_ strgroup_ id - Production end security group ID.
- src_
security_ strgroup_ id - Production end instance bound to the security group ID.
- target_
security_ strgroup_ id - Disaster recovery end instance bound to the security group ID.
- bdrc
Security StringGroup Mapping Id - ID of the resource.
- life
State String - Life state of the security group mapping; NORMAL: normal.
- security
Group StringMapping Id - Security group mapping ID.
- site
Pair StringId - Security group mapping belongs to the site pair ID.
- source
Security StringGroup Id - Production end security group ID.
- src
Security StringGroup Id - Production end instance bound to the security group ID.
- target
Security StringGroup Id - Disaster recovery end instance bound to the security group ID.
Import
BDRC security group mapping can be imported using the sitePairId#securityGroupMappingId, e.g.
$ pulumi import tencentcloud:index/bdrcSecurityGroupMapping:BdrcSecurityGroupMapping example sitepair-1sxvs5oj#sgmap-b7teooa7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Monday, Sep 21, 2026 by tencentcloudstack