Class ComputeRouterPeerConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • interfaceValue

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder interfaceValue​(String interfaceValue)
        Parameters:
        interfaceValue - Name of the interface the BGP peer is associated with. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#interface ComputeRouterPeer#interface}
        Returns:
        this
      • name

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder name​(String name)
        Parameters:
        name - Name of this BGP peer. 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_router_peer#name ComputeRouterPeer#name}
        Returns:
        this
      • peerAsn

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder peerAsn​(Number peerAsn)
        Parameters:
        peerAsn - Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#peer_asn ComputeRouterPeer#peer_asn}
        Returns:
        this
      • router

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder router​(String router)
        Parameters:
        router - The name of the Cloud Router in which this BgpPeer 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_peer#router ComputeRouterPeer#router}
        Returns:
        this
      • advertisedGroups

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder advertisedGroups​(List<String> advertisedGroups)
        Parameters:
        advertisedGroups - User-specified list of prefix groups to advertise in custom mode, which currently supports the following option:. * 'ALL_SUBNETS': Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertiseMode is 'CUSTOM' and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#advertised_groups ComputeRouterPeer#advertised_groups}
        Returns:
        this
      • advertisedIpRanges

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder advertisedIpRanges​(com.hashicorp.cdktf.IResolvable advertisedIpRanges)
        Parameters:
        advertisedIpRanges - advertised_ip_ranges block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#advertised_ip_ranges ComputeRouterPeer#advertised_ip_ranges}
        Returns:
        this
      • advertisedRoutePriority

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder advertisedRoutePriority​(Number advertisedRoutePriority)
        Parameters:
        advertisedRoutePriority - The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#advertised_route_priority ComputeRouterPeer#advertised_route_priority}
        Returns:
        this
      • advertiseMode

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder advertiseMode​(String advertiseMode)
        Parameters:
        advertiseMode - User-specified flag to indicate which mode to use for advertisement. Valid values of this enum field are: 'DEFAULT', 'CUSTOM' Default value: "DEFAULT" Possible values: ["DEFAULT", "CUSTOM"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#advertise_mode ComputeRouterPeer#advertise_mode}
        Returns:
        this
      • customLearnedIpRanges

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder customLearnedIpRanges​(com.hashicorp.cdktf.IResolvable customLearnedIpRanges)
        Parameters:
        customLearnedIpRanges - custom_learned_ip_ranges block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#custom_learned_ip_ranges ComputeRouterPeer#custom_learned_ip_ranges}
        Returns:
        this
      • customLearnedRoutePriority

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder customLearnedRoutePriority​(Number customLearnedRoutePriority)
        Parameters:
        customLearnedRoutePriority - The user-defined custom learned route priority for a BGP session. This value is applied to all custom learned route ranges for the session. You can choose a value from 0 to 65335. If you don't provide a value, Google Cloud assigns a priority of 100 to the ranges. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#custom_learned_route_priority ComputeRouterPeer#custom_learned_route_priority}
        Returns:
        this
      • enable

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enable​(Boolean enable)
        Parameters:
        enable - The status of the BGP peer connection. If set to false, any active session with the peer is terminated and all associated routing information is removed. If set to true, the peer connection can be established with routing information. The default is true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable ComputeRouterPeer#enable}
        Returns:
        this
      • enable

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enable​(com.hashicorp.cdktf.IResolvable enable)
        Parameters:
        enable - The status of the BGP peer connection. If set to false, any active session with the peer is terminated and all associated routing information is removed. If set to true, the peer connection can be established with routing information. The default is true. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable ComputeRouterPeer#enable}
        Returns:
        this
      • enableIpv4

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enableIpv4​(Boolean enableIpv4)
        Parameters:
        enableIpv4 - Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable_ipv4 ComputeRouterPeer#enable_ipv4}
        Returns:
        this
      • enableIpv4

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enableIpv4​(com.hashicorp.cdktf.IResolvable enableIpv4)
        Parameters:
        enableIpv4 - Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable_ipv4 ComputeRouterPeer#enable_ipv4}
        Returns:
        this
      • enableIpv6

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enableIpv6​(Boolean enableIpv6)
        Parameters:
        enableIpv6 - Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable_ipv6 ComputeRouterPeer#enable_ipv6}
        Returns:
        this
      • enableIpv6

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder enableIpv6​(com.hashicorp.cdktf.IResolvable enableIpv6)
        Parameters:
        enableIpv6 - Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#enable_ipv6 ComputeRouterPeer#enable_ipv6}
        Returns:
        this
      • id

        @Stability(Stable)
        public ComputeRouterPeerConfig.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_peer#id ComputeRouterPeer#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
      • ipAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder ipAddress​(String ipAddress)
        Parameters:
        ipAddress - IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#ip_address ComputeRouterPeer#ip_address}
        Returns:
        this
      • ipv4NexthopAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder ipv4NexthopAddress​(String ipv4NexthopAddress)
        Parameters:
        ipv4NexthopAddress - IPv4 address of the interface inside Google Cloud Platform. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#ipv4_nexthop_address ComputeRouterPeer#ipv4_nexthop_address}
        Returns:
        this
      • ipv6NexthopAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder ipv6NexthopAddress​(String ipv6NexthopAddress)
        Parameters:
        ipv6NexthopAddress - IPv6 address of the interface inside Google Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, Google Cloud automatically assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#ipv6_nexthop_address ComputeRouterPeer#ipv6_nexthop_address}
        Returns:
        this
      • peerIpAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder peerIpAddress​(String peerIpAddress)
        Parameters:
        peerIpAddress - IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. Required if 'ip_address' is set. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#peer_ip_address ComputeRouterPeer#peer_ip_address}
        Returns:
        this
      • peerIpv4NexthopAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder peerIpv4NexthopAddress​(String peerIpv4NexthopAddress)
        Parameters:
        peerIpv4NexthopAddress - IPv4 address of the BGP interface outside Google Cloud Platform. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#peer_ipv4_nexthop_address ComputeRouterPeer#peer_ipv4_nexthop_address}
        Returns:
        this
      • peerIpv6NexthopAddress

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder peerIpv6NexthopAddress​(String peerIpv6NexthopAddress)
        Parameters:
        peerIpv6NexthopAddress - IPv6 address of the BGP interface outside Google Cloud Platform. The address must be in the range 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64. If you do not specify the next hop addresses, Google Cloud automatically assigns unused addresses from the 2600:2d00:0:2::/64 or 2600:2d00:0:3::/64 range for you. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#peer_ipv6_nexthop_address ComputeRouterPeer#peer_ipv6_nexthop_address}
        Returns:
        this
      • region

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder region​(String region)
        Parameters:
        region - Region where the router and BgpPeer reside. If it is not provided, the provider region is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#region ComputeRouterPeer#region}
        Returns:
        this
      • routerApplianceInstance

        @Stability(Stable)
        public ComputeRouterPeerConfig.Builder routerApplianceInstance​(String routerApplianceInstance)
        Parameters:
        routerApplianceInstance - The URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_router_peer#router_appliance_instance ComputeRouterPeer#router_appliance_instance}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeRouterPeerConfig.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 ComputeRouterPeerConfig.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 ComputeRouterPeerConfig.Builder count​(Number count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • count

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