import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Feature represents the settings and status of any Hub Feature. * * To get more information about Feature, see: * * * [API documentation](https://cloud.google.com/anthos/fleet-management/docs/reference/rest/v1/projects.locations.features) * * How-to Guides * * [Registering a Cluster](https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster#register_cluster) * * ## Example Usage * * ### Gkehub Feature Multi Cluster Ingress * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cluster = new gcp.container.Cluster("cluster", { * name: "my-cluster", * location: "us-central1-a", * initialNodeCount: 1, * }); * const membership = new gcp.gkehub.Membership("membership", { * membershipId: "my-membership", * endpoint: { * gkeCluster: { * resourceLink: pulumi.interpolate`//container.googleapis.com/${cluster.id}`, * }, * }, * }); * const feature = new gcp.gkehub.Feature("feature", { * name: "multiclusteringress", * location: "global", * spec: { * multiclusteringress: { * configMembership: membership.id, * }, * }, * }); * ``` * ### Gkehub Feature Multi Cluster Service Discovery * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "multiclusterservicediscovery", * location: "global", * labels: { * foo: "bar", * }, * }); * ``` * ### Gkehub Feature Anthos Service Mesh * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "servicemesh", * location: "global", * }); * ``` * ### Enable Fleet Observability For Default Logs With Copy * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "fleetobservability", * location: "global", * spec: { * fleetobservability: { * loggingConfig: { * defaultConfig: { * mode: "COPY", * }, * }, * }, * }, * }); * ``` * ### Enable Fleet Observability For Scope Logs With Move * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "fleetobservability", * location: "global", * spec: { * fleetobservability: { * loggingConfig: { * fleetScopeLogsConfig: { * mode: "MOVE", * }, * }, * }, * }, * }); * ``` * ### Enable Fleet Observability For Both Default And Scope Logs * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "fleetobservability", * location: "global", * spec: { * fleetobservability: { * loggingConfig: { * defaultConfig: { * mode: "COPY", * }, * fleetScopeLogsConfig: { * mode: "MOVE", * }, * }, * }, * }, * }); * ``` * ### Enable Fleet Default Member Config Service Mesh * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "servicemesh", * location: "global", * fleetDefaultMemberConfig: { * mesh: { * management: "MANAGEMENT_AUTOMATIC", * }, * }, * }); * ``` * ### Enable Fleet Default Member Config Configmanagement * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "configmanagement", * location: "global", * fleetDefaultMemberConfig: { * configmanagement: { * configSync: { * git: { * syncRepo: "https://github.com/hashicorp/terraform", * }, * }, * }, * }, * }); * ``` * ### Enable Fleet Default Member Config Policycontroller * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "policycontroller", * location: "global", * fleetDefaultMemberConfig: { * policycontroller: { * policyControllerHubConfig: { * installSpec: "INSTALL_SPEC_ENABLED", * exemptableNamespaces: ["foo"], * policyContent: { * bundles: [{ * bundle: "policy-essentials-v2022", * exemptedNamespaces: [ * "foo", * "bar", * ], * }], * templateLibrary: { * installation: "ALL", * }, * }, * auditIntervalSeconds: 30, * referentialRulesEnabled: true, * }, * }, * }, * }); * ``` * ### Enable Fleet Default Member Config Policycontroller Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "policycontroller", * location: "global", * fleetDefaultMemberConfig: { * policycontroller: { * policyControllerHubConfig: { * installSpec: "INSTALL_SPEC_SUSPENDED", * policyContent: { * bundles: [ * { * bundle: "pci-dss-v3.2.1", * exemptedNamespaces: [ * "baz", * "bar", * ], * }, * { * bundle: "nist-sp-800-190", * exemptedNamespaces: [], * }, * ], * templateLibrary: { * installation: "ALL", * }, * }, * constraintViolationLimit: 50, * referentialRulesEnabled: true, * logDeniesEnabled: true, * mutationEnabled: true, * deploymentConfigs: [ * { * component: "admission", * replicaCount: 2, * podAffinity: "ANTI_AFFINITY", * }, * { * component: "audit", * containerResources: { * limits: { * memory: "1Gi", * cpu: "1.5", * }, * requests: { * memory: "500Mi", * cpu: "150m", * }, * }, * podTolerations: [{ * key: "key1", * operator: "Equal", * value: "value1", * effect: "NoSchedule", * }], * }, * ], * monitoring: { * backends: ["PROMETHEUS"], * }, * }, * }, * }, * }); * ``` * ### Enable Fleet Default Member Config Policycontroller Minimal * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "policycontroller", * location: "global", * fleetDefaultMemberConfig: { * policycontroller: { * policyControllerHubConfig: { * installSpec: "INSTALL_SPEC_ENABLED", * policyContent: {}, * constraintViolationLimit: 50, * referentialRulesEnabled: true, * logDeniesEnabled: true, * mutationEnabled: true, * deploymentConfigs: [{ * component: "admission", * }], * monitoring: {}, * }, * }, * }, * }); * ``` * ### Gkehub Feature Clusterupgrade * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "clusterupgrade", * location: "global", * spec: { * clusterupgrade: { * upstreamFleets: [], * postConditions: { * soaking: "60s", * }, * }, * }, * }); * ``` * ### Gkehub Feature Rbacrolebinding Actuation * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const feature = new gcp.gkehub.Feature("feature", { * name: "rbacrolebindingactuation", * location: "global", * spec: { * rbacrolebindingactuation: { * allowedCustomRoles: [ * "custom-role1", * "custom-role2", * "custom-role3", * ], * }, * }, * }); * ``` * * ## Import * * Feature can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/features/{{name}}` * * `{{project}}/{{location}}/{{name}}` * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Feature can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:gkehub/feature:Feature default projects/{{project}}/locations/{{location}}/features/{{name}} * $ pulumi import gcp:gkehub/feature:Feature default {{project}}/{{location}}/{{name}} * $ pulumi import gcp:gkehub/feature:Feature default {{location}}/{{name}} * ``` */ export declare class Feature extends pulumi.CustomResource { /** * Get an existing Feature 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, state?: FeatureState, opts?: pulumi.CustomResourceOptions): Feature; /** * Returns true if the given object is an instance of Feature. 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 Feature; /** * Output only. When the Feature resource was created. */ readonly createTime: pulumi.Output; /** * Output only. When the Feature resource was deleted. */ readonly deleteTime: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Optional. Fleet Default Membership Configuration. * Structure is documented below. */ readonly fleetDefaultMemberConfig: pulumi.Output; /** * GCP labels for this Feature. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The location for the resource */ readonly location: pulumi.Output; /** * The full, unique name of this Feature resource */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * State of the Feature resource itself. * Structure is documented below. */ readonly resourceStates: pulumi.Output; /** * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. * Structure is documented below. */ readonly spec: pulumi.Output; /** * (Output) * Output only. The "running state" of the Feature in this Hub. * Structure is documented below. */ readonly states: pulumi.Output; /** * (Output) * The time this status and any related Feature-specific details were updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z" */ readonly updateTime: pulumi.Output; /** * Create a Feature 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: FeatureArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Feature resources. */ export interface FeatureState { /** * Output only. When the Feature resource was created. */ createTime?: pulumi.Input; /** * Output only. When the Feature resource was deleted. */ deleteTime?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Optional. Fleet Default Membership Configuration. * Structure is documented below. */ fleetDefaultMemberConfig?: pulumi.Input; /** * GCP labels for this Feature. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location for the resource */ location?: pulumi.Input; /** * The full, unique name of this Feature resource */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * State of the Feature resource itself. * Structure is documented below. */ resourceStates?: pulumi.Input[]>; /** * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. * Structure is documented below. */ spec?: pulumi.Input; /** * (Output) * Output only. The "running state" of the Feature in this Hub. * Structure is documented below. */ states?: pulumi.Input[]>; /** * (Output) * The time this status and any related Feature-specific details were updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z" */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Feature resource. */ export interface FeatureArgs { /** * Optional. Fleet Default Membership Configuration. * Structure is documented below. */ fleetDefaultMemberConfig?: pulumi.Input; /** * GCP labels for this Feature. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The location for the resource */ location: pulumi.Input; /** * The full, unique name of this Feature resource */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. * Structure is documented below. */ spec?: pulumi.Input; }