harness.platform.PrometheusConnector

Resource for creating a Prometheus connector.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.PrometheusConnector("example", new()
    {
        DelegateSelectors = new[]
        {
            "harness-delegate",
        },
        Description = "test",
        Headers = new[]
        {
            new Harness.Platform.Inputs.PrometheusConnectorHeaderArgs
            {
                EncryptedValueRef = "account.secret_identifier",
                Key = "key",
                Value = "value",
                ValueEncrypted = true,
            },
        },
        Identifier = "idntifier",
        PasswordRef = "account.secret_identifier",
        Tags = new[]
        {
            "foo:bar",
        },
        Url = "https://prometheus.com/",
        UserName = "user_name",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewPrometheusConnector(ctx, "example", &platform.PrometheusConnectorArgs{
			DelegateSelectors: pulumi.StringArray{
				pulumi.String("harness-delegate"),
			},
			Description: pulumi.String("test"),
			Headers: platform.PrometheusConnectorHeaderArray{
				&platform.PrometheusConnectorHeaderArgs{
					EncryptedValueRef: pulumi.String("account.secret_identifier"),
					Key:               pulumi.String("key"),
					Value:             pulumi.String("value"),
					ValueEncrypted:    pulumi.Bool(true),
				},
			},
			Identifier:  pulumi.String("idntifier"),
			PasswordRef: pulumi.String("account.secret_identifier"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
			},
			Url:      pulumi.String("https://prometheus.com/"),
			UserName: pulumi.String("user_name"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PrometheusConnector;
import com.pulumi.harness.platform.PrometheusConnectorArgs;
import com.pulumi.harness.platform.inputs.PrometheusConnectorHeaderArgs;
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 PrometheusConnector("example", PrometheusConnectorArgs.builder()        
            .delegateSelectors("harness-delegate")
            .description("test")
            .headers(PrometheusConnectorHeaderArgs.builder()
                .encryptedValueRef("account.secret_identifier")
                .key("key")
                .value("value")
                .valueEncrypted(true)
                .build())
            .identifier("idntifier")
            .passwordRef("account.secret_identifier")
            .tags("foo:bar")
            .url("https://prometheus.com/")
            .userName("user_name")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_harness as harness

example = harness.platform.PrometheusConnector("example",
    delegate_selectors=["harness-delegate"],
    description="test",
    headers=[harness.platform.PrometheusConnectorHeaderArgs(
        encrypted_value_ref="account.secret_identifier",
        key="key",
        value="value",
        value_encrypted=True,
    )],
    identifier="idntifier",
    password_ref="account.secret_identifier",
    tags=["foo:bar"],
    url="https://prometheus.com/",
    user_name="user_name")
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = new harness.platform.PrometheusConnector("example", {
    delegateSelectors: ["harness-delegate"],
    description: "test",
    headers: [{
        encryptedValueRef: "account.secret_identifier",
        key: "key",
        value: "value",
        valueEncrypted: true,
    }],
    identifier: "idntifier",
    passwordRef: "account.secret_identifier",
    tags: ["foo:bar"],
    url: "https://prometheus.com/",
    userName: "user_name",
});
resources:
  example:
    type: harness:platform:PrometheusConnector
    properties:
      delegateSelectors:
        - harness-delegate
      description: test
      headers:
        - encryptedValueRef: account.secret_identifier
          key: key
          value: value
          valueEncrypted: true
      identifier: idntifier
      passwordRef: account.secret_identifier
      tags:
        - foo:bar
      url: https://prometheus.com/
      userName: user_name

Create PrometheusConnector Resource

new PrometheusConnector(name: string, args: PrometheusConnectorArgs, opts?: CustomResourceOptions);
@overload
def PrometheusConnector(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        delegate_selectors: Optional[Sequence[str]] = None,
                        description: Optional[str] = None,
                        headers: Optional[Sequence[PrometheusConnectorHeaderArgs]] = None,
                        identifier: Optional[str] = None,
                        name: Optional[str] = None,
                        org_id: Optional[str] = None,
                        password_ref: Optional[str] = None,
                        project_id: Optional[str] = None,
                        tags: Optional[Sequence[str]] = None,
                        url: Optional[str] = None,
                        user_name: Optional[str] = None)
@overload
def PrometheusConnector(resource_name: str,
                        args: PrometheusConnectorArgs,
                        opts: Optional[ResourceOptions] = None)
func NewPrometheusConnector(ctx *Context, name string, args PrometheusConnectorArgs, opts ...ResourceOption) (*PrometheusConnector, error)
public PrometheusConnector(string name, PrometheusConnectorArgs args, CustomResourceOptions? opts = null)
public PrometheusConnector(String name, PrometheusConnectorArgs args)
public PrometheusConnector(String name, PrometheusConnectorArgs args, CustomResourceOptions options)
type: harness:platform:PrometheusConnector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PrometheusConnectorArgs
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 PrometheusConnectorArgs
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 PrometheusConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PrometheusConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PrometheusConnectorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

PrometheusConnector Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The PrometheusConnector resource accepts the following input properties:

Identifier string

Unique identifier of the resource.

Url string

Url of the Prometheus server.

DelegateSelectors List<string>

Connect using only the delegates which have these tags.

Description string

Description of the resource.

Headers List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.PrometheusConnectorHeaderArgs>

Headers.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

PasswordRef string

Password reference.

ProjectId string

Unique identifier of the Project.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

UserName string

User name.

Identifier string

Unique identifier of the resource.

Url string

Url of the Prometheus server.

DelegateSelectors []string

Connect using only the delegates which have these tags.

Description string

Description of the resource.

Headers []PrometheusConnectorHeaderArgs

Headers.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

PasswordRef string

Password reference.

ProjectId string

Unique identifier of the Project.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

UserName string

User name.

identifier String

Unique identifier of the resource.

url String

Url of the Prometheus server.

delegateSelectors List<String>

Connect using only the delegates which have these tags.

description String

Description of the resource.

headers List<PrometheusConnectorHeaderArgs>

Headers.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

passwordRef String

Password reference.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

userName String

User name.

identifier string

Unique identifier of the resource.

url string

Url of the Prometheus server.

delegateSelectors string[]

Connect using only the delegates which have these tags.

description string

Description of the resource.

headers PrometheusConnectorHeaderArgs[]

Headers.

name string

Name of the resource.

orgId string

Unique identifier of the Organization.

passwordRef string

Password reference.

projectId string

Unique identifier of the Project.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

userName string

User name.

identifier str

Unique identifier of the resource.

url str

Url of the Prometheus server.

delegate_selectors Sequence[str]

Connect using only the delegates which have these tags.

description str

Description of the resource.

headers Sequence[PrometheusConnectorHeaderArgs]

Headers.

name str

Name of the resource.

org_id str

Unique identifier of the Organization.

password_ref str

Password reference.

project_id str

Unique identifier of the Project.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

user_name str

User name.

identifier String

Unique identifier of the resource.

url String

Url of the Prometheus server.

delegateSelectors List<String>

Connect using only the delegates which have these tags.

description String

Description of the resource.

headers List<Property Map>

Headers.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

passwordRef String

Password reference.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

userName String

User name.

Outputs

All input properties are implicitly available as output properties. Additionally, the PrometheusConnector 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 PrometheusConnector Resource

Get an existing PrometheusConnector 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?: PrometheusConnectorState, opts?: CustomResourceOptions): PrometheusConnector
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delegate_selectors: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        headers: Optional[Sequence[PrometheusConnectorHeaderArgs]] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        password_ref: Optional[str] = None,
        project_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        url: Optional[str] = None,
        user_name: Optional[str] = None) -> PrometheusConnector
func GetPrometheusConnector(ctx *Context, name string, id IDInput, state *PrometheusConnectorState, opts ...ResourceOption) (*PrometheusConnector, error)
public static PrometheusConnector Get(string name, Input<string> id, PrometheusConnectorState? state, CustomResourceOptions? opts = null)
public static PrometheusConnector get(String name, Output<String> id, PrometheusConnectorState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
DelegateSelectors List<string>

Connect using only the delegates which have these tags.

Description string

Description of the resource.

Headers List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.PrometheusConnectorHeaderArgs>

Headers.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

PasswordRef string

Password reference.

ProjectId string

Unique identifier of the Project.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

Url string

Url of the Prometheus server.

UserName string

User name.

DelegateSelectors []string

Connect using only the delegates which have these tags.

Description string

Description of the resource.

Headers []PrometheusConnectorHeaderArgs

Headers.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

PasswordRef string

Password reference.

ProjectId string

Unique identifier of the Project.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

Url string

Url of the Prometheus server.

UserName string

User name.

delegateSelectors List<String>

Connect using only the delegates which have these tags.

description String

Description of the resource.

headers List<PrometheusConnectorHeaderArgs>

Headers.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

passwordRef String

Password reference.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

url String

Url of the Prometheus server.

userName String

User name.

delegateSelectors string[]

Connect using only the delegates which have these tags.

description string

Description of the resource.

headers PrometheusConnectorHeaderArgs[]

Headers.

identifier string

Unique identifier of the resource.

name string

Name of the resource.

orgId string

Unique identifier of the Organization.

passwordRef string

Password reference.

projectId string

Unique identifier of the Project.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

url string

Url of the Prometheus server.

userName string

User name.

delegate_selectors Sequence[str]

Connect using only the delegates which have these tags.

description str

Description of the resource.

headers Sequence[PrometheusConnectorHeaderArgs]

Headers.

identifier str

Unique identifier of the resource.

name str

Name of the resource.

org_id str

Unique identifier of the Organization.

password_ref str

Password reference.

project_id str

Unique identifier of the Project.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

url str

Url of the Prometheus server.

user_name str

User name.

delegateSelectors List<String>

Connect using only the delegates which have these tags.

description String

Description of the resource.

headers List<Property Map>

Headers.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

orgId String

Unique identifier of the Organization.

passwordRef String

Password reference.

projectId String

Unique identifier of the Project.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

url String

Url of the Prometheus server.

userName String

User name.

Supporting Types

PrometheusConnectorHeader

Key string

Key.

EncryptedValueRef string

Encrypted value reference.

Value string

Value.

ValueEncrypted bool

Encrypted value.

Key string

Key.

EncryptedValueRef string

Encrypted value reference.

Value string

Value.

ValueEncrypted bool

Encrypted value.

key String

Key.

encryptedValueRef String

Encrypted value reference.

value String

Value.

valueEncrypted Boolean

Encrypted value.

key string

Key.

encryptedValueRef string

Encrypted value reference.

value string

Value.

valueEncrypted boolean

Encrypted value.

key str

Key.

encrypted_value_ref str

Encrypted value reference.

value str

Value.

value_encrypted bool

Encrypted value.

key String

Key.

encryptedValueRef String

Encrypted value reference.

value String

Value.

valueEncrypted Boolean

Encrypted value.

Import

Import using prometheus connector id

 $ pulumi import harness:platform/prometheusConnector:PrometheusConnector example <connector_id>

Package Details

Repository
harness lbrlabs/pulumi-harness
License
Apache-2.0
Notes

This Pulumi package is based on the harness Terraform Provider.