UNPKG

@pulumi/consul

Version:

A Pulumi package for creating and managing consul resources.

198 lines (197 loc) 7.2 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as consul from "@pulumi/consul"; * * const myappConfig = new consul.KeyPrefix("myapp_config", { * datacenter: "nyc1", * token: "abcd", * pathPrefix: "myapp/config/", * subkeys: { * elb_cname: appAwsElb.dnsName, * s3_bucket_name: appAwsS3Bucket.bucket, * "database/hostname": app.address, * "database/port": app.port, * "database/username": app.username, * "database/name": app.name, * }, * subkeyCollection: [{ * path: "database/password", * value: app.password, * flags: 2, * }], * }); * ``` * * ## Import * * `consul_key_prefix` can be imported. This is useful when the path already exists and * you know all keys in path should be managed by Terraform. * * ```sh * $ pulumi import consul:index/keyPrefix:KeyPrefix myapp_config myapp/config/ * ``` */ export declare class KeyPrefix extends pulumi.CustomResource { /** * Get an existing KeyPrefix resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: KeyPrefixState, opts?: pulumi.CustomResourceOptions): KeyPrefix; /** * Returns true if the given object is an instance of KeyPrefix. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is KeyPrefix; /** * The datacenter to use. This overrides the * agent's default datacenter and the datacenter in the provider setup. */ readonly datacenter: pulumi.Output<string>; /** * The namespace to create the keys within. */ readonly namespace: pulumi.Output<string | undefined>; /** * The admin partition to create the keys within. */ readonly partition: pulumi.Output<string | undefined>; /** * Specifies the common prefix shared by all keys * that will be managed by this resource instance. In most cases this will * end with a slash, to manage a "folder" of keys. */ readonly pathPrefix: pulumi.Output<string>; /** * A subkey to add. Supported values documented below. * Multiple blocks supported. */ readonly subkeyCollection: pulumi.Output<outputs.KeyPrefixSubkeyCollection[] | undefined>; /** * A mapping from subkey name (which will be appended * to the given `pathPrefix`) to the value that should be stored at that key. * Use slashes, as shown in the above example, to create "sub-folders" under * the given path prefix. */ readonly subkeys: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The ACL token to use. This overrides the * token that the agent provides by default. * * @deprecated The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration */ readonly token: pulumi.Output<string | undefined>; /** * Create a KeyPrefix resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: KeyPrefixArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KeyPrefix resources. */ export interface KeyPrefixState { /** * The datacenter to use. This overrides the * agent's default datacenter and the datacenter in the provider setup. */ datacenter?: pulumi.Input<string>; /** * The namespace to create the keys within. */ namespace?: pulumi.Input<string>; /** * The admin partition to create the keys within. */ partition?: pulumi.Input<string>; /** * Specifies the common prefix shared by all keys * that will be managed by this resource instance. In most cases this will * end with a slash, to manage a "folder" of keys. */ pathPrefix?: pulumi.Input<string>; /** * A subkey to add. Supported values documented below. * Multiple blocks supported. */ subkeyCollection?: pulumi.Input<pulumi.Input<inputs.KeyPrefixSubkeyCollection>[]>; /** * A mapping from subkey name (which will be appended * to the given `pathPrefix`) to the value that should be stored at that key. * Use slashes, as shown in the above example, to create "sub-folders" under * the given path prefix. */ subkeys?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ACL token to use. This overrides the * token that the agent provides by default. * * @deprecated The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration */ token?: pulumi.Input<string>; } /** * The set of arguments for constructing a KeyPrefix resource. */ export interface KeyPrefixArgs { /** * The datacenter to use. This overrides the * agent's default datacenter and the datacenter in the provider setup. */ datacenter?: pulumi.Input<string>; /** * The namespace to create the keys within. */ namespace?: pulumi.Input<string>; /** * The admin partition to create the keys within. */ partition?: pulumi.Input<string>; /** * Specifies the common prefix shared by all keys * that will be managed by this resource instance. In most cases this will * end with a slash, to manage a "folder" of keys. */ pathPrefix: pulumi.Input<string>; /** * A subkey to add. Supported values documented below. * Multiple blocks supported. */ subkeyCollection?: pulumi.Input<pulumi.Input<inputs.KeyPrefixSubkeyCollection>[]>; /** * A mapping from subkey name (which will be appended * to the given `pathPrefix`) to the value that should be stored at that key. * Use slashes, as shown in the above example, to create "sub-folders" under * the given path prefix. */ subkeys?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The ACL token to use. This overrides the * token that the agent provides by default. * * @deprecated The token argument has been deprecated and will be removed in a future release. Please use the token argument in the provider configuration */ token?: pulumi.Input<string>; }