Class ComputeSubnetwork.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_subnetwork.ComputeSubnetwork.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeSubnetwork>
- Enclosing class:
- ComputeSubnetwork
@Stability(Stable) public static final class ComputeSubnetwork.Builder extends Object implements software.amazon.jsii.Builder<ComputeSubnetwork>
A fluent builder forComputeSubnetwork.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeSubnetworkbuild()ComputeSubnetwork.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)ComputeSubnetwork.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)ComputeSubnetwork.Buildercount(com.hashicorp.cdktf.TerraformCount count)ComputeSubnetwork.Buildercount(Number count)static ComputeSubnetwork.Buildercreate(software.constructs.Construct scope, String id)ComputeSubnetwork.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)ComputeSubnetwork.Builderdescription(String description)An optional description of this resource.ComputeSubnetwork.BuilderexternalIpv6Prefix(String externalIpv6Prefix)The range of external IPv6 addresses that are owned by this subnetwork.ComputeSubnetwork.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)ComputeSubnetwork.Builderid(String id)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#id ComputeSubnetwork#id}.ComputeSubnetwork.BuilderipCidrRange(String ipCidrRange)The range of internal addresses that are owned by this subnetwork.ComputeSubnetwork.Builderipv6AccessType(String ipv6AccessType)The access type of IPv6 address this subnet holds.ComputeSubnetwork.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)ComputeSubnetwork.BuilderlogConfig(ComputeSubnetworkLogConfig logConfig)log_config block.ComputeSubnetwork.Buildername(String name)The name of the resource, provided by the client when initially creating the resource.ComputeSubnetwork.Buildernetwork(String network)The network this subnet belongs to.ComputeSubnetwork.BuilderprivateIpGoogleAccess(com.hashicorp.cdktf.IResolvable privateIpGoogleAccess)When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.ComputeSubnetwork.BuilderprivateIpGoogleAccess(Boolean privateIpGoogleAccess)When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access.ComputeSubnetwork.BuilderprivateIpv6GoogleAccess(String privateIpv6GoogleAccess)The private IPv6 google access type for the VMs in this subnet.ComputeSubnetwork.Builderproject(String project)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#project ComputeSubnetwork#project}.ComputeSubnetwork.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)ComputeSubnetwork.Builderprovisioners(List<? extends Object> provisioners)ComputeSubnetwork.Builderpurpose(String purpose)The purpose of the resource.ComputeSubnetwork.Builderregion(String region)The GCP region for this subnetwork.ComputeSubnetwork.Builderrole(String role)The role of subnetwork.ComputeSubnetwork.BuildersecondaryIpRange(com.hashicorp.cdktf.IResolvable secondaryIpRange)An array of configurations for secondary IP ranges for VM instances contained in this subnetwork.ComputeSubnetwork.BuildersecondaryIpRange(List<? extends ComputeSubnetworkSecondaryIpRange> secondaryIpRange)An array of configurations for secondary IP ranges for VM instances contained in this subnetwork.ComputeSubnetwork.BuildersendSecondaryIpRangeIfEmpty(com.hashicorp.cdktf.IResolvable sendSecondaryIpRangeIfEmpty)Controls the removal behavior of secondary_ip_range.ComputeSubnetwork.BuildersendSecondaryIpRangeIfEmpty(Boolean sendSecondaryIpRangeIfEmpty)Controls the removal behavior of secondary_ip_range.ComputeSubnetwork.BuilderstackType(String stackType)The stack type for this subnet to identify whether the IPv6 feature is enabled or not.ComputeSubnetwork.Buildertimeouts(ComputeSubnetworkTimeouts timeouts)timeouts block.
-
-
-
Method Detail
-
create
@Stability(Stable) public static ComputeSubnetwork.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope- The scope in which to define this construct. This parameter is required.id- The scoped construct ID. This parameter is required.- Returns:
- a new instance of
ComputeSubnetwork.Builder.
-
connection
@Stability(Experimental) public ComputeSubnetwork.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public ComputeSubnetwork.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public ComputeSubnetwork.Builder count(Number count)
- Parameters:
count- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public ComputeSubnetwork.Builder count(com.hashicorp.cdktf.TerraformCount count)
- Parameters:
count- This parameter is required.- Returns:
this
-
dependsOn
@Stability(Experimental) public ComputeSubnetwork.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
- Parameters:
dependsOn- This parameter is required.- Returns:
this
-
forEach
@Stability(Experimental) public ComputeSubnetwork.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
- Parameters:
forEach- This parameter is required.- Returns:
this
-
lifecycle
@Stability(Experimental) public ComputeSubnetwork.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
- Parameters:
lifecycle- This parameter is required.- Returns:
this
-
provider
@Stability(Experimental) public ComputeSubnetwork.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
- Parameters:
provider- This parameter is required.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeSubnetwork.Builder provisioners(List<? extends Object> provisioners)
- Parameters:
provisioners- This parameter is required.- Returns:
this
-
ipCidrRange
@Stability(Stable) public ComputeSubnetwork.Builder ipCidrRange(String ipCidrRange)
The range of internal addresses that are owned by this subnetwork.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}
- Parameters:
ipCidrRange- The range of internal addresses that are owned by this subnetwork. This parameter is required.- Returns:
this
-
name
@Stability(Stable) public ComputeSubnetwork.Builder name(String name)
The name of the resource, provided by the client when initially creating the resource.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}
- Parameters:
name- The name of the resource, provided by the client when initially creating the resource. This parameter is required.- Returns:
this
-
network
@Stability(Stable) public ComputeSubnetwork.Builder network(String network)
The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#network ComputeSubnetwork#network}
- Parameters:
network- The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public ComputeSubnetwork.Builder description(String 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}
- Parameters:
description- An optional description of this resource. This parameter is required.- Returns:
this
-
externalIpv6Prefix
@Stability(Stable) public ComputeSubnetwork.Builder externalIpv6Prefix(String 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}
- Parameters:
externalIpv6Prefix- The range of external IPv6 addresses that are owned by this subnetwork. This parameter is required.- Returns:
this
-
id
@Stability(Stable) public ComputeSubnetwork.Builder id(String 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.
- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#id ComputeSubnetwork#id}. This parameter is required.- Returns:
this
-
ipv6AccessType
@Stability(Stable) public ComputeSubnetwork.Builder ipv6AccessType(String 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}
- Parameters:
ipv6AccessType- The access type of IPv6 address this subnet holds. This parameter is required.- Returns:
this
-
logConfig
@Stability(Stable) public ComputeSubnetwork.Builder logConfig(ComputeSubnetworkLogConfig 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}
- Parameters:
logConfig- log_config block. This parameter is required.- Returns:
this
-
privateIpGoogleAccess
@Stability(Stable) public ComputeSubnetwork.Builder privateIpGoogleAccess(Boolean 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}
- Parameters:
privateIpGoogleAccess- When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. This parameter is required.- Returns:
this
-
privateIpGoogleAccess
@Stability(Stable) public ComputeSubnetwork.Builder privateIpGoogleAccess(com.hashicorp.cdktf.IResolvable 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}
- Parameters:
privateIpGoogleAccess- When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. This parameter is required.- Returns:
this
-
privateIpv6GoogleAccess
@Stability(Stable) public ComputeSubnetwork.Builder privateIpv6GoogleAccess(String 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}
- Parameters:
privateIpv6GoogleAccess- The private IPv6 google access type for the VMs in this subnet. This parameter is required.- Returns:
this
-
project
@Stability(Stable) public ComputeSubnetwork.Builder project(String project)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#project ComputeSubnetwork#project}.- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_subnetwork#project ComputeSubnetwork#project}. This parameter is required.- Returns:
this
-
purpose
@Stability(Stable) public ComputeSubnetwork.Builder purpose(String 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}
- Parameters:
purpose- The purpose of the resource. This parameter is required.- Returns:
this
-
region
@Stability(Stable) public ComputeSubnetwork.Builder region(String 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}
- Parameters:
region- The GCP region for this subnetwork. This parameter is required.- Returns:
this
-
role
@Stability(Stable) public ComputeSubnetwork.Builder role(String 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}
- Parameters:
role- The role of subnetwork. This parameter is required.- Returns:
this
-
secondaryIpRange
@Stability(Stable) public ComputeSubnetwork.Builder secondaryIpRange(com.hashicorp.cdktf.IResolvable 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}
- Parameters:
secondaryIpRange- An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. This parameter is required.- Returns:
this
-
secondaryIpRange
@Stability(Stable) public ComputeSubnetwork.Builder secondaryIpRange(List<? extends ComputeSubnetworkSecondaryIpRange> 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}
- Parameters:
secondaryIpRange- An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. This parameter is required.- Returns:
this
-
sendSecondaryIpRangeIfEmpty
@Stability(Stable) public ComputeSubnetwork.Builder sendSecondaryIpRangeIfEmpty(Boolean 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}
- Parameters:
sendSecondaryIpRangeIfEmpty- Controls the removal behavior of secondary_ip_range. This parameter is required.- Returns:
this
-
sendSecondaryIpRangeIfEmpty
@Stability(Stable) public ComputeSubnetwork.Builder sendSecondaryIpRangeIfEmpty(com.hashicorp.cdktf.IResolvable 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}
- Parameters:
sendSecondaryIpRangeIfEmpty- Controls the removal behavior of secondary_ip_range. This parameter is required.- Returns:
this
-
stackType
@Stability(Stable) public ComputeSubnetwork.Builder stackType(String 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}
- Parameters:
stackType- The stack type for this subnet to identify whether the IPv6 feature is enabled or not. This parameter is required.- Returns:
this
-
timeouts
@Stability(Stable) public ComputeSubnetwork.Builder timeouts(ComputeSubnetworkTimeouts 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}
- Parameters:
timeouts- timeouts block. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public ComputeSubnetwork build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeSubnetwork>- Returns:
- a newly built instance of
ComputeSubnetwork.
-
-