1. Registry
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. BdrcSecurityGroupMapping
Viewing docs for tencentcloud 1.83.33
published on Monday, Sep 21, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.33
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:

    SitePairId string
    Security group mapping belongs to the site pair ID.
    SrcSecurityGroupId string
    Production end instance bound to the security group ID.
    TargetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    BdrcSecurityGroupMappingId string
    ID of the resource.
    SitePairId string
    Security group mapping belongs to the site pair ID.
    SrcSecurityGroupId string
    Production end instance bound to the security group ID.
    TargetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    BdrcSecurityGroupMappingId string
    ID of the resource.
    site_pair_id string
    Security group mapping belongs to the site pair ID.
    src_security_group_id string
    Production end instance bound to the security group ID.
    target_security_group_id string
    Disaster recovery end instance bound to the security group ID.
    bdrc_security_group_mapping_id string
    ID of the resource.
    sitePairId String
    Security group mapping belongs to the site pair ID.
    srcSecurityGroupId String
    Production end instance bound to the security group ID.
    targetSecurityGroupId String
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId String
    ID of the resource.
    sitePairId string
    Security group mapping belongs to the site pair ID.
    srcSecurityGroupId string
    Production end instance bound to the security group ID.
    targetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId string
    ID of the resource.
    site_pair_id str
    Security group mapping belongs to the site pair ID.
    src_security_group_id str
    Production end instance bound to the security group ID.
    target_security_group_id str
    Disaster recovery end instance bound to the security group ID.
    bdrc_security_group_mapping_id str
    ID of the resource.
    sitePairId String
    Security group mapping belongs to the site pair ID.
    srcSecurityGroupId String
    Production end instance bound to the security group ID.
    targetSecurityGroupId String
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId String
    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.
    LifeState string
    Life state of the security group mapping; NORMAL: normal.
    SecurityGroupMappingId string
    Security group mapping ID.
    SourceSecurityGroupId string
    Production end security group ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifeState string
    Life state of the security group mapping; NORMAL: normal.
    SecurityGroupMappingId string
    Security group mapping ID.
    SourceSecurityGroupId string
    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_mapping_id string
    Security group mapping ID.
    source_security_group_id string
    Production end security group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    lifeState String
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId String
    Security group mapping ID.
    sourceSecurityGroupId String
    Production end security group ID.
    id string
    The provider-assigned unique ID for this managed resource.
    lifeState string
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId string
    Security group mapping ID.
    sourceSecurityGroupId string
    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_mapping_id str
    Security group mapping ID.
    source_security_group_id str
    Production end security group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    lifeState String
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId String
    Security group mapping ID.
    sourceSecurityGroupId String
    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) -> BdrcSecurityGroupMapping
    func 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.
    The following state arguments are supported:
    BdrcSecurityGroupMappingId string
    ID of the resource.
    LifeState string
    Life state of the security group mapping; NORMAL: normal.
    SecurityGroupMappingId string
    Security group mapping ID.
    SitePairId string
    Security group mapping belongs to the site pair ID.
    SourceSecurityGroupId string
    Production end security group ID.
    SrcSecurityGroupId string
    Production end instance bound to the security group ID.
    TargetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    BdrcSecurityGroupMappingId string
    ID of the resource.
    LifeState string
    Life state of the security group mapping; NORMAL: normal.
    SecurityGroupMappingId string
    Security group mapping ID.
    SitePairId string
    Security group mapping belongs to the site pair ID.
    SourceSecurityGroupId string
    Production end security group ID.
    SrcSecurityGroupId string
    Production end instance bound to the security group ID.
    TargetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    bdrc_security_group_mapping_id string
    ID of the resource.
    life_state string
    Life state of the security group mapping; NORMAL: normal.
    security_group_mapping_id string
    Security group mapping ID.
    site_pair_id string
    Security group mapping belongs to the site pair ID.
    source_security_group_id string
    Production end security group ID.
    src_security_group_id string
    Production end instance bound to the security group ID.
    target_security_group_id string
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId String
    ID of the resource.
    lifeState String
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId String
    Security group mapping ID.
    sitePairId String
    Security group mapping belongs to the site pair ID.
    sourceSecurityGroupId String
    Production end security group ID.
    srcSecurityGroupId String
    Production end instance bound to the security group ID.
    targetSecurityGroupId String
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId string
    ID of the resource.
    lifeState string
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId string
    Security group mapping ID.
    sitePairId string
    Security group mapping belongs to the site pair ID.
    sourceSecurityGroupId string
    Production end security group ID.
    srcSecurityGroupId string
    Production end instance bound to the security group ID.
    targetSecurityGroupId string
    Disaster recovery end instance bound to the security group ID.
    bdrc_security_group_mapping_id str
    ID of the resource.
    life_state str
    Life state of the security group mapping; NORMAL: normal.
    security_group_mapping_id str
    Security group mapping ID.
    site_pair_id str
    Security group mapping belongs to the site pair ID.
    source_security_group_id str
    Production end security group ID.
    src_security_group_id str
    Production end instance bound to the security group ID.
    target_security_group_id str
    Disaster recovery end instance bound to the security group ID.
    bdrcSecurityGroupMappingId String
    ID of the resource.
    lifeState String
    Life state of the security group mapping; NORMAL: normal.
    securityGroupMappingId String
    Security group mapping ID.
    sitePairId String
    Security group mapping belongs to the site pair ID.
    sourceSecurityGroupId String
    Production end security group ID.
    srcSecurityGroupId String
    Production end instance bound to the security group ID.
    targetSecurityGroupId String
    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 tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.83.33
    published on Monday, Sep 21, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial