Class ContainerNodePoolConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.container_node_pool.ContainerNodePoolConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerNodePoolConfig>
- Enclosing interface:
- ContainerNodePoolConfig
@Stability(Stable) public static final class ContainerNodePoolConfig.Builder extends Object implements software.amazon.jsii.Builder<ContainerNodePoolConfig>
A builder forContainerNodePoolConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
cluster
@Stability(Stable) public ContainerNodePoolConfig.Builder cluster(String cluster)
Sets the value ofContainerNodePoolConfig.getCluster()- Parameters:
cluster- The cluster to create the node pool for. Cluster must be present in location provided for zonal clusters. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#cluster ContainerNodePool#cluster}- Returns:
this
-
autoscaling
@Stability(Stable) public ContainerNodePoolConfig.Builder autoscaling(ContainerNodePoolAutoscaling autoscaling)
Sets the value ofContainerNodePoolConfig.getAutoscaling()- Parameters:
autoscaling- autoscaling block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#autoscaling ContainerNodePool#autoscaling}- Returns:
this
-
id
@Stability(Stable) public ContainerNodePoolConfig.Builder id(String id)
Sets the value ofContainerNodePoolConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#id ContainerNodePool#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
initialNodeCount
@Stability(Stable) public ContainerNodePoolConfig.Builder initialNodeCount(Number initialNodeCount)
Sets the value ofContainerNodePoolConfig.getInitialNodeCount()- Parameters:
initialNodeCount- The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#initial_node_count ContainerNodePool#initial_node_count}- Returns:
this
-
location
@Stability(Stable) public ContainerNodePoolConfig.Builder location(String location)
Sets the value ofContainerNodePoolConfig.getLocation()- Parameters:
location- The location (region or zone) of the cluster. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#location ContainerNodePool#location}- Returns:
this
-
management
@Stability(Stable) public ContainerNodePoolConfig.Builder management(ContainerNodePoolManagement management)
Sets the value ofContainerNodePoolConfig.getManagement()- Parameters:
management- management block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#management ContainerNodePool#management}- Returns:
this
-
maxPodsPerNode
@Stability(Stable) public ContainerNodePoolConfig.Builder maxPodsPerNode(Number maxPodsPerNode)
Sets the value ofContainerNodePoolConfig.getMaxPodsPerNode()- Parameters:
maxPodsPerNode- The maximum number of pods per node in this node pool. Note that this does not work on node pools which are "route-based" - that is, node pools belonging to clusters that do not have IP Aliasing enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#max_pods_per_node ContainerNodePool#max_pods_per_node}- Returns:
this
-
name
@Stability(Stable) public ContainerNodePoolConfig.Builder name(String name)
Sets the value ofContainerNodePoolConfig.getName()- Parameters:
name- The name of the node pool. If left blank, Terraform will auto-generate a unique name. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#name ContainerNodePool#name}- Returns:
this
-
namePrefix
@Stability(Stable) public ContainerNodePoolConfig.Builder namePrefix(String namePrefix)
Sets the value ofContainerNodePoolConfig.getNamePrefix()- Parameters:
namePrefix- Creates a unique name for the node pool beginning with the specified prefix. Conflicts with name. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#name_prefix ContainerNodePool#name_prefix}- Returns:
this
-
networkConfig
@Stability(Stable) public ContainerNodePoolConfig.Builder networkConfig(ContainerNodePoolNetworkConfig networkConfig)
Sets the value ofContainerNodePoolConfig.getNetworkConfig()- Parameters:
networkConfig- network_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#network_config ContainerNodePool#network_config}- Returns:
this
-
nodeConfig
@Stability(Stable) public ContainerNodePoolConfig.Builder nodeConfig(ContainerNodePoolNodeConfig nodeConfig)
Sets the value ofContainerNodePoolConfig.getNodeConfig()- Parameters:
nodeConfig- node_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#node_config ContainerNodePool#node_config}- Returns:
this
-
nodeCount
@Stability(Stable) public ContainerNodePoolConfig.Builder nodeCount(Number nodeCount)
Sets the value ofContainerNodePoolConfig.getNodeCount()- Parameters:
nodeCount- The number of nodes per instance group. This field can be used to update the number of nodes per instance group but should not be used alongside autoscaling. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#node_count ContainerNodePool#node_count}- Returns:
this
-
nodeLocations
@Stability(Stable) public ContainerNodePoolConfig.Builder nodeLocations(List<String> nodeLocations)
Sets the value ofContainerNodePoolConfig.getNodeLocations()- Parameters:
nodeLocations- The list of zones in which the node pool's nodes should be located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. If unspecified, the cluster-level node_locations will be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#node_locations ContainerNodePool#node_locations}- Returns:
this
-
placementPolicy
@Stability(Stable) public ContainerNodePoolConfig.Builder placementPolicy(ContainerNodePoolPlacementPolicy placementPolicy)
Sets the value ofContainerNodePoolConfig.getPlacementPolicy()- Parameters:
placementPolicy- placement_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#placement_policy ContainerNodePool#placement_policy}- Returns:
this
-
project
@Stability(Stable) public ContainerNodePoolConfig.Builder project(String project)
Sets the value ofContainerNodePoolConfig.getProject()- Parameters:
project- The ID of the project in which to create the node pool. If blank, the provider-configured project will be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#project ContainerNodePool#project}- Returns:
this
-
queuedProvisioning
@Stability(Stable) public ContainerNodePoolConfig.Builder queuedProvisioning(ContainerNodePoolQueuedProvisioning queuedProvisioning)
Sets the value ofContainerNodePoolConfig.getQueuedProvisioning()- Parameters:
queuedProvisioning- queued_provisioning block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#queued_provisioning ContainerNodePool#queued_provisioning}- Returns:
this
-
timeouts
@Stability(Stable) public ContainerNodePoolConfig.Builder timeouts(ContainerNodePoolTimeouts timeouts)
Sets the value ofContainerNodePoolConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#timeouts ContainerNodePool#timeouts}- Returns:
this
-
upgradeSettings
@Stability(Stable) public ContainerNodePoolConfig.Builder upgradeSettings(ContainerNodePoolUpgradeSettings upgradeSettings)
Sets the value ofContainerNodePoolConfig.getUpgradeSettings()- Parameters:
upgradeSettings- upgrade_settings block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#upgrade_settings ContainerNodePool#upgrade_settings}- Returns:
this
-
version
@Stability(Stable) public ContainerNodePoolConfig.Builder version(String version)
Sets the value ofContainerNodePoolConfig.getVersion()- Parameters:
version- The Kubernetes version for the nodes in this pool. Note that if this field and auto_upgrade are both specified, they will fight each other for what the node version should be, so setting both is highly discouraged. While a fuzzy version can be specified, it's recommended that you specify explicit versions as Terraform will see spurious diffs when fuzzy versions are used. See the google_container_engine_versions data source's version_prefix field to approximate fuzzy versions in a Terraform-compatible way. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/container_node_pool#version ContainerNodePool#version}- Returns:
this
-
connection
@Stability(Experimental) public ContainerNodePoolConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public ContainerNodePoolConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ContainerNodePoolConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ContainerNodePoolConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public ContainerNodePoolConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public ContainerNodePoolConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public ContainerNodePoolConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public ContainerNodePoolConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public ContainerNodePoolConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ContainerNodePoolConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ContainerNodePoolConfig>- Returns:
- a new instance of
ContainerNodePoolConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-