tencentcloud.TcrManageReplicationOperation
Explore with Pulumi AI
Provides a resource to start a tcr instance replication operation
Example Usage
Sync source tcr instance to target instance
Synchronize an existing tcr instance to the destination instance. This operation is often used in the cross-multiple region scenario. Assume you have had two TCR instances before this operation. This example shows how to sync a tcr instance from ap-guangzhou(gz) to ap-shanghai(sh).
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
// tcr instance on ap-guangzhou
const exampleGzTcrInstance = new tencentcloud.TcrInstance("exampleGzTcrInstance", {
instanceType: "premium",
tags: {
createdBy: "terraform",
},
});
const exampleGzTcrNamespace = new tencentcloud.TcrNamespace("exampleGzTcrNamespace", {
instanceId: exampleGzTcrInstance.tcrInstanceId,
isPublic: true,
isAutoScan: true,
isPreventVul: true,
severity: "medium",
cveWhitelistItems: [{
cveId: "cve-xxxxx",
}],
});
// tcr instance on ap-shanghai
const exampleShTcrInstance = new tencentcloud.TcrInstance("exampleShTcrInstance", {
instanceType: "premium",
deleteBucket: true,
});
const exampleShTcrNamespace = new tencentcloud.TcrNamespace("exampleShTcrNamespace", {
instanceId: exampleShTcrInstance.tcrInstanceId,
isPublic: true,
isAutoScan: true,
isPreventVul: true,
severity: "medium",
cveWhitelistItems: [{
cveId: "cve-xxxxx",
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
# tcr instance on ap-guangzhou
example_gz_tcr_instance = tencentcloud.TcrInstance("exampleGzTcrInstance",
instance_type="premium",
tags={
"createdBy": "terraform",
})
example_gz_tcr_namespace = tencentcloud.TcrNamespace("exampleGzTcrNamespace",
instance_id=example_gz_tcr_instance.tcr_instance_id,
is_public=True,
is_auto_scan=True,
is_prevent_vul=True,
severity="medium",
cve_whitelist_items=[{
"cve_id": "cve-xxxxx",
}])
# tcr instance on ap-shanghai
example_sh_tcr_instance = tencentcloud.TcrInstance("exampleShTcrInstance",
instance_type="premium",
delete_bucket=True)
example_sh_tcr_namespace = tencentcloud.TcrNamespace("exampleShTcrNamespace",
instance_id=example_sh_tcr_instance.tcr_instance_id,
is_public=True,
is_auto_scan=True,
is_prevent_vul=True,
severity="medium",
cve_whitelist_items=[{
"cve_id": "cve-xxxxx",
}])
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 {
// tcr instance on ap-guangzhou
exampleGzTcrInstance, err := tencentcloud.NewTcrInstance(ctx, "exampleGzTcrInstance", &tencentcloud.TcrInstanceArgs{
InstanceType: pulumi.String("premium"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTcrNamespace(ctx, "exampleGzTcrNamespace", &tencentcloud.TcrNamespaceArgs{
InstanceId: exampleGzTcrInstance.TcrInstanceId,
IsPublic: pulumi.Bool(true),
IsAutoScan: pulumi.Bool(true),
IsPreventVul: pulumi.Bool(true),
Severity: pulumi.String("medium"),
CveWhitelistItems: tencentcloud.TcrNamespaceCveWhitelistItemArray{
&tencentcloud.TcrNamespaceCveWhitelistItemArgs{
CveId: pulumi.String("cve-xxxxx"),
},
},
})
if err != nil {
return err
}
// tcr instance on ap-shanghai
exampleShTcrInstance, err := tencentcloud.NewTcrInstance(ctx, "exampleShTcrInstance", &tencentcloud.TcrInstanceArgs{
InstanceType: pulumi.String("premium"),
DeleteBucket: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = tencentcloud.NewTcrNamespace(ctx, "exampleShTcrNamespace", &tencentcloud.TcrNamespaceArgs{
InstanceId: exampleShTcrInstance.TcrInstanceId,
IsPublic: pulumi.Bool(true),
IsAutoScan: pulumi.Bool(true),
IsPreventVul: pulumi.Bool(true),
Severity: pulumi.String("medium"),
CveWhitelistItems: tencentcloud.TcrNamespaceCveWhitelistItemArray{
&tencentcloud.TcrNamespaceCveWhitelistItemArgs{
CveId: pulumi.String("cve-xxxxx"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
// tcr instance on ap-guangzhou
var exampleGzTcrInstance = new Tencentcloud.TcrInstance("exampleGzTcrInstance", new()
{
InstanceType = "premium",
Tags =
{
{ "createdBy", "terraform" },
},
});
var exampleGzTcrNamespace = new Tencentcloud.TcrNamespace("exampleGzTcrNamespace", new()
{
InstanceId = exampleGzTcrInstance.TcrInstanceId,
IsPublic = true,
IsAutoScan = true,
IsPreventVul = true,
Severity = "medium",
CveWhitelistItems = new[]
{
new Tencentcloud.Inputs.TcrNamespaceCveWhitelistItemArgs
{
CveId = "cve-xxxxx",
},
},
});
// tcr instance on ap-shanghai
var exampleShTcrInstance = new Tencentcloud.TcrInstance("exampleShTcrInstance", new()
{
InstanceType = "premium",
DeleteBucket = true,
});
var exampleShTcrNamespace = new Tencentcloud.TcrNamespace("exampleShTcrNamespace", new()
{
InstanceId = exampleShTcrInstance.TcrInstanceId,
IsPublic = true,
IsAutoScan = true,
IsPreventVul = true,
Severity = "medium",
CveWhitelistItems = new[]
{
new Tencentcloud.Inputs.TcrNamespaceCveWhitelistItemArgs
{
CveId = "cve-xxxxx",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TcrInstance;
import com.pulumi.tencentcloud.TcrInstanceArgs;
import com.pulumi.tencentcloud.TcrNamespace;
import com.pulumi.tencentcloud.TcrNamespaceArgs;
import com.pulumi.tencentcloud.inputs.TcrNamespaceCveWhitelistItemArgs;
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) {
// tcr instance on ap-guangzhou
var exampleGzTcrInstance = new TcrInstance("exampleGzTcrInstance", TcrInstanceArgs.builder()
.instanceType("premium")
.tags(Map.of("createdBy", "terraform"))
.build());
var exampleGzTcrNamespace = new TcrNamespace("exampleGzTcrNamespace", TcrNamespaceArgs.builder()
.instanceId(exampleGzTcrInstance.tcrInstanceId())
.isPublic(true)
.isAutoScan(true)
.isPreventVul(true)
.severity("medium")
.cveWhitelistItems(TcrNamespaceCveWhitelistItemArgs.builder()
.cveId("cve-xxxxx")
.build())
.build());
// tcr instance on ap-shanghai
var exampleShTcrInstance = new TcrInstance("exampleShTcrInstance", TcrInstanceArgs.builder()
.instanceType("premium")
.deleteBucket(true)
.build());
var exampleShTcrNamespace = new TcrNamespace("exampleShTcrNamespace", TcrNamespaceArgs.builder()
.instanceId(exampleShTcrInstance.tcrInstanceId())
.isPublic(true)
.isAutoScan(true)
.isPreventVul(true)
.severity("medium")
.cveWhitelistItems(TcrNamespaceCveWhitelistItemArgs.builder()
.cveId("cve-xxxxx")
.build())
.build());
}
}
resources:
# tcr instance on ap-guangzhou
exampleGzTcrInstance:
type: tencentcloud:TcrInstance
properties:
instanceType: premium
tags:
createdBy: terraform
exampleGzTcrNamespace:
type: tencentcloud:TcrNamespace
properties:
instanceId: ${exampleGzTcrInstance.tcrInstanceId}
isPublic: true
isAutoScan: true
isPreventVul: true
severity: medium
cveWhitelistItems:
- cveId: cve-xxxxx
# tcr instance on ap-shanghai
exampleShTcrInstance:
type: tencentcloud:TcrInstance
properties:
instanceType: premium
deleteBucket: true
exampleShTcrNamespace:
type: tencentcloud:TcrNamespace
properties:
instanceId: ${exampleShTcrInstance.tcrInstanceId}
isPublic: true
isAutoScan: true
isPreventVul: true
severity: medium
cveWhitelistItems:
- cveId: cve-xxxxx
Create TcrManageReplicationOperation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcrManageReplicationOperation(name: string, args: TcrManageReplicationOperationArgs, opts?: CustomResourceOptions);
@overload
def TcrManageReplicationOperation(resource_name: str,
args: TcrManageReplicationOperationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcrManageReplicationOperation(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_registry_id: Optional[str] = None,
rule: Optional[TcrManageReplicationOperationRuleArgs] = None,
source_registry_id: Optional[str] = None,
description: Optional[str] = None,
destination_region_id: Optional[float] = None,
peer_replication_option: Optional[TcrManageReplicationOperationPeerReplicationOptionArgs] = None,
tcr_manage_replication_operation_id: Optional[str] = None)
func NewTcrManageReplicationOperation(ctx *Context, name string, args TcrManageReplicationOperationArgs, opts ...ResourceOption) (*TcrManageReplicationOperation, error)
public TcrManageReplicationOperation(string name, TcrManageReplicationOperationArgs args, CustomResourceOptions? opts = null)
public TcrManageReplicationOperation(String name, TcrManageReplicationOperationArgs args)
public TcrManageReplicationOperation(String name, TcrManageReplicationOperationArgs args, CustomResourceOptions options)
type: tencentcloud:TcrManageReplicationOperation
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 TcrManageReplicationOperationArgs
- 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 TcrManageReplicationOperationArgs
- 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 TcrManageReplicationOperationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcrManageReplicationOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcrManageReplicationOperationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcrManageReplicationOperation 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 TcrManageReplicationOperation resource accepts the following input properties:
- Destination
Registry stringId - copy destination instance Id.
- Rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- Source
Registry stringId - copy source instance Id.
- Description string
- rule description.
- Destination
Region doubleId - the region ID of the target instance, such as Guangzhou is 1.
- Peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- Tcr
Manage stringReplication Operation Id - ID of the resource.
- Destination
Registry stringId - copy destination instance Id.
- Rule
Tcr
Manage Replication Operation Rule Args - synchronization rules.
- Source
Registry stringId - copy source instance Id.
- Description string
- rule description.
- Destination
Region float64Id - the region ID of the target instance, such as Guangzhou is 1.
- Peer
Replication TcrOption Manage Replication Operation Peer Replication Option Args - enable synchronization of configuration items across master account instances.
- Tcr
Manage stringReplication Operation Id - ID of the resource.
- destination
Registry StringId - copy destination instance Id.
- rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- source
Registry StringId - copy source instance Id.
- description String
- rule description.
- destination
Region DoubleId - the region ID of the target instance, such as Guangzhou is 1.
- peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- tcr
Manage StringReplication Operation Id - ID of the resource.
- destination
Registry stringId - copy destination instance Id.
- rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- source
Registry stringId - copy source instance Id.
- description string
- rule description.
- destination
Region numberId - the region ID of the target instance, such as Guangzhou is 1.
- peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- tcr
Manage stringReplication Operation Id - ID of the resource.
- destination_
registry_ strid - copy destination instance Id.
- rule
Tcr
Manage Replication Operation Rule Args - synchronization rules.
- source_
registry_ strid - copy source instance Id.
- description str
- rule description.
- destination_
region_ floatid - the region ID of the target instance, such as Guangzhou is 1.
- peer_
replication_ Tcroption Manage Replication Operation Peer Replication Option Args - enable synchronization of configuration items across master account instances.
- tcr_
manage_ strreplication_ operation_ id - ID of the resource.
- destination
Registry StringId - copy destination instance Id.
- rule Property Map
- synchronization rules.
- source
Registry StringId - copy source instance Id.
- description String
- rule description.
- destination
Region NumberId - the region ID of the target instance, such as Guangzhou is 1.
- peer
Replication Property MapOption - enable synchronization of configuration items across master account instances.
- tcr
Manage StringReplication Operation Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcrManageReplicationOperation 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 TcrManageReplicationOperation Resource
Get an existing TcrManageReplicationOperation 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?: TcrManageReplicationOperationState, opts?: CustomResourceOptions): TcrManageReplicationOperation
@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[TcrManageReplicationOperationPeerReplicationOptionArgs] = None,
rule: Optional[TcrManageReplicationOperationRuleArgs] = None,
source_registry_id: Optional[str] = None,
tcr_manage_replication_operation_id: Optional[str] = None) -> TcrManageReplicationOperation
func GetTcrManageReplicationOperation(ctx *Context, name string, id IDInput, state *TcrManageReplicationOperationState, opts ...ResourceOption) (*TcrManageReplicationOperation, error)
public static TcrManageReplicationOperation Get(string name, Input<string> id, TcrManageReplicationOperationState? state, CustomResourceOptions? opts = null)
public static TcrManageReplicationOperation get(String name, Output<String> id, TcrManageReplicationOperationState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcrManageReplicationOperation 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.
- Description string
- rule description.
- Destination
Region doubleId - the region ID of the target instance, such as Guangzhou is 1.
- Destination
Registry stringId - copy destination instance Id.
- Peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- Rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- Source
Registry stringId - copy source instance Id.
- Tcr
Manage stringReplication Operation Id - ID of the resource.
- Description string
- rule description.
- Destination
Region float64Id - the region ID of the target instance, such as Guangzhou is 1.
- Destination
Registry stringId - copy destination instance Id.
- Peer
Replication TcrOption Manage Replication Operation Peer Replication Option Args - enable synchronization of configuration items across master account instances.
- Rule
Tcr
Manage Replication Operation Rule Args - synchronization rules.
- Source
Registry stringId - copy source instance Id.
- Tcr
Manage stringReplication Operation Id - ID of the resource.
- description String
- rule description.
- destination
Region DoubleId - the region ID of the target instance, such as Guangzhou is 1.
- destination
Registry StringId - copy destination instance Id.
- peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- source
Registry StringId - copy source instance Id.
- tcr
Manage StringReplication Operation Id - ID of the resource.
- description string
- rule description.
- destination
Region numberId - the region ID of the target instance, such as Guangzhou is 1.
- destination
Registry stringId - copy destination instance Id.
- peer
Replication TcrOption Manage Replication Operation Peer Replication Option - enable synchronization of configuration items across master account instances.
- rule
Tcr
Manage Replication Operation Rule - synchronization rules.
- source
Registry stringId - copy source instance Id.
- tcr
Manage stringReplication Operation Id - ID of the resource.
- description str
- rule description.
- destination_
region_ floatid - the region ID of the target instance, such as Guangzhou is 1.
- destination_
registry_ strid - copy destination instance Id.
- peer_
replication_ Tcroption Manage Replication Operation Peer Replication Option Args - enable synchronization of configuration items across master account instances.
- rule
Tcr
Manage Replication Operation Rule Args - synchronization rules.
- source_
registry_ strid - copy source instance Id.
- tcr_
manage_ strreplication_ operation_ id - ID of the resource.
- description String
- rule description.
- destination
Region NumberId - the region ID of the target instance, such as Guangzhou is 1.
- destination
Registry StringId - copy destination instance Id.
- peer
Replication Property MapOption - enable synchronization of configuration items across master account instances.
- rule Property Map
- synchronization rules.
- source
Registry StringId - copy source instance Id.
- tcr
Manage StringReplication Operation Id - ID of the resource.
Supporting Types
TcrManageReplicationOperationPeerReplicationOption, TcrManageReplicationOperationPeerReplicationOptionArgs
- Enable
Peer boolReplication - whether to enable cross-master account instance synchronization.
- Peer
Registry stringToken - access permanent token of the instance to be synchronized.
- Peer
Registry stringUin - uin of the instance to be synchronized.
- Enable
Peer boolReplication - whether to enable cross-master account instance synchronization.
- Peer
Registry stringToken - access permanent token of the instance to be synchronized.
- Peer
Registry stringUin - uin of the instance to be synchronized.
- enable
Peer BooleanReplication - whether to enable cross-master account instance synchronization.
- peer
Registry StringToken - access permanent token of the instance to be synchronized.
- peer
Registry StringUin - uin of the instance to be synchronized.
- enable
Peer booleanReplication - whether to enable cross-master account instance synchronization.
- peer
Registry stringToken - access permanent token of the instance to be synchronized.
- peer
Registry stringUin - uin of the instance to be synchronized.
- enable_
peer_ boolreplication - whether to enable cross-master account instance synchronization.
- peer_
registry_ strtoken - access permanent token of the instance to be synchronized.
- peer_
registry_ struin - uin of the instance to be synchronized.
- enable
Peer BooleanReplication - whether to enable cross-master account instance synchronization.
- peer
Registry StringToken - access permanent token of the instance to be synchronized.
- peer
Registry StringUin - uin of the instance to be synchronized.
TcrManageReplicationOperationRule, TcrManageReplicationOperationRuleArgs
- Dest
Namespace string - target namespace.
- Filters
List<Tcr
Manage Replication Operation Rule Filter> - sync filters.
- Name string
- synchronization rule names.
- Override bool
- whether to cover.
- Dest
Namespace string - target namespace.
- Filters
[]Tcr
Manage Replication Operation Rule Filter - sync filters.
- Name string
- synchronization rule names.
- Override bool
- whether to cover.
- dest
Namespace String - target namespace.
- filters
List<Tcr
Manage Replication Operation Rule Filter> - sync filters.
- name String
- synchronization rule names.
- override Boolean
- whether to cover.
- dest
Namespace string - target namespace.
- filters
Tcr
Manage Replication Operation Rule Filter[] - sync filters.
- name string
- synchronization rule names.
- override boolean
- whether to cover.
- dest_
namespace str - target namespace.
- filters
Sequence[Tcr
Manage Replication Operation Rule Filter] - sync filters.
- name str
- synchronization rule names.
- override bool
- whether to cover.
- dest
Namespace String - target namespace.
- filters List<Property Map>
- sync filters.
- name String
- synchronization rule names.
- override Boolean
- whether to cover.
TcrManageReplicationOperationRuleFilter, TcrManageReplicationOperationRuleFilterArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.