com.pulumi.azure.containerservice.kotlin.FleetMember.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.containerservice.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [FleetMember].
*/
@PulumiTagMarker
public class FleetMemberResourceBuilder internal constructor() {
public var name: String? = null
public var args: FleetMemberArgs = FleetMemberArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend FleetMemberArgsBuilder.() -> Unit) {
val builder = FleetMemberArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): FleetMember {
val builtJavaResource = com.pulumi.azure.containerservice.FleetMember(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return FleetMember(builtJavaResource)
}
}
/**
*
* Manages a Kubernetes Fleet Member.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const example = new azure.containerservice.KubernetesCluster("example", {
* name: "example",
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.name,
* dnsPrefix: "acctestaksexample",
* defaultNodePool: {
* name: "example-value",
* nodeCount: "example-value",
* vmSize: "example-value",
* upgradeSettings: {
* maxSurge: "example-value",
* },
* },
* identity: {
* type: "example-value",
* },
* });
* const exampleKubernetesFleetManager = new azure.containerservice.KubernetesFleetManager("example", {
* name: "example",
* location: exampleResourceGroup.location,
* resourceGroupName: exampleResourceGroup.name,
* });
* const exampleFleetMember = new azure.containerservice.FleetMember("example", {
* kubernetesClusterId: example.id,
* kubernetesFleetId: exampleKubernetesFleetManager.id,
* name: "example",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example = azure.containerservice.KubernetesCluster("example",
* name="example",
* location=example_resource_group.location,
* resource_group_name=example_resource_group.name,
* dns_prefix="acctestaksexample",
* default_node_pool=azure.containerservice.KubernetesClusterDefaultNodePoolArgs(
* name="example-value",
* node_count="example-value",
* vm_size="example-value",
* upgrade_settings=azure.containerservice.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs(
* max_surge="example-value",
* ),
* ),
* identity=azure.containerservice.KubernetesClusterIdentityArgs(
* type="example-value",
* ))
* example_kubernetes_fleet_manager = azure.containerservice.KubernetesFleetManager("example",
* name="example",
* location=example_resource_group.location,
* resource_group_name=example_resource_group.name)
* example_fleet_member = azure.containerservice.FleetMember("example",
* kubernetes_cluster_id=example.id,
* kubernetes_fleet_id=example_kubernetes_fleet_manager.id,
* name="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var example = new Azure.ContainerService.KubernetesCluster("example", new()
* {
* Name = "example",
* Location = exampleResourceGroup.Location,
* ResourceGroupName = exampleResourceGroup.Name,
* DnsPrefix = "acctestaksexample",
* DefaultNodePool = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolArgs
* {
* Name = "example-value",
* NodeCount = "example-value",
* VmSize = "example-value",
* UpgradeSettings = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs
* {
* MaxSurge = "example-value",
* },
* },
* Identity = new Azure.ContainerService.Inputs.KubernetesClusterIdentityArgs
* {
* Type = "example-value",
* },
* });
* var exampleKubernetesFleetManager = new Azure.ContainerService.KubernetesFleetManager("example", new()
* {
* Name = "example",
* Location = exampleResourceGroup.Location,
* ResourceGroupName = exampleResourceGroup.Name,
* });
* var exampleFleetMember = new Azure.ContainerService.FleetMember("example", new()
* {
* KubernetesClusterId = example.Id,
* KubernetesFleetId = exampleKubernetesFleetManager.Id,
* Name = "example",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* example, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
* Name: pulumi.String("example"),
* Location: exampleResourceGroup.Location,
* ResourceGroupName: exampleResourceGroup.Name,
* DnsPrefix: pulumi.String("acctestaksexample"),
* DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
* Name: pulumi.String("example-value"),
* NodeCount: pulumi.Int("example-value"),
* VmSize: pulumi.String("example-value"),
* UpgradeSettings: &containerservice.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs{
* MaxSurge: pulumi.String("example-value"),
* },
* },
* Identity: &containerservice.KubernetesClusterIdentityArgs{
* Type: pulumi.String("example-value"),
* },
* })
* if err != nil {
* return err
* }
* exampleKubernetesFleetManager, err := containerservice.NewKubernetesFleetManager(ctx, "example", &containerservice.KubernetesFleetManagerArgs{
* Name: pulumi.String("example"),
* Location: exampleResourceGroup.Location,
* ResourceGroupName: exampleResourceGroup.Name,
* })
* if err != nil {
* return err
* }
* _, err = containerservice.NewFleetMember(ctx, "example", &containerservice.FleetMemberArgs{
* KubernetesClusterId: example.ID(),
* KubernetesFleetId: exampleKubernetesFleetManager.ID(),
* Name: pulumi.String("example"),
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.containerservice.KubernetesCluster;
* import com.pulumi.azure.containerservice.KubernetesClusterArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolUpgradeSettingsArgs;
* import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
* import com.pulumi.azure.containerservice.KubernetesFleetManager;
* import com.pulumi.azure.containerservice.KubernetesFleetManagerArgs;
* import com.pulumi.azure.containerservice.FleetMember;
* import com.pulumi.azure.containerservice.FleetMemberArgs;
* 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
* .name("example")
* .location(exampleResourceGroup.location())
* .resourceGroupName(exampleResourceGroup.name())
* .dnsPrefix("acctestaksexample")
* .defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
* .name("example-value")
* .nodeCount("example-value")
* .vmSize("example-value")
* .upgradeSettings(KubernetesClusterDefaultNodePoolUpgradeSettingsArgs.builder()
* .maxSurge("example-value")
* .build())
* .build())
* .identity(KubernetesClusterIdentityArgs.builder()
* .type("example-value")
* .build())
* .build());
* var exampleKubernetesFleetManager = new KubernetesFleetManager("exampleKubernetesFleetManager", KubernetesFleetManagerArgs.builder()
* .name("example")
* .location(exampleResourceGroup.location())
* .resourceGroupName(exampleResourceGroup.name())
* .build());
* var exampleFleetMember = new FleetMember("exampleFleetMember", FleetMemberArgs.builder()
* .kubernetesClusterId(example.id())
* .kubernetesFleetId(exampleKubernetesFleetManager.id())
* .name("example")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:containerservice:KubernetesCluster
* properties:
* name: example
* location: ${exampleResourceGroup.location}
* resourceGroupName: ${exampleResourceGroup.name}
* dnsPrefix: acctestaksexample
* defaultNodePool:
* name: example-value
* nodeCount: example-value
* vmSize: example-value
* upgradeSettings:
* maxSurge: example-value
* identity:
* type: example-value
* exampleKubernetesFleetManager:
* type: azure:containerservice:KubernetesFleetManager
* name: example
* properties:
* name: example
* location: ${exampleResourceGroup.location}
* resourceGroupName: ${exampleResourceGroup.name}
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleFleetMember:
* type: azure:containerservice:FleetMember
* name: example
* properties:
* kubernetesClusterId: ${example.id}
* kubernetesFleetId: ${exampleKubernetesFleetManager.id}
* name: example
* ```
*
* ## Import
* An existing Kubernetes Fleet Member can be imported into Terraform using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:containerservice/fleetMember:FleetMember example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{memberName}
* ```
* * Where `{subscriptionId}` is the ID of the Azure Subscription where the Kubernetes Fleet Member exists. For example `12345678-1234-9876-4563-123456789012`.
* * Where `{resourceGroupName}` is the name of Resource Group where this Kubernetes Fleet Member exists. For example `example-resource-group`.
* * Where `{fleetName}` is the name of the Fleet. For example `fleetValue`.
* * Where `{memberName}` is the name of the Member. For example `memberValue`.
*/
public class FleetMember internal constructor(
override val javaResource: com.pulumi.azure.containerservice.FleetMember,
) : KotlinCustomResource(javaResource, FleetMemberMapper) {
/**
* The group this member belongs to for multi-cluster update management.
*/
public val group: Output?
get() = javaResource.group().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ARM resource ID of the cluster that joins the Fleet. Changing this forces a new Kubernetes Fleet Member to be created.
*/
public val kubernetesClusterId: Output
get() = javaResource.kubernetesClusterId().applyValue({ args0 -> args0 })
/**
* Specifies the Kubernetes Fleet Id within which this Kubernetes Fleet Member should exist. Changing this forces a new Kubernetes Fleet Member to be created.
*/
public val kubernetesFleetId: Output
get() = javaResource.kubernetesFleetId().applyValue({ args0 -> args0 })
/**
* Specifies the name of this Kubernetes Fleet Member. Changing this forces a new Kubernetes Fleet Member to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
}
public object FleetMemberMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.containerservice.FleetMember::class == javaResource::class
override fun map(javaResource: Resource): FleetMember = FleetMember(
javaResource as
com.pulumi.azure.containerservice.FleetMember,
)
}
/**
* @see [FleetMember].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [FleetMember].
*/
public suspend fun fleetMember(name: String, block: suspend FleetMemberResourceBuilder.() -> Unit):
FleetMember {
val builder = FleetMemberResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [FleetMember].
* @param name The _unique_ name of the resulting resource.
*/
public fun fleetMember(name: String): FleetMember {
val builder = FleetMemberResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy