UNPKG

@pulumi/consul

Version:

A Pulumi package for creating and managing consul resources.

165 lines (164 loc) 5.98 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Starting with Consul 1.5.0, the consul.AclBindingRule resource can be used to managed Consul ACL binding rules. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as consul from "@pulumi/consul"; * * const minikube = new consul.AclAuthMethod("minikube", { * name: "minikube", * type: "kubernetes", * description: "dev minikube cluster", * config: { * Host: "https://192.0.2.42:8443", * CACert: `-----BEGIN CERTIFICATE----- * ...-----END CERTIFICATE----- * `, * ServiceAccountJWT: "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9...", * }, * }); * const test = new consul.AclBindingRule("test", { * authMethod: minikube.name, * description: "foobar", * selector: "serviceaccount.namespace==default", * bindType: "service", * bindName: "minikube", * }); * ``` */ export declare class AclBindingRule extends pulumi.CustomResource { /** * Get an existing AclBindingRule 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?: AclBindingRuleState, opts?: pulumi.CustomResourceOptions): AclBindingRule; /** * Returns true if the given object is an instance of AclBindingRule. 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 AclBindingRule; /** * The name of the ACL auth method this rule apply. */ readonly authMethod: pulumi.Output<string>; /** * The name to bind to a token at login-time. */ readonly bindName: pulumi.Output<string>; /** * Specifies the way the binding rule affects a token created at login. */ readonly bindType: pulumi.Output<string>; /** * The variables used when binding rule type is `templated-policy`. Can be lightly templated using HIL `${foo}` syntax from available field names. */ readonly bindVars: pulumi.Output<outputs.AclBindingRuleBindVars | undefined>; /** * A free form human readable description of the binding rule. */ readonly description: pulumi.Output<string | undefined>; /** * The namespace to create the binding rule within. */ readonly namespace: pulumi.Output<string | undefined>; /** * The partition the ACL binding rule is associated with. */ readonly partition: pulumi.Output<string | undefined>; /** * The expression used to match this rule against valid identities returned from an auth method validation. */ readonly selector: pulumi.Output<string | undefined>; /** * Create a AclBindingRule 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: AclBindingRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AclBindingRule resources. */ export interface AclBindingRuleState { /** * The name of the ACL auth method this rule apply. */ authMethod?: pulumi.Input<string>; /** * The name to bind to a token at login-time. */ bindName?: pulumi.Input<string>; /** * Specifies the way the binding rule affects a token created at login. */ bindType?: pulumi.Input<string>; /** * The variables used when binding rule type is `templated-policy`. Can be lightly templated using HIL `${foo}` syntax from available field names. */ bindVars?: pulumi.Input<inputs.AclBindingRuleBindVars>; /** * A free form human readable description of the binding rule. */ description?: pulumi.Input<string>; /** * The namespace to create the binding rule within. */ namespace?: pulumi.Input<string>; /** * The partition the ACL binding rule is associated with. */ partition?: pulumi.Input<string>; /** * The expression used to match this rule against valid identities returned from an auth method validation. */ selector?: pulumi.Input<string>; } /** * The set of arguments for constructing a AclBindingRule resource. */ export interface AclBindingRuleArgs { /** * The name of the ACL auth method this rule apply. */ authMethod: pulumi.Input<string>; /** * The name to bind to a token at login-time. */ bindName: pulumi.Input<string>; /** * Specifies the way the binding rule affects a token created at login. */ bindType: pulumi.Input<string>; /** * The variables used when binding rule type is `templated-policy`. Can be lightly templated using HIL `${foo}` syntax from available field names. */ bindVars?: pulumi.Input<inputs.AclBindingRuleBindVars>; /** * A free form human readable description of the binding rule. */ description?: pulumi.Input<string>; /** * The namespace to create the binding rule within. */ namespace?: pulumi.Input<string>; /** * The partition the ACL binding rule is associated with. */ partition?: pulumi.Input<string>; /** * The expression used to match this rule against valid identities returned from an auth method validation. */ selector?: pulumi.Input<string>; }