Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.gkehub.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.gkehub.FleetArgs.builder
import com.pulumi.gcp.gkehub.kotlin.inputs.FleetDefaultClusterConfigArgs
import com.pulumi.gcp.gkehub.kotlin.inputs.FleetDefaultClusterConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Fleet contains information about a group of clusters.
* To get more information about Fleet, see:
* * [API documentation](https://cloud.google.com/anthos/multicluster-management/reference/rest/v1/projects.locations.fleets)
* * How-to Guides
* * [Registering a Cluster to a Fleet](https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster#register_cluster)
* ## Example Usage
* ### Gkehub Fleet Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.gkehub.Fleet("default", {
* displayName: "my production fleet",
* defaultClusterConfig: {
* securityPostureConfig: {
* mode: "DISABLED",
* vulnerabilityMode: "VULNERABILITY_DISABLED",
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.gkehub.Fleet("default",
* display_name="my production fleet",
* default_cluster_config={
* "security_posture_config": {
* "mode": "DISABLED",
* "vulnerability_mode": "VULNERABILITY_DISABLED",
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.GkeHub.Fleet("default", new()
* {
* DisplayName = "my production fleet",
* DefaultClusterConfig = new Gcp.GkeHub.Inputs.FleetDefaultClusterConfigArgs
* {
* SecurityPostureConfig = new Gcp.GkeHub.Inputs.FleetDefaultClusterConfigSecurityPostureConfigArgs
* {
* Mode = "DISABLED",
* VulnerabilityMode = "VULNERABILITY_DISABLED",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkehub"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := gkehub.NewFleet(ctx, "default", &gkehub.FleetArgs{
* DisplayName: pulumi.String("my production fleet"),
* DefaultClusterConfig: &gkehub.FleetDefaultClusterConfigArgs{
* SecurityPostureConfig: &gkehub.FleetDefaultClusterConfigSecurityPostureConfigArgs{
* Mode: pulumi.String("DISABLED"),
* VulnerabilityMode: pulumi.String("VULNERABILITY_DISABLED"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.gkehub.Fleet;
* import com.pulumi.gcp.gkehub.FleetArgs;
* import com.pulumi.gcp.gkehub.inputs.FleetDefaultClusterConfigArgs;
* import com.pulumi.gcp.gkehub.inputs.FleetDefaultClusterConfigSecurityPostureConfigArgs;
* 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 default_ = new Fleet("default", FleetArgs.builder()
* .displayName("my production fleet")
* .defaultClusterConfig(FleetDefaultClusterConfigArgs.builder()
* .securityPostureConfig(FleetDefaultClusterConfigSecurityPostureConfigArgs.builder()
* .mode("DISABLED")
* .vulnerabilityMode("VULNERABILITY_DISABLED")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:gkehub:Fleet
* properties:
* displayName: my production fleet
* defaultClusterConfig:
* securityPostureConfig:
* mode: DISABLED
* vulnerabilityMode: VULNERABILITY_DISABLED
* ```
*
* ## Import
* Fleet can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/global/fleets/default`
* * `{{project}}`
* When using the `pulumi import` command, Fleet can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:gkehub/fleet:Fleet default projects/{{project}}/locations/global/fleets/default
* ```
* ```sh
* $ pulumi import gcp:gkehub/fleet:Fleet default {{project}}
* ```
* @property defaultClusterConfig The default cluster configurations to apply across the fleet.
* Structure is documented below.
* @property displayName A user-assigned display name of the Fleet. When present, it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class FleetArgs(
public val defaultClusterConfig: Output? = null,
public val displayName: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.gkehub.FleetArgs = com.pulumi.gcp.gkehub.FleetArgs.builder()
.defaultClusterConfig(
defaultClusterConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.displayName(displayName?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [FleetArgs].
*/
@PulumiTagMarker
public class FleetArgsBuilder internal constructor() {
private var defaultClusterConfig: Output? = null
private var displayName: Output? = null
private var project: Output? = null
/**
* @param value The default cluster configurations to apply across the fleet.
* Structure is documented below.
*/
@JvmName("fafdydlmntxaiujt")
public suspend fun defaultClusterConfig(`value`: Output) {
this.defaultClusterConfig = value
}
/**
* @param value A user-assigned display name of the Fleet. When present, it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.
*/
@JvmName("seaiwfcuhueyujky")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("dqgolhuadufeutbj")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The default cluster configurations to apply across the fleet.
* Structure is documented below.
*/
@JvmName("lieguqkglwhyubjl")
public suspend fun defaultClusterConfig(`value`: FleetDefaultClusterConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultClusterConfig = mapped
}
/**
* @param argument The default cluster configurations to apply across the fleet.
* Structure is documented below.
*/
@JvmName("atrvmmvxtigllaun")
public suspend fun defaultClusterConfig(argument: suspend FleetDefaultClusterConfigArgsBuilder.() -> Unit) {
val toBeMapped = FleetDefaultClusterConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.defaultClusterConfig = mapped
}
/**
* @param value A user-assigned display name of the Fleet. When present, it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point.
*/
@JvmName("nnlbnbuhdwuwqoel")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("jlbxjhuhnkujgxsl")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): FleetArgs = FleetArgs(
defaultClusterConfig = defaultClusterConfig,
displayName = displayName,
project = project,
)
}