Class ComputeSubnetworkConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_subnetwork.ComputeSubnetworkConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeSubnetworkConfig>
- Enclosing interface:
- ComputeSubnetworkConfig
@Stability(Stable) public static final class ComputeSubnetworkConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeSubnetworkConfig>
A builder forComputeSubnetworkConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
ipCidrRange
@Stability(Stable) public ComputeSubnetworkConfig.Builder ipCidrRange(String ipCidrRange)
Sets the value ofComputeSubnetworkConfig.getIpCidrRange()- Parameters:
ipCidrRange- The range of internal addresses that are owned by this subnetwork. This parameter is required. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#ip_cidr_range ComputeSubnetwork#ip_cidr_range}- Returns:
this
-
name
@Stability(Stable) public ComputeSubnetworkConfig.Builder name(String name)
Sets the value ofComputeSubnetworkConfig.getName()- Parameters:
name- The name of the resource, provided by the client when initially creating the resource. This parameter is required. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression '[a-z](%5B-a-z0-9%5D*%5Ba-z0-9%5D)?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#name ComputeSubnetwork#name}- Returns:
this
-
network
@Stability(Stable) public ComputeSubnetworkConfig.Builder network(String network)
Sets the value ofComputeSubnetworkConfig.getNetwork()- Parameters:
network- The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#network ComputeSubnetwork#network}- Returns:
this
-
description
@Stability(Stable) public ComputeSubnetworkConfig.Builder description(String description)
Sets the value ofComputeSubnetworkConfig.getDescription()- Parameters:
description- An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#description ComputeSubnetwork#description}- Returns:
this
-
externalIpv6Prefix
@Stability(Stable) public ComputeSubnetworkConfig.Builder externalIpv6Prefix(String externalIpv6Prefix)
Sets the value ofComputeSubnetworkConfig.getExternalIpv6Prefix()- Parameters:
externalIpv6Prefix- The range of external IPv6 addresses that are owned by this subnetwork. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#external_ipv6_prefix ComputeSubnetwork#external_ipv6_prefix}- Returns:
this
-
id
@Stability(Stable) public ComputeSubnetworkConfig.Builder id(String id)
Sets the value ofComputeSubnetworkConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#id ComputeSubnetwork#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
-
ipv6AccessType
@Stability(Stable) public ComputeSubnetworkConfig.Builder ipv6AccessType(String ipv6AccessType)
Sets the value ofComputeSubnetworkConfig.getIpv6AccessType()- Parameters:
ipv6AccessType- The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. If the ipv6_type is EXTERNAL then this subnet cannot enable direct path. Possible values: ["EXTERNAL", "INTERNAL"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#ipv6_access_type ComputeSubnetwork#ipv6_access_type}- Returns:
this
-
logConfig
@Stability(Stable) public ComputeSubnetworkConfig.Builder logConfig(ComputeSubnetworkLogConfig logConfig)
Sets the value ofComputeSubnetworkConfig.getLogConfig()- Parameters:
logConfig- log_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#log_config ComputeSubnetwork#log_config}- Returns:
this
-
privateIpGoogleAccess
@Stability(Stable) public ComputeSubnetworkConfig.Builder privateIpGoogleAccess(Boolean privateIpGoogleAccess)
Sets the value ofComputeSubnetworkConfig.getPrivateIpGoogleAccess()- Parameters:
privateIpGoogleAccess- When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#private_ip_google_access ComputeSubnetwork#private_ip_google_access}- Returns:
this
-
privateIpGoogleAccess
@Stability(Stable) public ComputeSubnetworkConfig.Builder privateIpGoogleAccess(com.hashicorp.cdktf.IResolvable privateIpGoogleAccess)
Sets the value ofComputeSubnetworkConfig.getPrivateIpGoogleAccess()- Parameters:
privateIpGoogleAccess- When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#private_ip_google_access ComputeSubnetwork#private_ip_google_access}- Returns:
this
-
privateIpv6GoogleAccess
@Stability(Stable) public ComputeSubnetworkConfig.Builder privateIpv6GoogleAccess(String privateIpv6GoogleAccess)
Sets the value ofComputeSubnetworkConfig.getPrivateIpv6GoogleAccess()- Parameters:
privateIpv6GoogleAccess- The private IPv6 google access type for the VMs in this subnet. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#private_ipv6_google_access ComputeSubnetwork#private_ipv6_google_access}- Returns:
this
-
project
@Stability(Stable) public ComputeSubnetworkConfig.Builder project(String project)
Sets the value ofComputeSubnetworkConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#project ComputeSubnetwork#project}.- Returns:
this
-
purpose
@Stability(Stable) public ComputeSubnetworkConfig.Builder purpose(String purpose)
Sets the value ofComputeSubnetworkConfig.getPurpose()- Parameters:
purpose- The purpose of the resource. This field can be either 'PRIVATE_RFC_1918', 'REGIONAL_MANAGED_PROXY', 'GLOBAL_MANAGED_PROXY', 'PRIVATE_SERVICE_CONNECT' or 'PRIVATE_NAT'([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)). A subnet with purpose set to 'REGIONAL_MANAGED_PROXY' is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnetwork in a given region with purpose set to 'GLOBAL_MANAGED_PROXY' is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers. A subnetwork with purpose set to 'PRIVATE_SERVICE_CONNECT' reserves the subnet for hosting a Private Service Connect published service. A subnetwork with purpose set to 'PRIVATE_NAT' is used as source range for Private NAT gateways. Note that 'REGIONAL_MANAGED_PROXY' is the preferred setting for all regional Envoy load balancers. If unspecified, the purpose defaults to 'PRIVATE_RFC_1918'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#purpose ComputeSubnetwork#purpose}- Returns:
this
-
region
@Stability(Stable) public ComputeSubnetworkConfig.Builder region(String region)
Sets the value ofComputeSubnetworkConfig.getRegion()- Parameters:
region- The GCP region for this subnetwork. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#region ComputeSubnetwork#region}- Returns:
this
-
role
@Stability(Stable) public ComputeSubnetworkConfig.Builder role(String role)
Sets the value ofComputeSubnetworkConfig.getRole()- Parameters:
role- The role of subnetwork. Currently, this field is only used when 'purpose' is 'REGIONAL_MANAGED_PROXY'. The value can be set to 'ACTIVE' or 'BACKUP'. An 'ACTIVE' subnetwork is one that is currently being used for Envoy-based load balancers in a region. A 'BACKUP' subnetwork is one that is ready to be promoted to 'ACTIVE' or is currently draining. Possible values: ["ACTIVE", "BACKUP"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#role ComputeSubnetwork#role}- Returns:
this
-
secondaryIpRange
@Stability(Stable) public ComputeSubnetworkConfig.Builder secondaryIpRange(com.hashicorp.cdktf.IResolvable secondaryIpRange)
Sets the value ofComputeSubnetworkConfig.getSecondaryIpRange()- Parameters:
secondaryIpRange- An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. **Note**: This field uses [attr-as-block mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html) to avoid breaking users during the 0.12 upgrade. To explicitly send a list of zero objects, set 'send_secondary_ip_range_if_empty = true' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#secondary_ip_range ComputeSubnetwork#secondary_ip_range}- Returns:
this
-
secondaryIpRange
@Stability(Stable) public ComputeSubnetworkConfig.Builder secondaryIpRange(List<? extends ComputeSubnetworkSecondaryIpRange> secondaryIpRange)
Sets the value ofComputeSubnetworkConfig.getSecondaryIpRange()- Parameters:
secondaryIpRange- An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. **Note**: This field uses [attr-as-block mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html) to avoid breaking users during the 0.12 upgrade. To explicitly send a list of zero objects, set 'send_secondary_ip_range_if_empty = true' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#secondary_ip_range ComputeSubnetwork#secondary_ip_range}- Returns:
this
-
sendSecondaryIpRangeIfEmpty
@Stability(Stable) public ComputeSubnetworkConfig.Builder sendSecondaryIpRangeIfEmpty(Boolean sendSecondaryIpRangeIfEmpty)
Sets the value ofComputeSubnetworkConfig.getSendSecondaryIpRangeIfEmpty()- Parameters:
sendSecondaryIpRangeIfEmpty- Controls the removal behavior of secondary_ip_range. When false, removing secondary_ip_range from config will not produce a diff as the provider will default to the API's value. When true, the provider will treat removing secondary_ip_range as sending an empty list of secondary IP ranges to the API. Defaults to false. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#send_secondary_ip_range_if_empty ComputeSubnetwork#send_secondary_ip_range_if_empty}- Returns:
this
-
sendSecondaryIpRangeIfEmpty
@Stability(Stable) public ComputeSubnetworkConfig.Builder sendSecondaryIpRangeIfEmpty(com.hashicorp.cdktf.IResolvable sendSecondaryIpRangeIfEmpty)
Sets the value ofComputeSubnetworkConfig.getSendSecondaryIpRangeIfEmpty()- Parameters:
sendSecondaryIpRangeIfEmpty- Controls the removal behavior of secondary_ip_range. When false, removing secondary_ip_range from config will not produce a diff as the provider will default to the API's value. When true, the provider will treat removing secondary_ip_range as sending an empty list of secondary IP ranges to the API. Defaults to false. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#send_secondary_ip_range_if_empty ComputeSubnetwork#send_secondary_ip_range_if_empty}- Returns:
this
-
stackType
@Stability(Stable) public ComputeSubnetworkConfig.Builder stackType(String stackType)
Sets the value ofComputeSubnetworkConfig.getStackType()- Parameters:
stackType- The stack type for this subnet to identify whether the IPv6 feature is enabled or not. If not specified IPV4_ONLY will be used. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#stack_type ComputeSubnetwork#stack_type}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeSubnetworkConfig.Builder timeouts(ComputeSubnetworkTimeouts timeouts)
Sets the value ofComputeSubnetworkConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#timeouts ComputeSubnetwork#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.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 ComputeSubnetworkConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeSubnetworkConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeSubnetworkConfig>- Returns:
- a new instance of
ComputeSubnetworkConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-