Class ComputeVpnTunnelConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_vpn_tunnel.ComputeVpnTunnelConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeVpnTunnelConfig>
- Enclosing interface:
- ComputeVpnTunnelConfig
@Stability(Stable) public static final class ComputeVpnTunnelConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeVpnTunnelConfig>
A builder forComputeVpnTunnelConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeVpnTunnelConfig.Builder name(String name)
Sets the value ofComputeVpnTunnelConfig.getName()- Parameters:
name- Name of 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_vpn_tunnel#name ComputeVpnTunnel#name}- Returns:
this
-
sharedSecret
@Stability(Stable) public ComputeVpnTunnelConfig.Builder sharedSecret(String sharedSecret)
Sets the value ofComputeVpnTunnelConfig.getSharedSecret()- Parameters:
sharedSecret- Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#shared_secret ComputeVpnTunnel#shared_secret}- Returns:
this
-
description
@Stability(Stable) public ComputeVpnTunnelConfig.Builder description(String description)
Sets the value ofComputeVpnTunnelConfig.getDescription()- Parameters:
description- An optional description of this resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#description ComputeVpnTunnel#description}- Returns:
this
-
id
@Stability(Stable) public ComputeVpnTunnelConfig.Builder id(String id)
Sets the value ofComputeVpnTunnelConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#id ComputeVpnTunnel#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
-
ikeVersion
@Stability(Stable) public ComputeVpnTunnelConfig.Builder ikeVersion(Number ikeVersion)
Sets the value ofComputeVpnTunnelConfig.getIkeVersion()- Parameters:
ikeVersion- IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#ike_version ComputeVpnTunnel#ike_version}- Returns:
this
-
labels
@Stability(Stable) public ComputeVpnTunnelConfig.Builder labels(Map<String,String> labels)
Sets the value ofComputeVpnTunnelConfig.getLabels()- Parameters:
labels- Labels to apply to this VpnTunnel. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#labels ComputeVpnTunnel#labels}- Returns:
this
-
localTrafficSelector
@Stability(Stable) public ComputeVpnTunnelConfig.Builder localTrafficSelector(List<String> localTrafficSelector)
Sets the value ofComputeVpnTunnelConfig.getLocalTrafficSelector()- Parameters:
localTrafficSelector- Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example '192.168.0.0/16'. The ranges should be disjoint. Only IPv4 is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#local_traffic_selector ComputeVpnTunnel#local_traffic_selector}- Returns:
this
-
peerExternalGateway
@Stability(Stable) public ComputeVpnTunnelConfig.Builder peerExternalGateway(String peerExternalGateway)
Sets the value ofComputeVpnTunnelConfig.getPeerExternalGateway()- Parameters:
peerExternalGateway- URL of the peer side external VPN gateway to which this VPN tunnel is connected. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#peer_external_gateway ComputeVpnTunnel#peer_external_gateway}- Returns:
this
-
peerExternalGatewayInterface
@Stability(Stable) public ComputeVpnTunnelConfig.Builder peerExternalGatewayInterface(Number peerExternalGatewayInterface)
Sets the value ofComputeVpnTunnelConfig.getPeerExternalGatewayInterface()- Parameters:
peerExternalGatewayInterface- The interface ID of the external VPN gateway to which this VPN tunnel is connected. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#peer_external_gateway_interface ComputeVpnTunnel#peer_external_gateway_interface}- Returns:
this
-
peerGcpGateway
@Stability(Stable) public ComputeVpnTunnelConfig.Builder peerGcpGateway(String peerGcpGateway)
Sets the value ofComputeVpnTunnelConfig.getPeerGcpGateway()- Parameters:
peerGcpGateway- URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn_gateway_interface ID in the peer GCP VPN gateway. This field must reference a 'google_compute_ha_vpn_gateway' resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#peer_gcp_gateway ComputeVpnTunnel#peer_gcp_gateway}- Returns:
this
-
peerIp
@Stability(Stable) public ComputeVpnTunnelConfig.Builder peerIp(String peerIp)
Sets the value ofComputeVpnTunnelConfig.getPeerIp()- Parameters:
peerIp- IP address of the peer VPN gateway. Only IPv4 is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#peer_ip ComputeVpnTunnel#peer_ip}- Returns:
this
-
project
@Stability(Stable) public ComputeVpnTunnelConfig.Builder project(String project)
Sets the value ofComputeVpnTunnelConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#project ComputeVpnTunnel#project}.- Returns:
this
-
region
@Stability(Stable) public ComputeVpnTunnelConfig.Builder region(String region)
Sets the value ofComputeVpnTunnelConfig.getRegion()- Parameters:
region- The region where the tunnel is located. If unset, is set to the region of 'target_vpn_gateway'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#region ComputeVpnTunnel#region}- Returns:
this
-
remoteTrafficSelector
@Stability(Stable) public ComputeVpnTunnelConfig.Builder remoteTrafficSelector(List<String> remoteTrafficSelector)
Sets the value ofComputeVpnTunnelConfig.getRemoteTrafficSelector()- Parameters:
remoteTrafficSelector- Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example '192.168.0.0/16'. The ranges should be disjoint. Only IPv4 is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#remote_traffic_selector ComputeVpnTunnel#remote_traffic_selector}- Returns:
this
-
router
@Stability(Stable) public ComputeVpnTunnelConfig.Builder router(String router)
Sets the value ofComputeVpnTunnelConfig.getRouter()- Parameters:
router- URL of router resource to be used for dynamic routing. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#router ComputeVpnTunnel#router}- Returns:
this
-
targetVpnGateway
@Stability(Stable) public ComputeVpnTunnelConfig.Builder targetVpnGateway(String targetVpnGateway)
Sets the value ofComputeVpnTunnelConfig.getTargetVpnGateway()- Parameters:
targetVpnGateway- URL of the Target VPN gateway with which this VPN tunnel is associated. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#target_vpn_gateway ComputeVpnTunnel#target_vpn_gateway}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeVpnTunnelConfig.Builder timeouts(ComputeVpnTunnelTimeouts timeouts)
Sets the value ofComputeVpnTunnelConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#timeouts ComputeVpnTunnel#timeouts}- Returns:
this
-
vpnGateway
@Stability(Stable) public ComputeVpnTunnelConfig.Builder vpnGateway(String vpnGateway)
Sets the value ofComputeVpnTunnelConfig.getVpnGateway()- Parameters:
vpnGateway- URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. This field must reference a 'google_compute_ha_vpn_gateway' resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#vpn_gateway ComputeVpnTunnel#vpn_gateway}- Returns:
this
-
vpnGatewayInterface
@Stability(Stable) public ComputeVpnTunnelConfig.Builder vpnGatewayInterface(Number vpnGatewayInterface)
Sets the value ofComputeVpnTunnelConfig.getVpnGatewayInterface()- Parameters:
vpnGatewayInterface- The interface ID of the VPN gateway with which this VPN tunnel is associated. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_vpn_tunnel#vpn_gateway_interface ComputeVpnTunnel#vpn_gateway_interface}- Returns:
this
-
connection
@Stability(Experimental) public ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.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 ComputeVpnTunnelConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeVpnTunnelConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeVpnTunnelConfig>- Returns:
- a new instance of
ComputeVpnTunnelConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-