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.
- Delegate
Selectors List<string> Connect using only the delegates which have these tags.
- Description string
Description of the resource.
- Headers
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Prometheus Connector Header Args> Headers.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Password
Ref string Password reference.
- Project
Id string Unique identifier of the Project.
- List<string>
Tags to associate with the resource. Tags should be in the form
name:value
.- User
Name string User name.
- Identifier string
Unique identifier of the resource.
- Url string
Url of the Prometheus server.
- Delegate
Selectors []string Connect using only the delegates which have these tags.
- Description string
Description of the resource.
- Headers
[]Prometheus
Connector Header Args Headers.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Password
Ref string Password reference.
- Project
Id string Unique identifier of the Project.
- []string
Tags to associate with the resource. Tags should be in the form
name:value
.- User
Name string User name.
- identifier String
Unique identifier of the resource.
- url String
Url of the Prometheus server.
- delegate
Selectors List<String> Connect using only the delegates which have these tags.
- description String
Description of the resource.
- headers
List<Prometheus
Connector Header Args> Headers.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- password
Ref String Password reference.
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.- user
Name String User name.
- identifier string
Unique identifier of the resource.
- url string
Url of the Prometheus server.
- delegate
Selectors string[] Connect using only the delegates which have these tags.
- description string
Description of the resource.
- headers
Prometheus
Connector Header Args[] Headers.
- name string
Name of the resource.
- org
Id string Unique identifier of the Organization.
- password
Ref string Password reference.
- project
Id string Unique identifier of the Project.
- string[]
Tags to associate with the resource. Tags should be in the form
name:value
.- user
Name 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[Prometheus
Connector Header Args] 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.
- 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.
- delegate
Selectors 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.
- org
Id String Unique identifier of the Organization.
- password
Ref String Password reference.
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.- user
Name 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.
- Delegate
Selectors List<string> Connect using only the delegates which have these tags.
- Description string
Description of the resource.
- Headers
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Prometheus Connector Header Args> Headers.
- Identifier string
Unique identifier of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Password
Ref string Password reference.
- Project
Id string Unique identifier of the Project.
- List<string>
Tags to associate with the resource. Tags should be in the form
name:value
.- Url string
Url of the Prometheus server.
- User
Name string User name.
- Delegate
Selectors []string Connect using only the delegates which have these tags.
- Description string
Description of the resource.
- Headers
[]Prometheus
Connector Header Args Headers.
- Identifier string
Unique identifier of the resource.
- Name string
Name of the resource.
- Org
Id string Unique identifier of the Organization.
- Password
Ref string Password reference.
- Project
Id string Unique identifier of the Project.
- []string
Tags to associate with the resource. Tags should be in the form
name:value
.- Url string
Url of the Prometheus server.
- User
Name string User name.
- delegate
Selectors List<String> Connect using only the delegates which have these tags.
- description String
Description of the resource.
- headers
List<Prometheus
Connector Header Args> Headers.
- identifier String
Unique identifier of the resource.
- name String
Name of the resource.
- org
Id String Unique identifier of the Organization.
- password
Ref String Password reference.
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.- url String
Url of the Prometheus server.
- user
Name String User name.
- delegate
Selectors string[] Connect using only the delegates which have these tags.
- description string
Description of the resource.
- headers
Prometheus
Connector Header Args[] Headers.
- identifier string
Unique identifier of the resource.
- name string
Name of the resource.
- org
Id string Unique identifier of the Organization.
- password
Ref string Password reference.
- project
Id string Unique identifier of the Project.
- string[]
Tags to associate with the resource. Tags should be in the form
name:value
.- url string
Url of the Prometheus server.
- user
Name string User name.
- delegate_
selectors Sequence[str] Connect using only the delegates which have these tags.
- description str
Description of the resource.
- headers
Sequence[Prometheus
Connector Header Args] 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.
- 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.
- delegate
Selectors 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.
- org
Id String Unique identifier of the Organization.
- password
Ref String Password reference.
- project
Id String Unique identifier of the Project.
- List<String>
Tags to associate with the resource. Tags should be in the form
name:value
.- url String
Url of the Prometheus server.
- user
Name String User name.
Supporting Types
PrometheusConnectorHeader
- Key string
Key.
- Encrypted
Value stringRef Encrypted value reference.
- Value string
Value.
- Value
Encrypted bool Encrypted value.
- Key string
Key.
- Encrypted
Value stringRef Encrypted value reference.
- Value string
Value.
- Value
Encrypted bool Encrypted value.
- key String
Key.
- encrypted
Value StringRef Encrypted value reference.
- value String
Value.
- value
Encrypted Boolean Encrypted value.
- key string
Key.
- encrypted
Value stringRef Encrypted value reference.
- value string
Value.
- value
Encrypted boolean Encrypted value.
- key str
Key.
- encrypted_
value_ strref Encrypted value reference.
- value str
Value.
- value_
encrypted bool Encrypted value.
- key String
Key.
- encrypted
Value StringRef Encrypted value reference.
- value String
Value.
- value
Encrypted 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.