1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MonitorExternalCluster
Viewing docs for tencentcloud 1.82.79
published on Friday, Mar 27, 2026 by tencentcloudstack
tencentcloud logo
Viewing docs for tencentcloud 1.82.79
published on Friday, Mar 27, 2026 by tencentcloudstack

    Provides a resource to create a Monitor external cluster

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.MonitorExternalCluster("example", {
        instanceId: "prom-gzg3f1em",
        clusterRegion: "ap-guangzhou",
        clusterName: "tf-external-cluster",
        externalLabels: [
            {
                name: "clusterName",
                value: "example",
            },
            {
                name: "environment",
                value: "prod",
            },
        ],
        enableExternal: false,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.MonitorExternalCluster("example",
        instance_id="prom-gzg3f1em",
        cluster_region="ap-guangzhou",
        cluster_name="tf-external-cluster",
        external_labels=[
            {
                "name": "clusterName",
                "value": "example",
            },
            {
                "name": "environment",
                "value": "prod",
            },
        ],
        enable_external=False)
    
    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.NewMonitorExternalCluster(ctx, "example", &tencentcloud.MonitorExternalClusterArgs{
    			InstanceId:    pulumi.String("prom-gzg3f1em"),
    			ClusterRegion: pulumi.String("ap-guangzhou"),
    			ClusterName:   pulumi.String("tf-external-cluster"),
    			ExternalLabels: tencentcloud.MonitorExternalClusterExternalLabelArray{
    				&tencentcloud.MonitorExternalClusterExternalLabelArgs{
    					Name:  pulumi.String("clusterName"),
    					Value: pulumi.String("example"),
    				},
    				&tencentcloud.MonitorExternalClusterExternalLabelArgs{
    					Name:  pulumi.String("environment"),
    					Value: pulumi.String("prod"),
    				},
    			},
    			EnableExternal: pulumi.Bool(false),
    		})
    		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.MonitorExternalCluster("example", new()
        {
            InstanceId = "prom-gzg3f1em",
            ClusterRegion = "ap-guangzhou",
            ClusterName = "tf-external-cluster",
            ExternalLabels = new[]
            {
                new Tencentcloud.Inputs.MonitorExternalClusterExternalLabelArgs
                {
                    Name = "clusterName",
                    Value = "example",
                },
                new Tencentcloud.Inputs.MonitorExternalClusterExternalLabelArgs
                {
                    Name = "environment",
                    Value = "prod",
                },
            },
            EnableExternal = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MonitorExternalCluster;
    import com.pulumi.tencentcloud.MonitorExternalClusterArgs;
    import com.pulumi.tencentcloud.inputs.MonitorExternalClusterExternalLabelArgs;
    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 MonitorExternalCluster("example", MonitorExternalClusterArgs.builder()
                .instanceId("prom-gzg3f1em")
                .clusterRegion("ap-guangzhou")
                .clusterName("tf-external-cluster")
                .externalLabels(            
                    MonitorExternalClusterExternalLabelArgs.builder()
                        .name("clusterName")
                        .value("example")
                        .build(),
                    MonitorExternalClusterExternalLabelArgs.builder()
                        .name("environment")
                        .value("prod")
                        .build())
                .enableExternal(false)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:MonitorExternalCluster
        properties:
          instanceId: prom-gzg3f1em
          clusterRegion: ap-guangzhou
          clusterName: tf-external-cluster
          externalLabels:
            - name: clusterName
              value: example
            - name: environment
              value: prod
          enableExternal: false
    

    Create MonitorExternalCluster Resource

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

    Constructor syntax

    new MonitorExternalCluster(name: string, args: MonitorExternalClusterArgs, opts?: CustomResourceOptions);
    @overload
    def MonitorExternalCluster(resource_name: str,
                               args: MonitorExternalClusterArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def MonitorExternalCluster(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               cluster_region: Optional[str] = None,
                               instance_id: Optional[str] = None,
                               cluster_name: Optional[str] = None,
                               enable_external: Optional[bool] = None,
                               external_labels: Optional[Sequence[MonitorExternalClusterExternalLabelArgs]] = None,
                               monitor_external_cluster_id: Optional[str] = None)
    func NewMonitorExternalCluster(ctx *Context, name string, args MonitorExternalClusterArgs, opts ...ResourceOption) (*MonitorExternalCluster, error)
    public MonitorExternalCluster(string name, MonitorExternalClusterArgs args, CustomResourceOptions? opts = null)
    public MonitorExternalCluster(String name, MonitorExternalClusterArgs args)
    public MonitorExternalCluster(String name, MonitorExternalClusterArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MonitorExternalCluster
    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 MonitorExternalClusterArgs
    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 MonitorExternalClusterArgs
    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 MonitorExternalClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorExternalClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorExternalClusterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ClusterRegion string
    Cluster region.
    InstanceId string
    Instance ID.
    ClusterName string
    Cluster name.
    EnableExternal bool
    Whether to enable public network access.
    ExternalLabels List<MonitorExternalClusterExternalLabel>
    External labels.
    MonitorExternalClusterId string
    ID of the resource.
    ClusterRegion string
    Cluster region.
    InstanceId string
    Instance ID.
    ClusterName string
    Cluster name.
    EnableExternal bool
    Whether to enable public network access.
    ExternalLabels []MonitorExternalClusterExternalLabelArgs
    External labels.
    MonitorExternalClusterId string
    ID of the resource.
    clusterRegion String
    Cluster region.
    instanceId String
    Instance ID.
    clusterName String
    Cluster name.
    enableExternal Boolean
    Whether to enable public network access.
    externalLabels List<MonitorExternalClusterExternalLabel>
    External labels.
    monitorExternalClusterId String
    ID of the resource.
    clusterRegion string
    Cluster region.
    instanceId string
    Instance ID.
    clusterName string
    Cluster name.
    enableExternal boolean
    Whether to enable public network access.
    externalLabels MonitorExternalClusterExternalLabel[]
    External labels.
    monitorExternalClusterId string
    ID of the resource.
    cluster_region str
    Cluster region.
    instance_id str
    Instance ID.
    cluster_name str
    Cluster name.
    enable_external bool
    Whether to enable public network access.
    external_labels Sequence[MonitorExternalClusterExternalLabelArgs]
    External labels.
    monitor_external_cluster_id str
    ID of the resource.
    clusterRegion String
    Cluster region.
    instanceId String
    Instance ID.
    clusterName String
    Cluster name.
    enableExternal Boolean
    Whether to enable public network access.
    externalLabels List<Property Map>
    External labels.
    monitorExternalClusterId String
    ID of the resource.

    Outputs

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

    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type, returned by API.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Agent status.
    ClusterId string
    Cluster ID.
    ClusterType string
    Cluster type, returned by API.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Agent status.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type, returned by API.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Agent status.
    clusterId string
    Cluster ID.
    clusterType string
    Cluster type, returned by API.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Agent status.
    cluster_id str
    Cluster ID.
    cluster_type str
    Cluster type, returned by API.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Agent status.
    clusterId String
    Cluster ID.
    clusterType String
    Cluster type, returned by API.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Agent status.

    Look up Existing MonitorExternalCluster Resource

    Get an existing MonitorExternalCluster 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?: MonitorExternalClusterState, opts?: CustomResourceOptions): MonitorExternalCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            cluster_name: Optional[str] = None,
            cluster_region: Optional[str] = None,
            cluster_type: Optional[str] = None,
            enable_external: Optional[bool] = None,
            external_labels: Optional[Sequence[MonitorExternalClusterExternalLabelArgs]] = None,
            instance_id: Optional[str] = None,
            monitor_external_cluster_id: Optional[str] = None,
            status: Optional[str] = None) -> MonitorExternalCluster
    func GetMonitorExternalCluster(ctx *Context, name string, id IDInput, state *MonitorExternalClusterState, opts ...ResourceOption) (*MonitorExternalCluster, error)
    public static MonitorExternalCluster Get(string name, Input<string> id, MonitorExternalClusterState? state, CustomResourceOptions? opts = null)
    public static MonitorExternalCluster get(String name, Output<String> id, MonitorExternalClusterState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MonitorExternalCluster    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:
    ClusterId string
    Cluster ID.
    ClusterName string
    Cluster name.
    ClusterRegion string
    Cluster region.
    ClusterType string
    Cluster type, returned by API.
    EnableExternal bool
    Whether to enable public network access.
    ExternalLabels List<MonitorExternalClusterExternalLabel>
    External labels.
    InstanceId string
    Instance ID.
    MonitorExternalClusterId string
    ID of the resource.
    Status string
    Agent status.
    ClusterId string
    Cluster ID.
    ClusterName string
    Cluster name.
    ClusterRegion string
    Cluster region.
    ClusterType string
    Cluster type, returned by API.
    EnableExternal bool
    Whether to enable public network access.
    ExternalLabels []MonitorExternalClusterExternalLabelArgs
    External labels.
    InstanceId string
    Instance ID.
    MonitorExternalClusterId string
    ID of the resource.
    Status string
    Agent status.
    clusterId String
    Cluster ID.
    clusterName String
    Cluster name.
    clusterRegion String
    Cluster region.
    clusterType String
    Cluster type, returned by API.
    enableExternal Boolean
    Whether to enable public network access.
    externalLabels List<MonitorExternalClusterExternalLabel>
    External labels.
    instanceId String
    Instance ID.
    monitorExternalClusterId String
    ID of the resource.
    status String
    Agent status.
    clusterId string
    Cluster ID.
    clusterName string
    Cluster name.
    clusterRegion string
    Cluster region.
    clusterType string
    Cluster type, returned by API.
    enableExternal boolean
    Whether to enable public network access.
    externalLabels MonitorExternalClusterExternalLabel[]
    External labels.
    instanceId string
    Instance ID.
    monitorExternalClusterId string
    ID of the resource.
    status string
    Agent status.
    cluster_id str
    Cluster ID.
    cluster_name str
    Cluster name.
    cluster_region str
    Cluster region.
    cluster_type str
    Cluster type, returned by API.
    enable_external bool
    Whether to enable public network access.
    external_labels Sequence[MonitorExternalClusterExternalLabelArgs]
    External labels.
    instance_id str
    Instance ID.
    monitor_external_cluster_id str
    ID of the resource.
    status str
    Agent status.
    clusterId String
    Cluster ID.
    clusterName String
    Cluster name.
    clusterRegion String
    Cluster region.
    clusterType String
    Cluster type, returned by API.
    enableExternal Boolean
    Whether to enable public network access.
    externalLabels List<Property Map>
    External labels.
    instanceId String
    Instance ID.
    monitorExternalClusterId String
    ID of the resource.
    status String
    Agent status.

    Supporting Types

    MonitorExternalClusterExternalLabel, MonitorExternalClusterExternalLabelArgs

    Name string
    Label name.
    Value string
    Label value.
    Name string
    Label name.
    Value string
    Label value.
    name String
    Label name.
    value String
    Label value.
    name string
    Label name.
    value string
    Label value.
    name str
    Label name.
    value str
    Label value.
    name String
    Label name.
    value String
    Label value.

    Import

    Monitor external cluster can be imported using the instanceId#clusterId, e.g.

    $ pulumi import tencentcloud:index/monitorExternalCluster:MonitorExternalCluster example prom-gzg3f1em#ecls-qi9v5opk
    

    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.
    tencentcloud logo
    Viewing docs for tencentcloud 1.82.79
    published on Friday, Mar 27, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.