com.pulumi.gcp.compute.kotlin.RegionNetworkEndpointArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RegionNetworkEndpointArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* A Region network endpoint represents a IP address/FQDN and port combination that is
* part of a specific network endpoint group (NEG).
* > **NOTE**: Network endpoints cannot be created outside of a network endpoint group.
* To get more information about RegionNetworkEndpoint, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/regionNetworkEndpointGroups)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/)
* * [Internet NEGs Official Documentation](https://cloud.google.com/load-balancing/docs/negs/internet-neg-concepts)
* ## Example Usage
* ### Region Network Endpoint Internet Ip Port
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.compute.Network("default", {
* name: "network",
* autoCreateSubnetworks: false,
* });
* const group = new gcp.compute.RegionNetworkEndpointGroup("group", {
* name: "ip-port-neg",
* network: _default.id,
* region: "us-central1",
* networkEndpointType: "INTERNET_IP_PORT",
* });
* const region_internet_ip_port_endpoint = new gcp.compute.RegionNetworkEndpoint("region-internet-ip-port-endpoint", {
* regionNetworkEndpointGroup: group.name,
* region: "us-central1",
* ipAddress: "8.8.8.8",
* port: 443,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.Network("default",
* name="network",
* auto_create_subnetworks=False)
* group = gcp.compute.RegionNetworkEndpointGroup("group",
* name="ip-port-neg",
* network=default.id,
* region="us-central1",
* network_endpoint_type="INTERNET_IP_PORT")
* region_internet_ip_port_endpoint = gcp.compute.RegionNetworkEndpoint("region-internet-ip-port-endpoint",
* region_network_endpoint_group=group.name,
* region="us-central1",
* ip_address="8.8.8.8",
* port=443)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.Compute.Network("default", new()
* {
* Name = "network",
* AutoCreateSubnetworks = false,
* });
* var @group = new Gcp.Compute.RegionNetworkEndpointGroup("group", new()
* {
* Name = "ip-port-neg",
* Network = @default.Id,
* Region = "us-central1",
* NetworkEndpointType = "INTERNET_IP_PORT",
* });
* var region_internet_ip_port_endpoint = new Gcp.Compute.RegionNetworkEndpoint("region-internet-ip-port-endpoint", new()
* {
* RegionNetworkEndpointGroup = @group.Name,
* Region = "us-central1",
* IpAddress = "8.8.8.8",
* Port = 443,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* group, err := compute.NewRegionNetworkEndpointGroup(ctx, "group", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("ip-port-neg"),
* Network: _default.ID(),
* Region: pulumi.String("us-central1"),
* NetworkEndpointType: pulumi.String("INTERNET_IP_PORT"),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionNetworkEndpoint(ctx, "region-internet-ip-port-endpoint", &compute.RegionNetworkEndpointArgs{
* RegionNetworkEndpointGroup: group.Name,
* Region: pulumi.String("us-central1"),
* IpAddress: pulumi.String("8.8.8.8"),
* Port: pulumi.Int(443),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpoint;
* import com.pulumi.gcp.compute.RegionNetworkEndpointArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new Network("default", NetworkArgs.builder()
* .name("network")
* .autoCreateSubnetworks(false)
* .build());
* var group = new RegionNetworkEndpointGroup("group", RegionNetworkEndpointGroupArgs.builder()
* .name("ip-port-neg")
* .network(default_.id())
* .region("us-central1")
* .networkEndpointType("INTERNET_IP_PORT")
* .build());
* var region_internet_ip_port_endpoint = new RegionNetworkEndpoint("region-internet-ip-port-endpoint", RegionNetworkEndpointArgs.builder()
* .regionNetworkEndpointGroup(group.name())
* .region("us-central1")
* .ipAddress("8.8.8.8")
* .port(443)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* region-internet-ip-port-endpoint:
* type: gcp:compute:RegionNetworkEndpoint
* properties:
* regionNetworkEndpointGroup: ${group.name}
* region: us-central1
* ipAddress: 8.8.8.8
* port: 443
* group:
* type: gcp:compute:RegionNetworkEndpointGroup
* properties:
* name: ip-port-neg
* network: ${default.id}
* region: us-central1
* networkEndpointType: INTERNET_IP_PORT
* default:
* type: gcp:compute:Network
* properties:
* name: network
* autoCreateSubnetworks: false
* ```
*
* ### Region Network Endpoint Internet Fqdn Port
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.compute.Network("default", {
* name: "network",
* autoCreateSubnetworks: false,
* });
* const group = new gcp.compute.RegionNetworkEndpointGroup("group", {
* name: "fqdn-port-neg",
* network: _default.id,
* region: "us-central1",
* networkEndpointType: "INTERNET_FQDN_PORT",
* });
* const region_internet_fqdn_port_endpoint = new gcp.compute.RegionNetworkEndpoint("region-internet-fqdn-port-endpoint", {
* regionNetworkEndpointGroup: group.name,
* region: "us-central1",
* fqdn: "backend.example.com",
* port: 443,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.Network("default",
* name="network",
* auto_create_subnetworks=False)
* group = gcp.compute.RegionNetworkEndpointGroup("group",
* name="fqdn-port-neg",
* network=default.id,
* region="us-central1",
* network_endpoint_type="INTERNET_FQDN_PORT")
* region_internet_fqdn_port_endpoint = gcp.compute.RegionNetworkEndpoint("region-internet-fqdn-port-endpoint",
* region_network_endpoint_group=group.name,
* region="us-central1",
* fqdn="backend.example.com",
* port=443)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.Compute.Network("default", new()
* {
* Name = "network",
* AutoCreateSubnetworks = false,
* });
* var @group = new Gcp.Compute.RegionNetworkEndpointGroup("group", new()
* {
* Name = "fqdn-port-neg",
* Network = @default.Id,
* Region = "us-central1",
* NetworkEndpointType = "INTERNET_FQDN_PORT",
* });
* var region_internet_fqdn_port_endpoint = new Gcp.Compute.RegionNetworkEndpoint("region-internet-fqdn-port-endpoint", new()
* {
* RegionNetworkEndpointGroup = @group.Name,
* Region = "us-central1",
* Fqdn = "backend.example.com",
* Port = 443,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("network"),
* AutoCreateSubnetworks: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* group, err := compute.NewRegionNetworkEndpointGroup(ctx, "group", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("fqdn-port-neg"),
* Network: _default.ID(),
* Region: pulumi.String("us-central1"),
* NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionNetworkEndpoint(ctx, "region-internet-fqdn-port-endpoint", &compute.RegionNetworkEndpointArgs{
* RegionNetworkEndpointGroup: group.Name,
* Region: pulumi.String("us-central1"),
* Fqdn: pulumi.String("backend.example.com"),
* Port: pulumi.Int(443),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpoint;
* import com.pulumi.gcp.compute.RegionNetworkEndpointArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var default_ = new Network("default", NetworkArgs.builder()
* .name("network")
* .autoCreateSubnetworks(false)
* .build());
* var group = new RegionNetworkEndpointGroup("group", RegionNetworkEndpointGroupArgs.builder()
* .name("fqdn-port-neg")
* .network(default_.id())
* .region("us-central1")
* .networkEndpointType("INTERNET_FQDN_PORT")
* .build());
* var region_internet_fqdn_port_endpoint = new RegionNetworkEndpoint("region-internet-fqdn-port-endpoint", RegionNetworkEndpointArgs.builder()
* .regionNetworkEndpointGroup(group.name())
* .region("us-central1")
* .fqdn("backend.example.com")
* .port(443)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* region-internet-fqdn-port-endpoint:
* type: gcp:compute:RegionNetworkEndpoint
* properties:
* regionNetworkEndpointGroup: ${group.name}
* region: us-central1
* fqdn: backend.example.com
* port: 443
* group:
* type: gcp:compute:RegionNetworkEndpointGroup
* properties:
* name: fqdn-port-neg
* network: ${default.id}
* region: us-central1
* networkEndpointType: INTERNET_FQDN_PORT
* default:
* type: gcp:compute:Network
* properties:
* name: network
* autoCreateSubnetworks: false
* ```
*
* ## Import
* RegionNetworkEndpoint can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}`
* * `{{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}`
* * `{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}`
* * `{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}`
* When using the `pulumi import` command, RegionNetworkEndpoint can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
* ```
* @property fqdn Fully qualified domain name of network endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
* @property ipAddress IPv4 address external endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_IP_PORT.
* @property port Port number of network endpoint.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property region Region where the containing network endpoint group is located.
* @property regionNetworkEndpointGroup The network endpoint group this endpoint is part of.
* - - -
*/
public data class RegionNetworkEndpointArgs(
public val fqdn: Output? = null,
public val ipAddress: Output? = null,
public val port: Output? = null,
public val project: Output? = null,
public val region: Output? = null,
public val regionNetworkEndpointGroup: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RegionNetworkEndpointArgs =
com.pulumi.gcp.compute.RegionNetworkEndpointArgs.builder()
.fqdn(fqdn?.applyValue({ args0 -> args0 }))
.ipAddress(ipAddress?.applyValue({ args0 -> args0 }))
.port(port?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.regionNetworkEndpointGroup(regionNetworkEndpointGroup?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionNetworkEndpointArgs].
*/
@PulumiTagMarker
public class RegionNetworkEndpointArgsBuilder internal constructor() {
private var fqdn: Output? = null
private var ipAddress: Output? = null
private var port: Output? = null
private var project: Output? = null
private var region: Output? = null
private var regionNetworkEndpointGroup: Output? = null
/**
* @param value Fully qualified domain name of network endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
*/
@JvmName("hajhcgxvhtaagrny")
public suspend fun fqdn(`value`: Output) {
this.fqdn = value
}
/**
* @param value IPv4 address external endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_IP_PORT.
*/
@JvmName("wapqwaaafondlcca")
public suspend fun ipAddress(`value`: Output) {
this.ipAddress = value
}
/**
* @param value Port number of network endpoint.
*/
@JvmName("spbbceuwcanejgwh")
public suspend fun port(`value`: Output) {
this.port = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("cbuvqjjhwucpvrtc")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Region where the containing network endpoint group is located.
*/
@JvmName("fjggokewcpnktyvf")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value The network endpoint group this endpoint is part of.
* - - -
*/
@JvmName("rbgqcidcfmlctdfq")
public suspend fun regionNetworkEndpointGroup(`value`: Output) {
this.regionNetworkEndpointGroup = value
}
/**
* @param value Fully qualified domain name of network endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.
*/
@JvmName("bnkfrdedjgntpder")
public suspend fun fqdn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fqdn = mapped
}
/**
* @param value IPv4 address external endpoint.
* This can only be specified when network_endpoint_type of the NEG is INTERNET_IP_PORT.
*/
@JvmName("ykfcexibdqbokojc")
public suspend fun ipAddress(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipAddress = mapped
}
/**
* @param value Port number of network endpoint.
*/
@JvmName("kdsmmpmlufilldlc")
public suspend fun port(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.port = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rmpsrtiawxsuumck")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value Region where the containing network endpoint group is located.
*/
@JvmName("edxdnllibdanugaw")
public suspend fun region(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.region = mapped
}
/**
* @param value The network endpoint group this endpoint is part of.
* - - -
*/
@JvmName("sstggbbvrigtpmpd")
public suspend fun regionNetworkEndpointGroup(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.regionNetworkEndpointGroup = mapped
}
internal fun build(): RegionNetworkEndpointArgs = RegionNetworkEndpointArgs(
fqdn = fqdn,
ipAddress = ipAddress,
port = port,
project = project,
region = region,
regionNetworkEndpointGroup = regionNetworkEndpointGroup,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy