1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TcrReplication
tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack
tencentcloud logo
tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack

    Provides a resource to create a TCR replication

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.TcrReplication("example", {
        sourceRegistryId: "tcr-9q9h1nof",
        destinationRegistryId: "tcr-jtih9ngc",
        rule: {
            name: "tf-example",
            destNamespace: "",
            override: true,
            deletion: true,
            filters: [{
                type: "name",
                value: "tf-example/**",
            }],
        },
        destinationRegionId: 1,
        description: "remark.",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.TcrReplication("example",
        source_registry_id="tcr-9q9h1nof",
        destination_registry_id="tcr-jtih9ngc",
        rule={
            "name": "tf-example",
            "dest_namespace": "",
            "override": True,
            "deletion": True,
            "filters": [{
                "type": "name",
                "value": "tf-example/**",
            }],
        },
        destination_region_id=1,
        description="remark.")
    
    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 {
    		_, err := tencentcloud.NewTcrReplication(ctx, "example", &tencentcloud.TcrReplicationArgs{
    			SourceRegistryId:      pulumi.String("tcr-9q9h1nof"),
    			DestinationRegistryId: pulumi.String("tcr-jtih9ngc"),
    			Rule: &tencentcloud.TcrReplicationRuleArgs{
    				Name:          pulumi.String("tf-example"),
    				DestNamespace: pulumi.String(""),
    				Override:      pulumi.Bool(true),
    				Deletion:      pulumi.Bool(true),
    				Filters: tencentcloud.TcrReplicationRuleFilterArray{
    					&tencentcloud.TcrReplicationRuleFilterArgs{
    						Type:  pulumi.String("name"),
    						Value: pulumi.String("tf-example/**"),
    					},
    				},
    			},
    			DestinationRegionId: pulumi.Float64(1),
    			Description:         pulumi.String("remark."),
    		})
    		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.TcrReplication("example", new()
        {
            SourceRegistryId = "tcr-9q9h1nof",
            DestinationRegistryId = "tcr-jtih9ngc",
            Rule = new Tencentcloud.Inputs.TcrReplicationRuleArgs
            {
                Name = "tf-example",
                DestNamespace = "",
                Override = true,
                Deletion = true,
                Filters = new[]
                {
                    new Tencentcloud.Inputs.TcrReplicationRuleFilterArgs
                    {
                        Type = "name",
                        Value = "tf-example/**",
                    },
                },
            },
            DestinationRegionId = 1,
            Description = "remark.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TcrReplication;
    import com.pulumi.tencentcloud.TcrReplicationArgs;
    import com.pulumi.tencentcloud.inputs.TcrReplicationRuleArgs;
    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 TcrReplication("example", TcrReplicationArgs.builder()
                .sourceRegistryId("tcr-9q9h1nof")
                .destinationRegistryId("tcr-jtih9ngc")
                .rule(TcrReplicationRuleArgs.builder()
                    .name("tf-example")
                    .destNamespace("")
                    .override(true)
                    .deletion(true)
                    .filters(TcrReplicationRuleFilterArgs.builder()
                        .type("name")
                        .value("tf-example/**")
                        .build())
                    .build())
                .destinationRegionId(1.0)
                .description("remark.")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:TcrReplication
        properties:
          sourceRegistryId: tcr-9q9h1nof
          destinationRegistryId: tcr-jtih9ngc
          rule:
            name: tf-example
            destNamespace: ""
            override: true
            deletion: true
            filters:
              - type: name
                value: tf-example/**
          destinationRegionId: 1
          description: remark.
    

    Create TcrReplication Resource

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

    Constructor syntax

    new TcrReplication(name: string, args: TcrReplicationArgs, opts?: CustomResourceOptions);
    @overload
    def TcrReplication(resource_name: str,
                       args: TcrReplicationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def TcrReplication(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       destination_registry_id: Optional[str] = None,
                       rule: Optional[TcrReplicationRuleArgs] = None,
                       source_registry_id: Optional[str] = None,
                       description: Optional[str] = None,
                       destination_region_id: Optional[float] = None,
                       peer_replication_option: Optional[TcrReplicationPeerReplicationOptionArgs] = None,
                       tcr_replication_id: Optional[str] = None)
    func NewTcrReplication(ctx *Context, name string, args TcrReplicationArgs, opts ...ResourceOption) (*TcrReplication, error)
    public TcrReplication(string name, TcrReplicationArgs args, CustomResourceOptions? opts = null)
    public TcrReplication(String name, TcrReplicationArgs args)
    public TcrReplication(String name, TcrReplicationArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TcrReplication
    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 TcrReplicationArgs
    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 TcrReplicationArgs
    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 TcrReplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TcrReplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TcrReplicationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TcrReplication 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 TcrReplication resource accepts the following input properties:

    DestinationRegistryId string
    Destination instance ID.
    Rule TcrReplicationRule
    Synchronization rule.
    SourceRegistryId string
    Source instance ID.
    Description string
    Rule description.
    DestinationRegionId double
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    PeerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    TcrReplicationId string
    ID of the resource.
    DestinationRegistryId string
    Destination instance ID.
    Rule TcrReplicationRuleArgs
    Synchronization rule.
    SourceRegistryId string
    Source instance ID.
    Description string
    Rule description.
    DestinationRegionId float64
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    PeerReplicationOption TcrReplicationPeerReplicationOptionArgs
    Configuration of the synchronization rule.
    TcrReplicationId string
    ID of the resource.
    destinationRegistryId String
    Destination instance ID.
    rule TcrReplicationRule
    Synchronization rule.
    sourceRegistryId String
    Source instance ID.
    description String
    Rule description.
    destinationRegionId Double
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    peerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    tcrReplicationId String
    ID of the resource.
    destinationRegistryId string
    Destination instance ID.
    rule TcrReplicationRule
    Synchronization rule.
    sourceRegistryId string
    Source instance ID.
    description string
    Rule description.
    destinationRegionId number
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    peerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    tcrReplicationId string
    ID of the resource.
    destination_registry_id str
    Destination instance ID.
    rule TcrReplicationRuleArgs
    Synchronization rule.
    source_registry_id str
    Source instance ID.
    description str
    Rule description.
    destination_region_id float
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    peer_replication_option TcrReplicationPeerReplicationOptionArgs
    Configuration of the synchronization rule.
    tcr_replication_id str
    ID of the resource.
    destinationRegistryId String
    Destination instance ID.
    rule Property Map
    Synchronization rule.
    sourceRegistryId String
    Source instance ID.
    description String
    Rule description.
    destinationRegionId Number
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    peerReplicationOption Property Map
    Configuration of the synchronization rule.
    tcrReplicationId String
    ID of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TcrReplication Resource

    Get an existing TcrReplication 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?: TcrReplicationState, opts?: CustomResourceOptions): TcrReplication
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            destination_region_id: Optional[float] = None,
            destination_registry_id: Optional[str] = None,
            peer_replication_option: Optional[TcrReplicationPeerReplicationOptionArgs] = None,
            rule: Optional[TcrReplicationRuleArgs] = None,
            source_registry_id: Optional[str] = None,
            tcr_replication_id: Optional[str] = None) -> TcrReplication
    func GetTcrReplication(ctx *Context, name string, id IDInput, state *TcrReplicationState, opts ...ResourceOption) (*TcrReplication, error)
    public static TcrReplication Get(string name, Input<string> id, TcrReplicationState? state, CustomResourceOptions? opts = null)
    public static TcrReplication get(String name, Output<String> id, TcrReplicationState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TcrReplication    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:
    Description string
    Rule description.
    DestinationRegionId double
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    DestinationRegistryId string
    Destination instance ID.
    PeerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    Rule TcrReplicationRule
    Synchronization rule.
    SourceRegistryId string
    Source instance ID.
    TcrReplicationId string
    ID of the resource.
    Description string
    Rule description.
    DestinationRegionId float64
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    DestinationRegistryId string
    Destination instance ID.
    PeerReplicationOption TcrReplicationPeerReplicationOptionArgs
    Configuration of the synchronization rule.
    Rule TcrReplicationRuleArgs
    Synchronization rule.
    SourceRegistryId string
    Source instance ID.
    TcrReplicationId string
    ID of the resource.
    description String
    Rule description.
    destinationRegionId Double
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    destinationRegistryId String
    Destination instance ID.
    peerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    rule TcrReplicationRule
    Synchronization rule.
    sourceRegistryId String
    Source instance ID.
    tcrReplicationId String
    ID of the resource.
    description string
    Rule description.
    destinationRegionId number
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    destinationRegistryId string
    Destination instance ID.
    peerReplicationOption TcrReplicationPeerReplicationOption
    Configuration of the synchronization rule.
    rule TcrReplicationRule
    Synchronization rule.
    sourceRegistryId string
    Source instance ID.
    tcrReplicationId string
    ID of the resource.
    description str
    Rule description.
    destination_region_id float
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    destination_registry_id str
    Destination instance ID.
    peer_replication_option TcrReplicationPeerReplicationOptionArgs
    Configuration of the synchronization rule.
    rule TcrReplicationRuleArgs
    Synchronization rule.
    source_registry_id str
    Source instance ID.
    tcr_replication_id str
    ID of the resource.
    description String
    Rule description.
    destinationRegionId Number
    Region ID of the destination instance. For example, 1 represents Guangzhou.
    destinationRegistryId String
    Destination instance ID.
    peerReplicationOption Property Map
    Configuration of the synchronization rule.
    rule Property Map
    Synchronization rule.
    sourceRegistryId String
    Source instance ID.
    tcrReplicationId String
    ID of the resource.

    Supporting Types

    TcrReplicationPeerReplicationOption, TcrReplicationPeerReplicationOptionArgs

    EnablePeerReplication bool
    Whether to enable cross-account synchronization.
    PeerRegistryToken string
    Permanent access Token for the destination instance.
    PeerRegistryUin string
    UIN of the destination instance.
    EnablePeerReplication bool
    Whether to enable cross-account synchronization.
    PeerRegistryToken string
    Permanent access Token for the destination instance.
    PeerRegistryUin string
    UIN of the destination instance.
    enablePeerReplication Boolean
    Whether to enable cross-account synchronization.
    peerRegistryToken String
    Permanent access Token for the destination instance.
    peerRegistryUin String
    UIN of the destination instance.
    enablePeerReplication boolean
    Whether to enable cross-account synchronization.
    peerRegistryToken string
    Permanent access Token for the destination instance.
    peerRegistryUin string
    UIN of the destination instance.
    enable_peer_replication bool
    Whether to enable cross-account synchronization.
    peer_registry_token str
    Permanent access Token for the destination instance.
    peer_registry_uin str
    UIN of the destination instance.
    enablePeerReplication Boolean
    Whether to enable cross-account synchronization.
    peerRegistryToken String
    Permanent access Token for the destination instance.
    peerRegistryUin String
    UIN of the destination instance.

    TcrReplicationRule, TcrReplicationRuleArgs

    DestNamespace string
    Destination namespace.
    Filters List<TcrReplicationRuleFilter>
    Synchronization filters.
    Name string
    Name of synchronization rule.
    Override bool
    Whether to override.
    Deletion bool
    Whether synchronous deletion event.
    DestNamespace string
    Destination namespace.
    Filters []TcrReplicationRuleFilter
    Synchronization filters.
    Name string
    Name of synchronization rule.
    Override bool
    Whether to override.
    Deletion bool
    Whether synchronous deletion event.
    destNamespace String
    Destination namespace.
    filters List<TcrReplicationRuleFilter>
    Synchronization filters.
    name String
    Name of synchronization rule.
    override Boolean
    Whether to override.
    deletion Boolean
    Whether synchronous deletion event.
    destNamespace string
    Destination namespace.
    filters TcrReplicationRuleFilter[]
    Synchronization filters.
    name string
    Name of synchronization rule.
    override boolean
    Whether to override.
    deletion boolean
    Whether synchronous deletion event.
    dest_namespace str
    Destination namespace.
    filters Sequence[TcrReplicationRuleFilter]
    Synchronization filters.
    name str
    Name of synchronization rule.
    override bool
    Whether to override.
    deletion bool
    Whether synchronous deletion event.
    destNamespace String
    Destination namespace.
    filters List<Property Map>
    Synchronization filters.
    name String
    Name of synchronization rule.
    override Boolean
    Whether to override.
    deletion Boolean
    Whether synchronous deletion event.

    TcrReplicationRuleFilter, TcrReplicationRuleFilterArgs

    Type string
    Type (name, tag and resource).
    Value string
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.
    Type string
    Type (name, tag and resource).
    Value string
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.
    type String
    Type (name, tag and resource).
    value String
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.
    type string
    Type (name, tag and resource).
    value string
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.
    type str
    Type (name, tag and resource).
    value str
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.
    type String
    Type (name, tag and resource).
    value String
    It is left blank by default. If the type is resource it supports image, chart, and an empty string.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.82.50 published on Tuesday, Dec 30, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate