tencentcloud.MonitorGrafanaInstance
Explore with Pulumi AI
Provides a resource to create a monitor grafanaInstance
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-6";
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
});
const foo = new tencentcloud.MonitorGrafanaInstance("foo", {
instanceName: "test-grafana",
vpcId: vpc.vpcId,
subnetIds: [subnet.subnetId],
grafanaInitPassword: "1234567890",
enableInternet: false,
isDestroy: true,
tags: {
createdBy: "test",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-6"
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24")
foo = tencentcloud.MonitorGrafanaInstance("foo",
instance_name="test-grafana",
vpc_id=vpc.vpc_id,
subnet_ids=[subnet.subnet_id],
grafana_init_password="1234567890",
enable_internet=False,
is_destroy=True,
tags={
"createdBy": "test",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-6"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewMonitorGrafanaInstance(ctx, "foo", &tencentcloud.MonitorGrafanaInstanceArgs{
InstanceName: pulumi.String("test-grafana"),
VpcId: vpc.VpcId,
SubnetIds: pulumi.StringArray{
subnet.SubnetId,
},
GrafanaInitPassword: pulumi.String("1234567890"),
EnableInternet: pulumi.Bool(false),
IsDestroy: pulumi.Bool(true),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("test"),
},
})
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 config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-6";
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
});
var foo = new Tencentcloud.MonitorGrafanaInstance("foo", new()
{
InstanceName = "test-grafana",
VpcId = vpc.VpcId,
SubnetIds = new[]
{
subnet.SubnetId,
},
GrafanaInitPassword = "1234567890",
EnableInternet = false,
IsDestroy = true,
Tags =
{
{ "createdBy", "test" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.MonitorGrafanaInstance;
import com.pulumi.tencentcloud.MonitorGrafanaInstanceArgs;
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) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-6");
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.build());
var foo = new MonitorGrafanaInstance("foo", MonitorGrafanaInstanceArgs.builder()
.instanceName("test-grafana")
.vpcId(vpc.vpcId())
.subnetIds(subnet.subnetId())
.grafanaInitPassword("1234567890")
.enableInternet(false)
.isDestroy(true)
.tags(Map.of("createdBy", "test"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-6
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
foo:
type: tencentcloud:MonitorGrafanaInstance
properties:
instanceName: test-grafana
vpcId: ${vpc.vpcId}
subnetIds:
- ${subnet.subnetId}
grafanaInitPassword: '1234567890'
enableInternet: false
isDestroy: true
tags:
createdBy: test
Create MonitorGrafanaInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MonitorGrafanaInstance(name: string, args: MonitorGrafanaInstanceArgs, opts?: CustomResourceOptions);
@overload
def MonitorGrafanaInstance(resource_name: str,
args: MonitorGrafanaInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MonitorGrafanaInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_name: Optional[str] = None,
auto_voucher: Optional[bool] = None,
enable_internet: Optional[bool] = None,
grafana_init_password: Optional[str] = None,
is_destroy: Optional[bool] = None,
is_distroy: Optional[bool] = None,
monitor_grafana_instance_id: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None)
func NewMonitorGrafanaInstance(ctx *Context, name string, args MonitorGrafanaInstanceArgs, opts ...ResourceOption) (*MonitorGrafanaInstance, error)
public MonitorGrafanaInstance(string name, MonitorGrafanaInstanceArgs args, CustomResourceOptions? opts = null)
public MonitorGrafanaInstance(String name, MonitorGrafanaInstanceArgs args)
public MonitorGrafanaInstance(String name, MonitorGrafanaInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:MonitorGrafanaInstance
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 MonitorGrafanaInstanceArgs
- 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 MonitorGrafanaInstanceArgs
- 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 MonitorGrafanaInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorGrafanaInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorGrafanaInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MonitorGrafanaInstance 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 MonitorGrafanaInstance resource accepts the following input properties:
- Instance
Name string - Instance name.
- Auto
Voucher bool - Whether to automatically use vouchers.
- Enable
Internet bool - Control whether grafana could be accessed by internet.
- Grafana
Init stringPassword - Grafana server admin password.
- Is
Destroy bool - Whether to clean up completely, the default is false.
- Is
Distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- Monitor
Grafana stringInstance Id - ID of the resource.
- Subnet
Ids List<string> - Subnet Id array.
- Dictionary<string, string>
- Tag description list.
- Vpc
Id string - Vpc Id.
- Instance
Name string - Instance name.
- Auto
Voucher bool - Whether to automatically use vouchers.
- Enable
Internet bool - Control whether grafana could be accessed by internet.
- Grafana
Init stringPassword - Grafana server admin password.
- Is
Destroy bool - Whether to clean up completely, the default is false.
- Is
Distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- Monitor
Grafana stringInstance Id - ID of the resource.
- Subnet
Ids []string - Subnet Id array.
- map[string]string
- Tag description list.
- Vpc
Id string - Vpc Id.
- instance
Name String - Instance name.
- auto
Voucher Boolean - Whether to automatically use vouchers.
- enable
Internet Boolean - Control whether grafana could be accessed by internet.
- grafana
Init StringPassword - Grafana server admin password.
- is
Destroy Boolean - Whether to clean up completely, the default is false.
- is
Distroy Boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana StringInstance Id - ID of the resource.
- subnet
Ids List<String> - Subnet Id array.
- Map<String,String>
- Tag description list.
- vpc
Id String - Vpc Id.
- instance
Name string - Instance name.
- auto
Voucher boolean - Whether to automatically use vouchers.
- enable
Internet boolean - Control whether grafana could be accessed by internet.
- grafana
Init stringPassword - Grafana server admin password.
- is
Destroy boolean - Whether to clean up completely, the default is false.
- is
Distroy boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana stringInstance Id - ID of the resource.
- subnet
Ids string[] - Subnet Id array.
- {[key: string]: string}
- Tag description list.
- vpc
Id string - Vpc Id.
- instance_
name str - Instance name.
- auto_
voucher bool - Whether to automatically use vouchers.
- enable_
internet bool - Control whether grafana could be accessed by internet.
- grafana_
init_ strpassword - Grafana server admin password.
- is_
destroy bool - Whether to clean up completely, the default is false.
- is_
distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor_
grafana_ strinstance_ id - ID of the resource.
- subnet_
ids Sequence[str] - Subnet Id array.
- Mapping[str, str]
- Tag description list.
- vpc_
id str - Vpc Id.
- instance
Name String - Instance name.
- auto
Voucher Boolean - Whether to automatically use vouchers.
- enable
Internet Boolean - Control whether grafana could be accessed by internet.
- grafana
Init StringPassword - Grafana server admin password.
- is
Destroy Boolean - Whether to clean up completely, the default is false.
- is
Distroy Boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana StringInstance Id - ID of the resource.
- subnet
Ids List<String> - Subnet Id array.
- Map<String>
- Tag description list.
- vpc
Id String - Vpc Id.
Outputs
All input properties are implicitly available as output properties. Additionally, the MonitorGrafanaInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Grafana instance id.
- Instance
Status double - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- Internal
Url string - Grafana public address.
- Internet
Url string - Grafana intranet address.
- Root
Url string - Grafana external url which could be accessed by user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Grafana instance id.
- Instance
Status float64 - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- Internal
Url string - Grafana public address.
- Internet
Url string - Grafana intranet address.
- Root
Url string - Grafana external url which could be accessed by user.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - Grafana instance id.
- instance
Status Double - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url String - Grafana public address.
- internet
Url String - Grafana intranet address.
- root
Url String - Grafana external url which could be accessed by user.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - Grafana instance id.
- instance
Status number - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url string - Grafana public address.
- internet
Url string - Grafana intranet address.
- root
Url string - Grafana external url which could be accessed by user.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - Grafana instance id.
- instance_
status float - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal_
url str - Grafana public address.
- internet_
url str - Grafana intranet address.
- root_
url str - Grafana external url which could be accessed by user.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - Grafana instance id.
- instance
Status Number - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url String - Grafana public address.
- internet
Url String - Grafana intranet address.
- root
Url String - Grafana external url which could be accessed by user.
Look up Existing MonitorGrafanaInstance Resource
Get an existing MonitorGrafanaInstance 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?: MonitorGrafanaInstanceState, opts?: CustomResourceOptions): MonitorGrafanaInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_voucher: Optional[bool] = None,
enable_internet: Optional[bool] = None,
grafana_init_password: Optional[str] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
instance_status: Optional[float] = None,
internal_url: Optional[str] = None,
internet_url: Optional[str] = None,
is_destroy: Optional[bool] = None,
is_distroy: Optional[bool] = None,
monitor_grafana_instance_id: Optional[str] = None,
root_url: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None) -> MonitorGrafanaInstance
func GetMonitorGrafanaInstance(ctx *Context, name string, id IDInput, state *MonitorGrafanaInstanceState, opts ...ResourceOption) (*MonitorGrafanaInstance, error)
public static MonitorGrafanaInstance Get(string name, Input<string> id, MonitorGrafanaInstanceState? state, CustomResourceOptions? opts = null)
public static MonitorGrafanaInstance get(String name, Output<String> id, MonitorGrafanaInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MonitorGrafanaInstance 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.
- Auto
Voucher bool - Whether to automatically use vouchers.
- Enable
Internet bool - Control whether grafana could be accessed by internet.
- Grafana
Init stringPassword - Grafana server admin password.
- Instance
Id string - Grafana instance id.
- Instance
Name string - Instance name.
- Instance
Status double - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- Internal
Url string - Grafana public address.
- Internet
Url string - Grafana intranet address.
- Is
Destroy bool - Whether to clean up completely, the default is false.
- Is
Distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- Monitor
Grafana stringInstance Id - ID of the resource.
- Root
Url string - Grafana external url which could be accessed by user.
- Subnet
Ids List<string> - Subnet Id array.
- Dictionary<string, string>
- Tag description list.
- Vpc
Id string - Vpc Id.
- Auto
Voucher bool - Whether to automatically use vouchers.
- Enable
Internet bool - Control whether grafana could be accessed by internet.
- Grafana
Init stringPassword - Grafana server admin password.
- Instance
Id string - Grafana instance id.
- Instance
Name string - Instance name.
- Instance
Status float64 - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- Internal
Url string - Grafana public address.
- Internet
Url string - Grafana intranet address.
- Is
Destroy bool - Whether to clean up completely, the default is false.
- Is
Distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- Monitor
Grafana stringInstance Id - ID of the resource.
- Root
Url string - Grafana external url which could be accessed by user.
- Subnet
Ids []string - Subnet Id array.
- map[string]string
- Tag description list.
- Vpc
Id string - Vpc Id.
- auto
Voucher Boolean - Whether to automatically use vouchers.
- enable
Internet Boolean - Control whether grafana could be accessed by internet.
- grafana
Init StringPassword - Grafana server admin password.
- instance
Id String - Grafana instance id.
- instance
Name String - Instance name.
- instance
Status Double - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url String - Grafana public address.
- internet
Url String - Grafana intranet address.
- is
Destroy Boolean - Whether to clean up completely, the default is false.
- is
Distroy Boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana StringInstance Id - ID of the resource.
- root
Url String - Grafana external url which could be accessed by user.
- subnet
Ids List<String> - Subnet Id array.
- Map<String,String>
- Tag description list.
- vpc
Id String - Vpc Id.
- auto
Voucher boolean - Whether to automatically use vouchers.
- enable
Internet boolean - Control whether grafana could be accessed by internet.
- grafana
Init stringPassword - Grafana server admin password.
- instance
Id string - Grafana instance id.
- instance
Name string - Instance name.
- instance
Status number - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url string - Grafana public address.
- internet
Url string - Grafana intranet address.
- is
Destroy boolean - Whether to clean up completely, the default is false.
- is
Distroy boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana stringInstance Id - ID of the resource.
- root
Url string - Grafana external url which could be accessed by user.
- subnet
Ids string[] - Subnet Id array.
- {[key: string]: string}
- Tag description list.
- vpc
Id string - Vpc Id.
- auto_
voucher bool - Whether to automatically use vouchers.
- enable_
internet bool - Control whether grafana could be accessed by internet.
- grafana_
init_ strpassword - Grafana server admin password.
- instance_
id str - Grafana instance id.
- instance_
name str - Instance name.
- instance_
status float - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal_
url str - Grafana public address.
- internet_
url str - Grafana intranet address.
- is_
destroy bool - Whether to clean up completely, the default is false.
- is_
distroy bool - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor_
grafana_ strinstance_ id - ID of the resource.
- root_
url str - Grafana external url which could be accessed by user.
- subnet_
ids Sequence[str] - Subnet Id array.
- Mapping[str, str]
- Tag description list.
- vpc_
id str - Vpc Id.
- auto
Voucher Boolean - Whether to automatically use vouchers.
- enable
Internet Boolean - Control whether grafana could be accessed by internet.
- grafana
Init StringPassword - Grafana server admin password.
- instance
Id String - Grafana instance id.
- instance
Name String - Instance name.
- instance
Status Number - Grafana instance status, 1: Creating, 2: Running, 6: Stopped.
- internal
Url String - Grafana public address.
- internet
Url String - Grafana intranet address.
- is
Destroy Boolean - Whether to clean up completely, the default is false.
- is
Distroy Boolean - It has been deprecated from version 1.81.16. Whether to clean up completely, the default is false.
- monitor
Grafana StringInstance Id - ID of the resource.
- root
Url String - Grafana external url which could be accessed by user.
- subnet
Ids List<String> - Subnet Id array.
- Map<String>
- Tag description list.
- vpc
Id String - Vpc Id.
Import
monitor grafanaInstance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/monitorGrafanaInstance:MonitorGrafanaInstance foo grafanaInstance_id
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.