AzureNodePoolArgs

data class AzureNodePoolArgs(val annotations: Output<Map<String, String>>? = null, val autoscaling: Output<AzureNodePoolAutoscalingArgs>? = null, val azureAvailabilityZone: Output<String>? = null, val cluster: Output<String>? = null, val config: Output<AzureNodePoolConfigArgs>? = null, val location: Output<String>? = null, val management: Output<AzureNodePoolManagementArgs>? = null, val maxPodsConstraint: Output<AzureNodePoolMaxPodsConstraintArgs>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val subnetId: Output<String>? = null, val version: Output<String>? = null) : ConvertibleToJava<AzureNodePoolArgs>

An Anthos node pool running on Azure. For more information, see:

Example Usage

Basic_azure_node_pool

A basic example of a containerazure azure node pool

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.ContainerFunctions;
import com.pulumi.gcp.container.inputs.GetAzureVersionsArgs;
import com.pulumi.gcp.container.AzureClient;
import com.pulumi.gcp.container.AzureClientArgs;
import com.pulumi.gcp.container.AzureCluster;
import com.pulumi.gcp.container.AzureClusterArgs;
import com.pulumi.gcp.container.inputs.AzureClusterAuthorizationArgs;
import com.pulumi.gcp.container.inputs.AzureClusterControlPlaneArgs;
import com.pulumi.gcp.container.inputs.AzureClusterControlPlaneSshConfigArgs;
import com.pulumi.gcp.container.inputs.AzureClusterFleetArgs;
import com.pulumi.gcp.container.inputs.AzureClusterNetworkingArgs;
import com.pulumi.gcp.container.AzureNodePool;
import com.pulumi.gcp.container.AzureNodePoolArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolAutoscalingArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolConfigArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolConfigSshConfigArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolConfigProxyConfigArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolConfigRootVolumeArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolMaxPodsConstraintArgs;
import com.pulumi.gcp.container.inputs.AzureNodePoolManagementArgs;
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) {
final var versions = ContainerFunctions.getAzureVersions(GetAzureVersionsArgs.builder()
.project("my-project-name")
.location("us-west1")
.build());
var basic = new AzureClient("basic", AzureClientArgs.builder()
.applicationId("12345678-1234-1234-1234-123456789111")
.location("us-west1")
.tenantId("12345678-1234-1234-1234-123456789111")
.project("my-project-name")
.build());
var primaryAzureCluster = new AzureCluster("primaryAzureCluster", AzureClusterArgs.builder()
.authorization(AzureClusterAuthorizationArgs.builder()
.adminUsers(AzureClusterAuthorizationAdminUserArgs.builder()
.username("mmv2@google.com")
.build())
.build())
.azureRegion("westus2")
.client(basic.name().applyValue(name -> String.format("projects/my-project-number/locations/us-west1/azureClients/%s", name)))
.controlPlane(AzureClusterControlPlaneArgs.builder()
.sshConfig(AzureClusterControlPlaneSshConfigArgs.builder()
.authorizedKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8yaayO6lnb2v+SedxUMa2c8vtIEzCzBjM3EJJsv8Vm9zUDWR7dXWKoNGARUb2mNGXASvI6mFIDXTIlkQ0poDEPpMaXR0g2cb5xT8jAAJq7fqXL3+0rcJhY/uigQ+MrT6s+ub0BFVbsmGHNrMQttXX9gtmwkeAEvj3mra9e5pkNf90qlKnZz6U0SVArxVsLx07vHPHDIYrl0OPG4zUREF52igbBPiNrHJFDQJT/4YlDMJmo/QT/A1D6n9ocemvZSzhRx15/Arjowhr+VVKSbaxzPtEfY0oIg2SrqJnnr/l3Du5qIefwh5VmCZe4xopPUaDDoOIEFriZ88sB+3zz8ib8sk8zJJQCgeP78tQvXCgS+4e5W3TUg9mxjB6KjXTyHIVhDZqhqde0OI3Fy1UuVzRUwnBaLjBnAwP5EoFQGRmDYk/rEYe7HTmovLeEBUDQocBQKT4Ripm/xJkkWY7B07K/tfo56dGUCkvyIVXKBInCh+dLK7gZapnd4UWkY0xBYcwo1geMLRq58iFTLA2j/JmpmHXp7m0l7jJii7d44uD3tTIFYThn7NlOnvhLim/YcBK07GMGIN7XwrrKZKmxXaspw6KBWVhzuw1UPxctxshYEaMLfFg/bwOw8HvMPr9VtrElpSB7oiOh91PDIPdPBgHCi7N2QgQ5l/ZDBHieSpNrQ== thomasrodgers")
.build())
.subnetId("/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet/subnets/default")
.version(versions.applyValue(getAzureVersionsResult -> getAzureVersionsResult.validVersions()[0]))
.build())
.fleet(AzureClusterFleetArgs.builder()
.project("my-project-number")
.build())
.location("us-west1")
.networking(AzureClusterNetworkingArgs.builder()
.podAddressCidrBlocks("10.200.0.0/16")
.serviceAddressCidrBlocks("10.32.0.0/24")
.virtualNetworkId("/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet")
.build())
.resourceGroupId("/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-cluster")
.project("my-project-name")
.build());
var primaryAzureNodePool = new AzureNodePool("primaryAzureNodePool", AzureNodePoolArgs.builder()
.autoscaling(AzureNodePoolAutoscalingArgs.builder()
.maxNodeCount(3)
.minNodeCount(2)
.build())
.cluster(primaryAzureCluster.name())
.config(AzureNodePoolConfigArgs.builder()
.sshConfig(AzureNodePoolConfigSshConfigArgs.builder()
.authorizedKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8yaayO6lnb2v+SedxUMa2c8vtIEzCzBjM3EJJsv8Vm9zUDWR7dXWKoNGARUb2mNGXASvI6mFIDXTIlkQ0poDEPpMaXR0g2cb5xT8jAAJq7fqXL3+0rcJhY/uigQ+MrT6s+ub0BFVbsmGHNrMQttXX9gtmwkeAEvj3mra9e5pkNf90qlKnZz6U0SVArxVsLx07vHPHDIYrl0OPG4zUREF52igbBPiNrHJFDQJT/4YlDMJmo/QT/A1D6n9ocemvZSzhRx15/Arjowhr+VVKSbaxzPtEfY0oIg2SrqJnnr/l3Du5qIefwh5VmCZe4xopPUaDDoOIEFriZ88sB+3zz8ib8sk8zJJQCgeP78tQvXCgS+4e5W3TUg9mxjB6KjXTyHIVhDZqhqde0OI3Fy1UuVzRUwnBaLjBnAwP5EoFQGRmDYk/rEYe7HTmovLeEBUDQocBQKT4Ripm/xJkkWY7B07K/tfo56dGUCkvyIVXKBInCh+dLK7gZapnd4UWkY0xBYcwo1geMLRq58iFTLA2j/JmpmHXp7m0l7jJii7d44uD3tTIFYThn7NlOnvhLim/YcBK07GMGIN7XwrrKZKmxXaspw6KBWVhzuw1UPxctxshYEaMLfFg/bwOw8HvMPr9VtrElpSB7oiOh91PDIPdPBgHCi7N2QgQ5l/ZDBHieSpNrQ== thomasrodgers")
.build())
.proxyConfig(AzureNodePoolConfigProxyConfigArgs.builder()
.resourceGroupId("/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-cluster")
.secretId("https://my--dev-keyvault.vault.azure.net/secrets/my--dev-secret/0000000000000000000000000000000000")
.build())
.rootVolume(AzureNodePoolConfigRootVolumeArgs.builder()
.sizeGib(32)
.build())
.tags(Map.of("owner", "mmv2"))
.vmSize("Standard_DS2_v2")
.build())
.location("us-west1")
.maxPodsConstraint(AzureNodePoolMaxPodsConstraintArgs.builder()
.maxPodsPerNode(110)
.build())
.subnetId("/subscriptions/12345678-1234-1234-1234-123456789111/resourceGroups/my--dev-byo/providers/Microsoft.Network/virtualNetworks/my--dev-vnet/subnets/default")
.version(versions.applyValue(getAzureVersionsResult -> getAzureVersionsResult.validVersions()[0]))
.annotations(Map.of("annotation-one", "value-one"))
.management(AzureNodePoolManagementArgs.builder()
.autoRepair(true)
.build())
.project("my-project-name")
.build());
}
}

Import

NodePool can be imported using any of these accepted formats

$ pulumi import gcp:container/azureNodePool:AzureNodePool default projects/{{project}}/locations/{{location}}/azureClusters/{{cluster}}/azureNodePools/{{name}}
$ pulumi import gcp:container/azureNodePool:AzureNodePool default {{project}}/{{location}}/{{cluster}}/{{name}}
$ pulumi import gcp:container/azureNodePool:AzureNodePool default {{location}}/{{cluster}}/{{name}}

Constructors

Link copied to clipboard
constructor(annotations: Output<Map<String, String>>? = null, autoscaling: Output<AzureNodePoolAutoscalingArgs>? = null, azureAvailabilityZone: Output<String>? = null, cluster: Output<String>? = null, config: Output<AzureNodePoolConfigArgs>? = null, location: Output<String>? = null, management: Output<AzureNodePoolManagementArgs>? = null, maxPodsConstraint: Output<AzureNodePoolMaxPodsConstraintArgs>? = null, name: Output<String>? = null, project: Output<String>? = null, subnetId: Output<String>? = null, version: Output<String>? = null)

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>? = null

Optional. Annotations on the node pool. This field has the same restrictions as Kubernetes annotations. The total size of all keys and values combined is limited to 256k. Keys can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.

Link copied to clipboard

Autoscaler configuration for this node pool.

Link copied to clipboard
val azureAvailabilityZone: Output<String>? = null

Optional. The Azure availability zone of the nodes in this nodepool. When unspecified, it defaults to 1.

Link copied to clipboard
val cluster: Output<String>? = null

The azureCluster for the resource

Link copied to clipboard
val config: Output<AzureNodePoolConfigArgs>? = null

The node configuration of the node pool.

Link copied to clipboard
val location: Output<String>? = null

The location for the resource

Link copied to clipboard

The Management configuration for this node pool.

Link copied to clipboard

The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool.

Link copied to clipboard
val name: Output<String>? = null

The name of this resource.

Link copied to clipboard
val project: Output<String>? = null

The project for the resource

Link copied to clipboard
val subnetId: Output<String>? = null

The ARM ID of the subnet where the node pool VMs run. Make sure it's a subnet under the virtual network in the cluster configuration.

Link copied to clipboard
val version: Output<String>? = null

The Kubernetes version (e.g. 1.19.10-gke.1000) running on this node pool.

Functions

Link copied to clipboard
open override fun toJava(): AzureNodePoolArgs