tencentcloud.TcmPrometheusAttachment
Explore with Pulumi AI
Provides a resource to create a tcm prometheus_attachment
NOTE: Instructions for use: 1. Use Tencent Cloud Prometheus to monitor TMP, please enter
vpc_id
,subnet_id
,region
orinstance_id
, it is recommended to use an existing tmp instance; 2. To use the third-party Prometheus service, please entercustom_prom
; 3.tencentcloud.TcmPrometheusAttachment
does not support modification; 4. If you use Tencent Cloud Prometheus to monitor TMP, entervpc_id
,subnet_id
,region
to create a new Prometheus monitoring instance, destroy will not destroy the Prometheus monitoring instance NOTE: If you use the config attribute prometheus in tencentcloud_tcm_mesh, do not use tencentcloud.TcmPrometheusAttachment
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const prometheusAttachment = new tencentcloud.TcmPrometheusAttachment("prometheusAttachment", {
meshId: "mesh-rofjmxxx",
prometheus: {
instanceId: "",
region: "ap-guangzhou",
subnetId: "subnet-driddxxx",
vpcId: "vpc-pewdpxxx",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
prometheus_attachment = tencentcloud.TcmPrometheusAttachment("prometheusAttachment",
mesh_id="mesh-rofjmxxx",
prometheus={
"instance_id": "",
"region": "ap-guangzhou",
"subnet_id": "subnet-driddxxx",
"vpc_id": "vpc-pewdpxxx",
})
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.NewTcmPrometheusAttachment(ctx, "prometheusAttachment", &tencentcloud.TcmPrometheusAttachmentArgs{
MeshId: pulumi.String("mesh-rofjmxxx"),
Prometheus: &tencentcloud.TcmPrometheusAttachmentPrometheusArgs{
InstanceId: pulumi.String(""),
Region: pulumi.String("ap-guangzhou"),
SubnetId: pulumi.String("subnet-driddxxx"),
VpcId: pulumi.String("vpc-pewdpxxx"),
},
})
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 prometheusAttachment = new Tencentcloud.TcmPrometheusAttachment("prometheusAttachment", new()
{
MeshId = "mesh-rofjmxxx",
Prometheus = new Tencentcloud.Inputs.TcmPrometheusAttachmentPrometheusArgs
{
InstanceId = "",
Region = "ap-guangzhou",
SubnetId = "subnet-driddxxx",
VpcId = "vpc-pewdpxxx",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TcmPrometheusAttachment;
import com.pulumi.tencentcloud.TcmPrometheusAttachmentArgs;
import com.pulumi.tencentcloud.inputs.TcmPrometheusAttachmentPrometheusArgs;
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 prometheusAttachment = new TcmPrometheusAttachment("prometheusAttachment", TcmPrometheusAttachmentArgs.builder()
.meshId("mesh-rofjmxxx")
.prometheus(TcmPrometheusAttachmentPrometheusArgs.builder()
.instanceId("")
.region("ap-guangzhou")
.subnetId("subnet-driddxxx")
.vpcId("vpc-pewdpxxx")
.build())
.build());
}
}
resources:
prometheusAttachment:
type: tencentcloud:TcmPrometheusAttachment
properties:
meshId: mesh-rofjmxxx
prometheus:
instanceId: ""
region: ap-guangzhou
subnetId: subnet-driddxxx
vpcId: vpc-pewdpxxx
Create TcmPrometheusAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcmPrometheusAttachment(name: string, args: TcmPrometheusAttachmentArgs, opts?: CustomResourceOptions);
@overload
def TcmPrometheusAttachment(resource_name: str,
args: TcmPrometheusAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcmPrometheusAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
mesh_id: Optional[str] = None,
prometheus: Optional[TcmPrometheusAttachmentPrometheusArgs] = None,
tcm_prometheus_attachment_id: Optional[str] = None)
func NewTcmPrometheusAttachment(ctx *Context, name string, args TcmPrometheusAttachmentArgs, opts ...ResourceOption) (*TcmPrometheusAttachment, error)
public TcmPrometheusAttachment(string name, TcmPrometheusAttachmentArgs args, CustomResourceOptions? opts = null)
public TcmPrometheusAttachment(String name, TcmPrometheusAttachmentArgs args)
public TcmPrometheusAttachment(String name, TcmPrometheusAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:TcmPrometheusAttachment
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 TcmPrometheusAttachmentArgs
- 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 TcmPrometheusAttachmentArgs
- 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 TcmPrometheusAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcmPrometheusAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcmPrometheusAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcmPrometheusAttachment 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 TcmPrometheusAttachment resource accepts the following input properties:
- Mesh
Id string - Mesh ID.
- Prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- Tcm
Prometheus stringAttachment Id - ID of the resource.
- Mesh
Id string - Mesh ID.
- Prometheus
Tcm
Prometheus Attachment Prometheus Args - Prometheus configuration.
- Tcm
Prometheus stringAttachment Id - ID of the resource.
- mesh
Id String - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- tcm
Prometheus StringAttachment Id - ID of the resource.
- mesh
Id string - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- tcm
Prometheus stringAttachment Id - ID of the resource.
- mesh_
id str - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus Args - Prometheus configuration.
- tcm_
prometheus_ strattachment_ id - ID of the resource.
- mesh
Id String - Mesh ID.
- prometheus Property Map
- Prometheus configuration.
- tcm
Prometheus StringAttachment Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcmPrometheusAttachment 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 TcmPrometheusAttachment Resource
Get an existing TcmPrometheusAttachment 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?: TcmPrometheusAttachmentState, opts?: CustomResourceOptions): TcmPrometheusAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
mesh_id: Optional[str] = None,
prometheus: Optional[TcmPrometheusAttachmentPrometheusArgs] = None,
tcm_prometheus_attachment_id: Optional[str] = None) -> TcmPrometheusAttachment
func GetTcmPrometheusAttachment(ctx *Context, name string, id IDInput, state *TcmPrometheusAttachmentState, opts ...ResourceOption) (*TcmPrometheusAttachment, error)
public static TcmPrometheusAttachment Get(string name, Input<string> id, TcmPrometheusAttachmentState? state, CustomResourceOptions? opts = null)
public static TcmPrometheusAttachment get(String name, Output<String> id, TcmPrometheusAttachmentState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcmPrometheusAttachment 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.
- Mesh
Id string - Mesh ID.
- Prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- Tcm
Prometheus stringAttachment Id - ID of the resource.
- Mesh
Id string - Mesh ID.
- Prometheus
Tcm
Prometheus Attachment Prometheus Args - Prometheus configuration.
- Tcm
Prometheus stringAttachment Id - ID of the resource.
- mesh
Id String - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- tcm
Prometheus StringAttachment Id - ID of the resource.
- mesh
Id string - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus - Prometheus configuration.
- tcm
Prometheus stringAttachment Id - ID of the resource.
- mesh_
id str - Mesh ID.
- prometheus
Tcm
Prometheus Attachment Prometheus Args - Prometheus configuration.
- tcm_
prometheus_ strattachment_ id - ID of the resource.
- mesh
Id String - Mesh ID.
- prometheus Property Map
- Prometheus configuration.
- tcm
Prometheus StringAttachment Id - ID of the resource.
Supporting Types
TcmPrometheusAttachmentPrometheus, TcmPrometheusAttachmentPrometheusArgs
- Custom
Prom TcmPrometheus Attachment Prometheus Custom Prom - Third party prometheus.
- Instance
Id string - Existed TMP id, auto create TMP if empty.
- Region string
- Region for TMP.
- Subnet
Id string - Subnet id for TMP.
- Vpc
Id string - Vpc id for TMP.
- Custom
Prom TcmPrometheus Attachment Prometheus Custom Prom - Third party prometheus.
- Instance
Id string - Existed TMP id, auto create TMP if empty.
- Region string
- Region for TMP.
- Subnet
Id string - Subnet id for TMP.
- Vpc
Id string - Vpc id for TMP.
- custom
Prom TcmPrometheus Attachment Prometheus Custom Prom - Third party prometheus.
- instance
Id String - Existed TMP id, auto create TMP if empty.
- region String
- Region for TMP.
- subnet
Id String - Subnet id for TMP.
- vpc
Id String - Vpc id for TMP.
- custom
Prom TcmPrometheus Attachment Prometheus Custom Prom - Third party prometheus.
- instance
Id string - Existed TMP id, auto create TMP if empty.
- region string
- Region for TMP.
- subnet
Id string - Subnet id for TMP.
- vpc
Id string - Vpc id for TMP.
- custom_
prom TcmPrometheus Attachment Prometheus Custom Prom - Third party prometheus.
- instance_
id str - Existed TMP id, auto create TMP if empty.
- region str
- Region for TMP.
- subnet_
id str - Subnet id for TMP.
- vpc_
id str - Vpc id for TMP.
- custom
Prom Property Map - Third party prometheus.
- instance
Id String - Existed TMP id, auto create TMP if empty.
- region String
- Region for TMP.
- subnet
Id String - Subnet id for TMP.
- vpc
Id String - Vpc id for TMP.
TcmPrometheusAttachmentPrometheusCustomProm, TcmPrometheusAttachmentPrometheusCustomPromArgs
- Auth
Type string - Authentication type of the prometheus.
- Url string
- Url of the prometheus.
- Is
Public boolAddr - Whether it is public address, default false.
- Password string
- Password of the prometheus, used in basic authentication type.
- Username string
- Username of the prometheus, used in basic authentication type.
- Vpc
Id string - Vpc id.
- Auth
Type string - Authentication type of the prometheus.
- Url string
- Url of the prometheus.
- Is
Public boolAddr - Whether it is public address, default false.
- Password string
- Password of the prometheus, used in basic authentication type.
- Username string
- Username of the prometheus, used in basic authentication type.
- Vpc
Id string - Vpc id.
- auth
Type String - Authentication type of the prometheus.
- url String
- Url of the prometheus.
- is
Public BooleanAddr - Whether it is public address, default false.
- password String
- Password of the prometheus, used in basic authentication type.
- username String
- Username of the prometheus, used in basic authentication type.
- vpc
Id String - Vpc id.
- auth
Type string - Authentication type of the prometheus.
- url string
- Url of the prometheus.
- is
Public booleanAddr - Whether it is public address, default false.
- password string
- Password of the prometheus, used in basic authentication type.
- username string
- Username of the prometheus, used in basic authentication type.
- vpc
Id string - Vpc id.
- auth_
type str - Authentication type of the prometheus.
- url str
- Url of the prometheus.
- is_
public_ booladdr - Whether it is public address, default false.
- password str
- Password of the prometheus, used in basic authentication type.
- username str
- Username of the prometheus, used in basic authentication type.
- vpc_
id str - Vpc id.
- auth
Type String - Authentication type of the prometheus.
- url String
- Url of the prometheus.
- is
Public BooleanAddr - Whether it is public address, default false.
- password String
- Password of the prometheus, used in basic authentication type.
- username String
- Username of the prometheus, used in basic authentication type.
- vpc
Id String - Vpc id.
Import
tcm prometheus_attachment can be imported using the mesh_id, e.g.
$ pulumi import tencentcloud:index/tcmPrometheusAttachment:TcmPrometheusAttachment prometheus_attachment mesh-rofjmxxx
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.