com.pulumi.gcp.compute.kotlin.GlobalNetworkEndpointGroupArgs.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.GlobalNetworkEndpointGroupArgs.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 global network endpoint group contains endpoints that reside outside of Google Cloud.
* Currently a global network endpoint group can only support a single endpoint.
* Recreating a global network endpoint group that's in use by another resource will give a
* `resourceInUseByAnotherResource` error. Use `lifecycle.create_before_destroy`
* to avoid this type of error.
* To get more information about GlobalNetworkEndpointGroup, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/networkEndpointGroups)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/load-balancing/docs/negs/internet-neg-concepts)
* ## Example Usage
* ### Global Network Endpoint Group
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
* name: "my-lb-neg",
* defaultPort: 90,
* networkEndpointType: "INTERNET_FQDN_PORT",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
* name="my-lb-neg",
* default_port=90,
* network_endpoint_type="INTERNET_FQDN_PORT")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var neg = new Gcp.Compute.GlobalNetworkEndpointGroup("neg", new()
* {
* Name = "my-lb-neg",
* DefaultPort = 90,
* NetworkEndpointType = "INTERNET_FQDN_PORT",
* });
* });
* ```
* ```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.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
* Name: pulumi.String("my-lb-neg"),
* DefaultPort: pulumi.Int(90),
* NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
* })
* 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.GlobalNetworkEndpointGroup;
* import com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs;
* 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 neg = new GlobalNetworkEndpointGroup("neg", GlobalNetworkEndpointGroupArgs.builder()
* .name("my-lb-neg")
* .defaultPort("90")
* .networkEndpointType("INTERNET_FQDN_PORT")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* neg:
* type: gcp:compute:GlobalNetworkEndpointGroup
* properties:
* name: my-lb-neg
* defaultPort: '90'
* networkEndpointType: INTERNET_FQDN_PORT
* ```
*
* ### Global Network Endpoint Group Ip Address
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
* name: "my-lb-neg",
* networkEndpointType: "INTERNET_IP_PORT",
* defaultPort: 90,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
* name="my-lb-neg",
* network_endpoint_type="INTERNET_IP_PORT",
* default_port=90)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var neg = new Gcp.Compute.GlobalNetworkEndpointGroup("neg", new()
* {
* Name = "my-lb-neg",
* NetworkEndpointType = "INTERNET_IP_PORT",
* DefaultPort = 90,
* });
* });
* ```
* ```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.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
* Name: pulumi.String("my-lb-neg"),
* NetworkEndpointType: pulumi.String("INTERNET_IP_PORT"),
* DefaultPort: pulumi.Int(90),
* })
* 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.GlobalNetworkEndpointGroup;
* import com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs;
* 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 neg = new GlobalNetworkEndpointGroup("neg", GlobalNetworkEndpointGroupArgs.builder()
* .name("my-lb-neg")
* .networkEndpointType("INTERNET_IP_PORT")
* .defaultPort(90)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* neg:
* type: gcp:compute:GlobalNetworkEndpointGroup
* properties:
* name: my-lb-neg
* networkEndpointType: INTERNET_IP_PORT
* defaultPort: 90
* ```
*
* ## Import
* GlobalNetworkEndpointGroup can be imported using any of these accepted formats:
* * `projects/{{project}}/global/networkEndpointGroups/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, GlobalNetworkEndpointGroup can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/globalNetworkEndpointGroup:GlobalNetworkEndpointGroup default projects/{{project}}/global/networkEndpointGroups/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/globalNetworkEndpointGroup:GlobalNetworkEndpointGroup default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/globalNetworkEndpointGroup:GlobalNetworkEndpointGroup default {{name}}
* ```
* @property defaultPort The default port used if the port number is not specified in the
* network endpoint.
* @property description An optional description of this resource. Provide this property when
* you create the resource.
* @property name Name of the resource; provided by the client when the resource is
* created. 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?` 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.
* @property networkEndpointType Type of network endpoints in this network endpoint group.
* Possible values are: `INTERNET_IP_PORT`, `INTERNET_FQDN_PORT`.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class GlobalNetworkEndpointGroupArgs(
public val defaultPort: Output? = null,
public val description: Output? = null,
public val name: Output? = null,
public val networkEndpointType: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs =
com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs.builder()
.defaultPort(defaultPort?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.networkEndpointType(networkEndpointType?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [GlobalNetworkEndpointGroupArgs].
*/
@PulumiTagMarker
public class GlobalNetworkEndpointGroupArgsBuilder internal constructor() {
private var defaultPort: Output? = null
private var description: Output? = null
private var name: Output? = null
private var networkEndpointType: Output? = null
private var project: Output? = null
/**
* @param value The default port used if the port number is not specified in the
* network endpoint.
*/
@JvmName("jnggaxbstogkkbqd")
public suspend fun defaultPort(`value`: Output) {
this.defaultPort = value
}
/**
* @param value An optional description of this resource. Provide this property when
* you create the resource.
*/
@JvmName("ddffwlkvaqpqagth")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Name of the resource; provided by the client when the resource is
* created. 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?` 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.
*/
@JvmName("uhcbgvkwmvvxoyxq")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Type of network endpoints in this network endpoint group.
* Possible values are: `INTERNET_IP_PORT`, `INTERNET_FQDN_PORT`.
* - - -
*/
@JvmName("mxugwosueqioecdg")
public suspend fun networkEndpointType(`value`: Output) {
this.networkEndpointType = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("brfagnjqkgfbeokt")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The default port used if the port number is not specified in the
* network endpoint.
*/
@JvmName("awfhoglxuwyopbnf")
public suspend fun defaultPort(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultPort = mapped
}
/**
* @param value An optional description of this resource. Provide this property when
* you create the resource.
*/
@JvmName("siuafuxuyixjshoc")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Name of the resource; provided by the client when the resource is
* created. 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?` 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.
*/
@JvmName("wjypmrkwlwhyjhtx")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Type of network endpoints in this network endpoint group.
* Possible values are: `INTERNET_IP_PORT`, `INTERNET_FQDN_PORT`.
* - - -
*/
@JvmName("kybyvseislfijgft")
public suspend fun networkEndpointType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkEndpointType = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("wncnbckexepqorpc")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): GlobalNetworkEndpointGroupArgs = GlobalNetworkEndpointGroupArgs(
defaultPort = defaultPort,
description = description,
name = name,
networkEndpointType = networkEndpointType,
project = project,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy