Class AzureNodePool


  • public class AzureNodePool
    extends com.pulumi.resources.CustomResource
    An Anthos node pool running on Azure. For more information, see: * [Multicloud overview](https://cloud.google.com/anthos/clusters/docs/multi-cloud) ## Example Usage ### Basic_azure_node_pool A basic example of a containerazure azure node pool ```java 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 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("[email protected]") .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")) .project("my-project-name") .build()); } } ``` ## Import NodePool can be imported using any of these accepted formats ```sh $ pulumi import gcp:container/azureNodePool:AzureNodePool default projects/{{project}}/locations/{{location}}/azureClusters/{{cluster}}/azureNodePools/{{name}} ``` ```sh $ pulumi import gcp:container/azureNodePool:AzureNodePool default {{project}}/{{location}}/{{cluster}}/{{name}} ``` ```sh $ pulumi import gcp:container/azureNodePool:AzureNodePool default {{location}}/{{cluster}}/{{name}} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> annotations()  
      com.pulumi.core.Output<AzureNodePoolAutoscaling> autoscaling()  
      com.pulumi.core.Output<java.lang.String> azureAvailabilityZone()  
      com.pulumi.core.Output<java.lang.String> cluster()  
      com.pulumi.core.Output<AzureNodePoolConfig> config()  
      com.pulumi.core.Output<java.lang.String> createTime()  
      com.pulumi.core.Output<java.lang.String> etag()  
      static AzureNodePool get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, AzureNodePoolState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> location()  
      com.pulumi.core.Output<AzureNodePoolMaxPodsConstraint> maxPodsConstraint()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> project()  
      com.pulumi.core.Output<java.lang.Boolean> reconciling()  
      com.pulumi.core.Output<java.lang.String> state()  
      com.pulumi.core.Output<java.lang.String> subnetId()  
      com.pulumi.core.Output<java.lang.String> uid()  
      com.pulumi.core.Output<java.lang.String> updateTime()  
      com.pulumi.core.Output<java.lang.String> version()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AzureNodePool

        public AzureNodePool​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • AzureNodePool

        public AzureNodePool​(java.lang.String name,
                             AzureNodePoolArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • AzureNodePool

        public AzureNodePool​(java.lang.String name,
                             AzureNodePoolArgs args,
                             @Nullable
                             com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • annotations

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> annotations()
        Returns:
        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.
      • autoscaling

        public com.pulumi.core.Output<AzureNodePoolAutoscaling> autoscaling()
        Returns:
        Autoscaler configuration for this node pool.
      • azureAvailabilityZone

        public com.pulumi.core.Output<java.lang.String> azureAvailabilityZone()
        Returns:
        Optional. The Azure availability zone of the nodes in this nodepool. When unspecified, it defaults to `1`.
      • cluster

        public com.pulumi.core.Output<java.lang.String> cluster()
        Returns:
        The azureCluster for the resource
      • config

        public com.pulumi.core.Output<AzureNodePoolConfig> config()
        Returns:
        The node configuration of the node pool.
      • createTime

        public com.pulumi.core.Output<java.lang.String> createTime()
        Returns:
        Output only. The time at which this node pool was created.
      • etag

        public com.pulumi.core.Output<java.lang.String> etag()
        Returns:
        Allows clients to perform consistent read-modify-writes through optimistic concurrency control. May be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
      • location

        public com.pulumi.core.Output<java.lang.String> location()
        Returns:
        The location for the resource
      • maxPodsConstraint

        public com.pulumi.core.Output<AzureNodePoolMaxPodsConstraint> maxPodsConstraint()
        Returns:
        The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The name of this resource.
      • project

        public com.pulumi.core.Output<java.lang.String> project()
        Returns:
        The project for the resource
      • reconciling

        public com.pulumi.core.Output<java.lang.Boolean> reconciling()
        Returns:
        Output only. If set, there are currently pending changes to the node pool.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        Output only. The current state of the node pool. Possible values: STATE_UNSPECIFIED, PROVISIONING, RUNNING, RECONCILING, STOPPING, ERROR, DEGRADED
      • subnetId

        public com.pulumi.core.Output<java.lang.String> subnetId()
        Returns:
        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.
      • uid

        public com.pulumi.core.Output<java.lang.String> uid()
        Returns:
        Output only. A globally unique identifier for the node pool.
      • updateTime

        public com.pulumi.core.Output<java.lang.String> updateTime()
        Returns:
        Output only. The time at which this node pool was last updated.
      • version

        public com.pulumi.core.Output<java.lang.String> version()
        Returns:
        The Kubernetes version (e.g. `1.19.10-gke.1000`) running on this node pool.
      • get

        public static AzureNodePool get​(java.lang.String name,
                                        com.pulumi.core.Output<java.lang.String> id,
                                        @Nullable
                                        AzureNodePoolState state,
                                        @Nullable
                                        com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.