Class ComputeRouterNatConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder name​(String name)
        Parameters:
        name - Name of the NAT service. The name must be 1-63 characters long and comply with RFC1035. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#name ComputeRouterNat#name}
        Returns:
        this
      • router

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder router​(String router)
        Parameters:
        router - The name of the Cloud Router in which this NAT will be configured. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#router ComputeRouterNat#router}
        Returns:
        this
      • sourceSubnetworkIpRangesToNat

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder sourceSubnetworkIpRangesToNat​(String sourceSubnetworkIpRangesToNat)
        Parameters:
        sourceSubnetworkIpRangesToNat - How NAT should be configured per Subnetwork. This parameter is required. If 'ALL_SUBNETWORKS_ALL_IP_RANGES', all of the IP ranges in every Subnetwork are allowed to Nat. If 'ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES', all of the primary IP ranges in every Subnetwork are allowed to Nat. 'LIST_OF_SUBNETWORKS': A list of Subnetworks are allowed to Nat (specified in the field subnetwork below). Note that if this field contains ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any other RouterNat section in any Router for this network in this region. Possible values: ["ALL_SUBNETWORKS_ALL_IP_RANGES", "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES", "LIST_OF_SUBNETWORKS"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#source_subnetwork_ip_ranges_to_nat ComputeRouterNat#source_subnetwork_ip_ranges_to_nat}
        Returns:
        this
      • autoNetworkTier

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder autoNetworkTier​(String autoNetworkTier)
        Parameters:
        autoNetworkTier - The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used. Possible values: ["PREMIUM", "STANDARD"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#auto_network_tier ComputeRouterNat#auto_network_tier}
        Returns:
        this
      • drainNatIps

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder drainNatIps​(List<String> drainNatIps)
        Parameters:
        drainNatIps - A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#drain_nat_ips ComputeRouterNat#drain_nat_ips}
        Returns:
        this
      • enableDynamicPortAllocation

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder enableDynamicPortAllocation​(Boolean enableDynamicPortAllocation)
        Parameters:
        enableDynamicPortAllocation - Enable Dynamic Port Allocation. If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config. If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm. If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config. Mutually exclusive with enableEndpointIndependentMapping. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_dynamic_port_allocation ComputeRouterNat#enable_dynamic_port_allocation}
        Returns:
        this
      • enableDynamicPortAllocation

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder enableDynamicPortAllocation​(com.hashicorp.cdktf.IResolvable enableDynamicPortAllocation)
        Parameters:
        enableDynamicPortAllocation - Enable Dynamic Port Allocation. If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32. If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config. If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm. If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config. Mutually exclusive with enableEndpointIndependentMapping. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_dynamic_port_allocation ComputeRouterNat#enable_dynamic_port_allocation}
        Returns:
        this
      • enableEndpointIndependentMapping

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder enableEndpointIndependentMapping​(Boolean enableEndpointIndependentMapping)
        Parameters:
        enableEndpointIndependentMapping - Enable endpoint independent mapping. For more information see the official documentation. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_endpoint_independent_mapping ComputeRouterNat#enable_endpoint_independent_mapping}
        Returns:
        this
      • enableEndpointIndependentMapping

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder enableEndpointIndependentMapping​(com.hashicorp.cdktf.IResolvable enableEndpointIndependentMapping)
        Parameters:
        enableEndpointIndependentMapping - Enable endpoint independent mapping. For more information see the official documentation. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#enable_endpoint_independent_mapping ComputeRouterNat#enable_endpoint_independent_mapping}
        Returns:
        this
      • endpointTypes

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder endpointTypes​(List<String> endpointTypes)
        Parameters:
        endpointTypes - Specifies the endpoint Types supported by the NAT Gateway. Supported values include: 'ENDPOINT_TYPE_VM', 'ENDPOINT_TYPE_SWG', 'ENDPOINT_TYPE_MANAGED_PROXY_LB'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#endpoint_types ComputeRouterNat#endpoint_types}
        Returns:
        this
      • icmpIdleTimeoutSec

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder icmpIdleTimeoutSec​(Number icmpIdleTimeoutSec)
        Parameters:
        icmpIdleTimeoutSec - Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#icmp_idle_timeout_sec ComputeRouterNat#icmp_idle_timeout_sec}
        Returns:
        this
      • id

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder id​(String id)
        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#id ComputeRouterNat#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
      • maxPortsPerVm

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder maxPortsPerVm​(Number maxPortsPerVm)
        Parameters:
        maxPortsPerVm - Maximum number of ports allocated to a VM from this NAT. This field can only be set when enableDynamicPortAllocation is enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#max_ports_per_vm ComputeRouterNat#max_ports_per_vm}
        Returns:
        this
      • minPortsPerVm

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder minPortsPerVm​(Number minPortsPerVm)
        Parameters:
        minPortsPerVm - Minimum number of ports allocated to a VM from this NAT. Defaults to 64 for static port allocation and 32 dynamic port allocation if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#min_ports_per_vm ComputeRouterNat#min_ports_per_vm}
        Returns:
        this
      • natIpAllocateOption

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder natIpAllocateOption​(String natIpAllocateOption)
        Parameters:
        natIpAllocateOption - How external IPs should be allocated for this NAT. Valid values are 'AUTO_ONLY' for only allowing NAT IPs allocated by Google Cloud Platform, or 'MANUAL_ONLY' for only user-allocated NAT IP addresses. Possible values: ["MANUAL_ONLY", "AUTO_ONLY"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#nat_ip_allocate_option ComputeRouterNat#nat_ip_allocate_option}
        Returns:
        this
      • natIps

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder natIps​(List<String> natIps)
        Parameters:
        natIps - Self-links of NAT IPs. Only valid if natIpAllocateOption is set to MANUAL_ONLY. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#nat_ips ComputeRouterNat#nat_ips}
        Returns:
        this
      • region

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder region​(String region)
        Parameters:
        region - Region where the router and NAT reside. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#region ComputeRouterNat#region}
        Returns:
        this
      • rules

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder rules​(com.hashicorp.cdktf.IResolvable rules)
        Parameters:
        rules - rules block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#rules ComputeRouterNat#rules}
        Returns:
        this
      • subnetwork

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder subnetwork​(com.hashicorp.cdktf.IResolvable subnetwork)
        Parameters:
        subnetwork - subnetwork block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#subnetwork ComputeRouterNat#subnetwork}
        Returns:
        this
      • tcpEstablishedIdleTimeoutSec

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder tcpEstablishedIdleTimeoutSec​(Number tcpEstablishedIdleTimeoutSec)
        Parameters:
        tcpEstablishedIdleTimeoutSec - Timeout (in seconds) for TCP established connections. Defaults to 1200s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_established_idle_timeout_sec ComputeRouterNat#tcp_established_idle_timeout_sec}
        Returns:
        this
      • tcpTimeWaitTimeoutSec

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder tcpTimeWaitTimeoutSec​(Number tcpTimeWaitTimeoutSec)
        Parameters:
        tcpTimeWaitTimeoutSec - Timeout (in seconds) for TCP connections that are in TIME_WAIT state. Defaults to 120s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_time_wait_timeout_sec ComputeRouterNat#tcp_time_wait_timeout_sec}
        Returns:
        this
      • tcpTransitoryIdleTimeoutSec

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder tcpTransitoryIdleTimeoutSec​(Number tcpTransitoryIdleTimeoutSec)
        Parameters:
        tcpTransitoryIdleTimeoutSec - Timeout (in seconds) for TCP transitory connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#tcp_transitory_idle_timeout_sec ComputeRouterNat#tcp_transitory_idle_timeout_sec}
        Returns:
        this
      • udpIdleTimeoutSec

        @Stability(Stable)
        public ComputeRouterNatConfig.Builder udpIdleTimeoutSec​(Number udpIdleTimeoutSec)
        Parameters:
        udpIdleTimeoutSec - Timeout (in seconds) for UDP connections. Defaults to 30s if not set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_nat#udp_idle_timeout_sec ComputeRouterNat#udp_idle_timeout_sec}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder count​(Number count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Sets the value of TerraformMetaArguments.getDependsOn()
        Parameters:
        dependsOn - the value to be set.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Sets the value of TerraformMetaArguments.getForEach()
        Parameters:
        forEach - the value to be set.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Sets the value of TerraformMetaArguments.getLifecycle()
        Parameters:
        lifecycle - the value to be set.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Sets the value of TerraformMetaArguments.getProvider()
        Parameters:
        provider - the value to be set.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public ComputeRouterNatConfig.Builder provisioners​(List<? extends Object> provisioners)
        Sets the value of TerraformMetaArguments.getProvisioners()
        Parameters:
        provisioners - the value to be set.
        Returns:
        this