com.pulumi.gcp.compute.kotlin.RegionNetworkEndpointGroupArgs.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.RegionNetworkEndpointGroupArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupAppEngineArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupAppEngineArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupCloudFunctionArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupCloudFunctionArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupCloudRunArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupCloudRunArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupServerlessDeploymentArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionNetworkEndpointGroupServerlessDeploymentArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A regional NEG that can support Serverless Products and proxying traffic to external backends.
* To get more information about RegionNetworkEndpointGroup, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/regionNetworkEndpointGroups)
* * How-to Guides
* * [Serverless NEGs Official Documentation](https://cloud.google.com/load-balancing/docs/negs/serverless-neg-concepts)
* * [Internet NEGs Official Documentation](https://cloud.google.com/load-balancing/docs/negs/internet-neg-concepts)
* ## Example Usage
* ### Region Network Endpoint Group Functions
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const bucket = new gcp.storage.Bucket("bucket", {
* name: "cloudfunctions-function-example-bucket",
* location: "US",
* });
* const archive = new gcp.storage.BucketObject("archive", {
* name: "index.zip",
* bucket: bucket.name,
* source: new pulumi.asset.FileAsset("path/to/index.zip"),
* });
* const functionNegFunction = new gcp.cloudfunctions.Function("function_neg", {
* name: "function-neg",
* description: "My function",
* runtime: "nodejs10",
* availableMemoryMb: 128,
* sourceArchiveBucket: bucket.name,
* sourceArchiveObject: archive.name,
* triggerHttp: true,
* timeout: 60,
* entryPoint: "helloGET",
* });
* // Cloud Functions Example
* const functionNeg = new gcp.compute.RegionNetworkEndpointGroup("function_neg", {
* name: "function-neg",
* networkEndpointType: "SERVERLESS",
* region: "us-central1",
* cloudFunction: {
* "function": functionNegFunction.name,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* bucket = gcp.storage.Bucket("bucket",
* name="cloudfunctions-function-example-bucket",
* location="US")
* archive = gcp.storage.BucketObject("archive",
* name="index.zip",
* bucket=bucket.name,
* source=pulumi.FileAsset("path/to/index.zip"))
* function_neg_function = gcp.cloudfunctions.Function("function_neg",
* name="function-neg",
* description="My function",
* runtime="nodejs10",
* available_memory_mb=128,
* source_archive_bucket=bucket.name,
* source_archive_object=archive.name,
* trigger_http=True,
* timeout=60,
* entry_point="helloGET")
* # Cloud Functions Example
* function_neg = gcp.compute.RegionNetworkEndpointGroup("function_neg",
* name="function-neg",
* network_endpoint_type="SERVERLESS",
* region="us-central1",
* cloud_function=gcp.compute.RegionNetworkEndpointGroupCloudFunctionArgs(
* function=function_neg_function.name,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var bucket = new Gcp.Storage.Bucket("bucket", new()
* {
* Name = "cloudfunctions-function-example-bucket",
* Location = "US",
* });
* var archive = new Gcp.Storage.BucketObject("archive", new()
* {
* Name = "index.zip",
* Bucket = bucket.Name,
* Source = new FileAsset("path/to/index.zip"),
* });
* var functionNegFunction = new Gcp.CloudFunctions.Function("function_neg", new()
* {
* Name = "function-neg",
* Description = "My function",
* Runtime = "nodejs10",
* AvailableMemoryMb = 128,
* SourceArchiveBucket = bucket.Name,
* SourceArchiveObject = archive.Name,
* TriggerHttp = true,
* Timeout = 60,
* EntryPoint = "helloGET",
* });
* // Cloud Functions Example
* var functionNeg = new Gcp.Compute.RegionNetworkEndpointGroup("function_neg", new()
* {
* Name = "function-neg",
* NetworkEndpointType = "SERVERLESS",
* Region = "us-central1",
* CloudFunction = new Gcp.Compute.Inputs.RegionNetworkEndpointGroupCloudFunctionArgs
* {
* Function = functionNegFunction.Name,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudfunctions"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
* Name: pulumi.String("cloudfunctions-function-example-bucket"),
* Location: pulumi.String("US"),
* })
* if err != nil {
* return err
* }
* archive, err := storage.NewBucketObject(ctx, "archive", &storage.BucketObjectArgs{
* Name: pulumi.String("index.zip"),
* Bucket: bucket.Name,
* Source: pulumi.NewFileAsset("path/to/index.zip"),
* })
* if err != nil {
* return err
* }
* functionNegFunction, err := cloudfunctions.NewFunction(ctx, "function_neg", &cloudfunctions.FunctionArgs{
* Name: pulumi.String("function-neg"),
* Description: pulumi.String("My function"),
* Runtime: pulumi.String("nodejs10"),
* AvailableMemoryMb: pulumi.Int(128),
* SourceArchiveBucket: bucket.Name,
* SourceArchiveObject: archive.Name,
* TriggerHttp: pulumi.Bool(true),
* Timeout: pulumi.Int(60),
* EntryPoint: pulumi.String("helloGET"),
* })
* if err != nil {
* return err
* }
* // Cloud Functions Example
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "function_neg", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("function-neg"),
* NetworkEndpointType: pulumi.String("SERVERLESS"),
* Region: pulumi.String("us-central1"),
* CloudFunction: &compute.RegionNetworkEndpointGroupCloudFunctionArgs{
* Function: functionNegFunction.Name,
* },
* })
* 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.storage.Bucket;
* import com.pulumi.gcp.storage.BucketArgs;
* import com.pulumi.gcp.storage.BucketObject;
* import com.pulumi.gcp.storage.BucketObjectArgs;
* import com.pulumi.gcp.cloudfunctions.Function;
* import com.pulumi.gcp.cloudfunctions.FunctionArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.inputs.RegionNetworkEndpointGroupCloudFunctionArgs;
* import com.pulumi.asset.FileAsset;
* 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 bucket = new Bucket("bucket", BucketArgs.builder()
* .name("cloudfunctions-function-example-bucket")
* .location("US")
* .build());
* var archive = new BucketObject("archive", BucketObjectArgs.builder()
* .name("index.zip")
* .bucket(bucket.name())
* .source(new FileAsset("path/to/index.zip"))
* .build());
* var functionNegFunction = new Function("functionNegFunction", FunctionArgs.builder()
* .name("function-neg")
* .description("My function")
* .runtime("nodejs10")
* .availableMemoryMb(128)
* .sourceArchiveBucket(bucket.name())
* .sourceArchiveObject(archive.name())
* .triggerHttp(true)
* .timeout(60)
* .entryPoint("helloGET")
* .build());
* // Cloud Functions Example
* var functionNeg = new RegionNetworkEndpointGroup("functionNeg", RegionNetworkEndpointGroupArgs.builder()
* .name("function-neg")
* .networkEndpointType("SERVERLESS")
* .region("us-central1")
* .cloudFunction(RegionNetworkEndpointGroupCloudFunctionArgs.builder()
* .function(functionNegFunction.name())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # Cloud Functions Example
* functionNeg:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: function_neg
* properties:
* name: function-neg
* networkEndpointType: SERVERLESS
* region: us-central1
* cloudFunction:
* function: ${functionNegFunction.name}
* functionNegFunction:
* type: gcp:cloudfunctions:Function
* name: function_neg
* properties:
* name: function-neg
* description: My function
* runtime: nodejs10
* availableMemoryMb: 128
* sourceArchiveBucket: ${bucket.name}
* sourceArchiveObject: ${archive.name}
* triggerHttp: true
* timeout: 60
* entryPoint: helloGET
* bucket:
* type: gcp:storage:Bucket
* properties:
* name: cloudfunctions-function-example-bucket
* location: US
* archive:
* type: gcp:storage:BucketObject
* properties:
* name: index.zip
* bucket: ${bucket.name}
* source:
* fn::FileAsset: path/to/index.zip
* ```
*
* ### Region Network Endpoint Group Cloudrun
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const cloudrunNegService = new gcp.cloudrun.Service("cloudrun_neg", {
* name: "cloudrun-neg",
* location: "us-central1",
* template: {
* spec: {
* containers: [{
* image: "us-docker.pkg.dev/cloudrun/container/hello",
* }],
* },
* },
* traffics: [{
* percent: 100,
* latestRevision: true,
* }],
* });
* // Cloud Run Example
* const cloudrunNeg = new gcp.compute.RegionNetworkEndpointGroup("cloudrun_neg", {
* name: "cloudrun-neg",
* networkEndpointType: "SERVERLESS",
* region: "us-central1",
* cloudRun: {
* service: cloudrunNegService.name,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* cloudrun_neg_service = gcp.cloudrun.Service("cloudrun_neg",
* name="cloudrun-neg",
* location="us-central1",
* template=gcp.cloudrun.ServiceTemplateArgs(
* spec=gcp.cloudrun.ServiceTemplateSpecArgs(
* containers=[gcp.cloudrun.ServiceTemplateSpecContainerArgs(
* image="us-docker.pkg.dev/cloudrun/container/hello",
* )],
* ),
* ),
* traffics=[gcp.cloudrun.ServiceTrafficArgs(
* percent=100,
* latest_revision=True,
* )])
* # Cloud Run Example
* cloudrun_neg = gcp.compute.RegionNetworkEndpointGroup("cloudrun_neg",
* name="cloudrun-neg",
* network_endpoint_type="SERVERLESS",
* region="us-central1",
* cloud_run=gcp.compute.RegionNetworkEndpointGroupCloudRunArgs(
* service=cloudrun_neg_service.name,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var cloudrunNegService = new Gcp.CloudRun.Service("cloudrun_neg", new()
* {
* Name = "cloudrun-neg",
* Location = "us-central1",
* Template = new Gcp.CloudRun.Inputs.ServiceTemplateArgs
* {
* Spec = new Gcp.CloudRun.Inputs.ServiceTemplateSpecArgs
* {
* Containers = new[]
* {
* new Gcp.CloudRun.Inputs.ServiceTemplateSpecContainerArgs
* {
* Image = "us-docker.pkg.dev/cloudrun/container/hello",
* },
* },
* },
* },
* Traffics = new[]
* {
* new Gcp.CloudRun.Inputs.ServiceTrafficArgs
* {
* Percent = 100,
* LatestRevision = true,
* },
* },
* });
* // Cloud Run Example
* var cloudrunNeg = new Gcp.Compute.RegionNetworkEndpointGroup("cloudrun_neg", new()
* {
* Name = "cloudrun-neg",
* NetworkEndpointType = "SERVERLESS",
* Region = "us-central1",
* CloudRun = new Gcp.Compute.Inputs.RegionNetworkEndpointGroupCloudRunArgs
* {
* Service = cloudrunNegService.Name,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrun"
* "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 {
* cloudrunNegService, err := cloudrun.NewService(ctx, "cloudrun_neg", &cloudrun.ServiceArgs{
* Name: pulumi.String("cloudrun-neg"),
* Location: pulumi.String("us-central1"),
* Template: &cloudrun.ServiceTemplateArgs{
* Spec: &cloudrun.ServiceTemplateSpecArgs{
* Containers: cloudrun.ServiceTemplateSpecContainerArray{
* &cloudrun.ServiceTemplateSpecContainerArgs{
* Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
* },
* },
* },
* },
* Traffics: cloudrun.ServiceTrafficArray{
* &cloudrun.ServiceTrafficArgs{
* Percent: pulumi.Int(100),
* LatestRevision: pulumi.Bool(true),
* },
* },
* })
* if err != nil {
* return err
* }
* // Cloud Run Example
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "cloudrun_neg", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("cloudrun-neg"),
* NetworkEndpointType: pulumi.String("SERVERLESS"),
* Region: pulumi.String("us-central1"),
* CloudRun: &compute.RegionNetworkEndpointGroupCloudRunArgs{
* Service: cloudrunNegService.Name,
* },
* })
* 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.cloudrun.Service;
* import com.pulumi.gcp.cloudrun.ServiceArgs;
* import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateArgs;
* import com.pulumi.gcp.cloudrun.inputs.ServiceTemplateSpecArgs;
* import com.pulumi.gcp.cloudrun.inputs.ServiceTrafficArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.inputs.RegionNetworkEndpointGroupCloudRunArgs;
* 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 cloudrunNegService = new Service("cloudrunNegService", ServiceArgs.builder()
* .name("cloudrun-neg")
* .location("us-central1")
* .template(ServiceTemplateArgs.builder()
* .spec(ServiceTemplateSpecArgs.builder()
* .containers(ServiceTemplateSpecContainerArgs.builder()
* .image("us-docker.pkg.dev/cloudrun/container/hello")
* .build())
* .build())
* .build())
* .traffics(ServiceTrafficArgs.builder()
* .percent(100)
* .latestRevision(true)
* .build())
* .build());
* // Cloud Run Example
* var cloudrunNeg = new RegionNetworkEndpointGroup("cloudrunNeg", RegionNetworkEndpointGroupArgs.builder()
* .name("cloudrun-neg")
* .networkEndpointType("SERVERLESS")
* .region("us-central1")
* .cloudRun(RegionNetworkEndpointGroupCloudRunArgs.builder()
* .service(cloudrunNegService.name())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # Cloud Run Example
* cloudrunNeg:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: cloudrun_neg
* properties:
* name: cloudrun-neg
* networkEndpointType: SERVERLESS
* region: us-central1
* cloudRun:
* service: ${cloudrunNegService.name}
* cloudrunNegService:
* type: gcp:cloudrun:Service
* name: cloudrun_neg
* properties:
* name: cloudrun-neg
* location: us-central1
* template:
* spec:
* containers:
* - image: us-docker.pkg.dev/cloudrun/container/hello
* traffics:
* - percent: 100
* latestRevision: true
* ```
*
* ### Region Network Endpoint Group Appengine
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appengineNegBucket = new gcp.storage.Bucket("appengine_neg", {
* name: "appengine-neg",
* location: "US",
* });
* const appengineNegBucketObject = new gcp.storage.BucketObject("appengine_neg", {
* name: "hello-world.zip",
* bucket: appengineNegBucket.name,
* source: new pulumi.asset.FileAsset("./test-fixtures/hello-world.zip"),
* });
* const appengineNegFlexibleAppVersion = new gcp.appengine.FlexibleAppVersion("appengine_neg", {
* versionId: "v1",
* service: "appengine-network-endpoint-group",
* runtime: "nodejs",
* entrypoint: {
* shell: "node ./app.js",
* },
* deployment: {
* zip: {
* sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${appengineNegBucket.name}/${appengineNegBucketObject.name}`,
* },
* },
* livenessCheck: {
* path: "/",
* },
* readinessCheck: {
* path: "/",
* },
* envVariables: {
* port: "8080",
* },
* handlers: [{
* urlRegex: ".*\\/my-path\\/*",
* securityLevel: "SECURE_ALWAYS",
* login: "LOGIN_REQUIRED",
* authFailAction: "AUTH_FAIL_ACTION_REDIRECT",
* staticFiles: {
* path: "my-other-path",
* uploadPathRegex: ".*\\/my-path\\/*",
* },
* }],
* automaticScaling: {
* coolDownPeriod: "120s",
* cpuUtilization: {
* targetUtilization: 0.5,
* },
* },
* deleteServiceOnDestroy: true,
* });
* // App Engine Example
* const appengineNeg = new gcp.compute.RegionNetworkEndpointGroup("appengine_neg", {
* name: "appengine-neg",
* networkEndpointType: "SERVERLESS",
* region: "us-central1",
* appEngine: {
* service: appengineNegFlexibleAppVersion.service,
* version: appengineNegFlexibleAppVersion.versionId,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appengine_neg_bucket = gcp.storage.Bucket("appengine_neg",
* name="appengine-neg",
* location="US")
* appengine_neg_bucket_object = gcp.storage.BucketObject("appengine_neg",
* name="hello-world.zip",
* bucket=appengine_neg_bucket.name,
* source=pulumi.FileAsset("./test-fixtures/hello-world.zip"))
* appengine_neg_flexible_app_version = gcp.appengine.FlexibleAppVersion("appengine_neg",
* version_id="v1",
* service="appengine-network-endpoint-group",
* runtime="nodejs",
* entrypoint=gcp.appengine.FlexibleAppVersionEntrypointArgs(
* shell="node ./app.js",
* ),
* deployment=gcp.appengine.FlexibleAppVersionDeploymentArgs(
* zip=gcp.appengine.FlexibleAppVersionDeploymentZipArgs(
* source_url=pulumi.Output.all(appengine_neg_bucket.name, appengine_neg_bucket_object.name).apply(lambda appengineNegBucketName, appengineNegBucketObjectName: f"https://storage.googleapis.com/{appengine_neg_bucket_name}/{appengine_neg_bucket_object_name}"),
* ),
* ),
* liveness_check=gcp.appengine.FlexibleAppVersionLivenessCheckArgs(
* path="/",
* ),
* readiness_check=gcp.appengine.FlexibleAppVersionReadinessCheckArgs(
* path="/",
* ),
* env_variables={
* "port": "8080",
* },
* handlers=[gcp.appengine.FlexibleAppVersionHandlerArgs(
* url_regex=".*\\/my-path\\/*",
* security_level="SECURE_ALWAYS",
* login="LOGIN_REQUIRED",
* auth_fail_action="AUTH_FAIL_ACTION_REDIRECT",
* static_files=gcp.appengine.FlexibleAppVersionHandlerStaticFilesArgs(
* path="my-other-path",
* upload_path_regex=".*\\/my-path\\/*",
* ),
* )],
* automatic_scaling=gcp.appengine.FlexibleAppVersionAutomaticScalingArgs(
* cool_down_period="120s",
* cpu_utilization=gcp.appengine.FlexibleAppVersionAutomaticScalingCpuUtilizationArgs(
* target_utilization=0.5,
* ),
* ),
* delete_service_on_destroy=True)
* # App Engine Example
* appengine_neg = gcp.compute.RegionNetworkEndpointGroup("appengine_neg",
* name="appengine-neg",
* network_endpoint_type="SERVERLESS",
* region="us-central1",
* app_engine=gcp.compute.RegionNetworkEndpointGroupAppEngineArgs(
* service=appengine_neg_flexible_app_version.service,
* version=appengine_neg_flexible_app_version.version_id,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var appengineNegBucket = new Gcp.Storage.Bucket("appengine_neg", new()
* {
* Name = "appengine-neg",
* Location = "US",
* });
* var appengineNegBucketObject = new Gcp.Storage.BucketObject("appengine_neg", new()
* {
* Name = "hello-world.zip",
* Bucket = appengineNegBucket.Name,
* Source = new FileAsset("./test-fixtures/hello-world.zip"),
* });
* var appengineNegFlexibleAppVersion = new Gcp.AppEngine.FlexibleAppVersion("appengine_neg", new()
* {
* VersionId = "v1",
* Service = "appengine-network-endpoint-group",
* Runtime = "nodejs",
* Entrypoint = new Gcp.AppEngine.Inputs.FlexibleAppVersionEntrypointArgs
* {
* Shell = "node ./app.js",
* },
* Deployment = new Gcp.AppEngine.Inputs.FlexibleAppVersionDeploymentArgs
* {
* Zip = new Gcp.AppEngine.Inputs.FlexibleAppVersionDeploymentZipArgs
* {
* SourceUrl = Output.Tuple(appengineNegBucket.Name, appengineNegBucketObject.Name).Apply(values =>
* {
* var appengineNegBucketName = values.Item1;
* var appengineNegBucketObjectName = values.Item2;
* return $"https://storage.googleapis.com/{appengineNegBucketName}/{appengineNegBucketObjectName}";
* }),
* },
* },
* LivenessCheck = new Gcp.AppEngine.Inputs.FlexibleAppVersionLivenessCheckArgs
* {
* Path = "/",
* },
* ReadinessCheck = new Gcp.AppEngine.Inputs.FlexibleAppVersionReadinessCheckArgs
* {
* Path = "/",
* },
* EnvVariables =
* {
* { "port", "8080" },
* },
* Handlers = new[]
* {
* new Gcp.AppEngine.Inputs.FlexibleAppVersionHandlerArgs
* {
* UrlRegex = ".*\\/my-path\\/*",
* SecurityLevel = "SECURE_ALWAYS",
* Login = "LOGIN_REQUIRED",
* AuthFailAction = "AUTH_FAIL_ACTION_REDIRECT",
* StaticFiles = new Gcp.AppEngine.Inputs.FlexibleAppVersionHandlerStaticFilesArgs
* {
* Path = "my-other-path",
* UploadPathRegex = ".*\\/my-path\\/*",
* },
* },
* },
* AutomaticScaling = new Gcp.AppEngine.Inputs.FlexibleAppVersionAutomaticScalingArgs
* {
* CoolDownPeriod = "120s",
* CpuUtilization = new Gcp.AppEngine.Inputs.FlexibleAppVersionAutomaticScalingCpuUtilizationArgs
* {
* TargetUtilization = 0.5,
* },
* },
* DeleteServiceOnDestroy = true,
* });
* // App Engine Example
* var appengineNeg = new Gcp.Compute.RegionNetworkEndpointGroup("appengine_neg", new()
* {
* Name = "appengine-neg",
* NetworkEndpointType = "SERVERLESS",
* Region = "us-central1",
* AppEngine = new Gcp.Compute.Inputs.RegionNetworkEndpointGroupAppEngineArgs
* {
* Service = appengineNegFlexibleAppVersion.Service,
* Version = appengineNegFlexibleAppVersion.VersionId,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/appengine"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* appengineNegBucket, err := storage.NewBucket(ctx, "appengine_neg", &storage.BucketArgs{
* Name: pulumi.String("appengine-neg"),
* Location: pulumi.String("US"),
* })
* if err != nil {
* return err
* }
* appengineNegBucketObject, err := storage.NewBucketObject(ctx, "appengine_neg", &storage.BucketObjectArgs{
* Name: pulumi.String("hello-world.zip"),
* Bucket: appengineNegBucket.Name,
* Source: pulumi.NewFileAsset("./test-fixtures/hello-world.zip"),
* })
* if err != nil {
* return err
* }
* appengineNegFlexibleAppVersion, err := appengine.NewFlexibleAppVersion(ctx, "appengine_neg", &appengine.FlexibleAppVersionArgs{
* VersionId: pulumi.String("v1"),
* Service: pulumi.String("appengine-network-endpoint-group"),
* Runtime: pulumi.String("nodejs"),
* Entrypoint: &appengine.FlexibleAppVersionEntrypointArgs{
* Shell: pulumi.String("node ./app.js"),
* },
* Deployment: &appengine.FlexibleAppVersionDeploymentArgs{
* Zip: &appengine.FlexibleAppVersionDeploymentZipArgs{
* SourceUrl: pulumi.All(appengineNegBucket.Name, appengineNegBucketObject.Name).ApplyT(func(_args []interface{}) (string, error) {
* appengineNegBucketName := _args[0].(string)
* appengineNegBucketObjectName := _args[1].(string)
* return fmt.Sprintf("https://storage.googleapis.com/%v/%v", appengineNegBucketName, appengineNegBucketObjectName), nil
* }).(pulumi.StringOutput),
* },
* },
* LivenessCheck: &appengine.FlexibleAppVersionLivenessCheckArgs{
* Path: pulumi.String("/"),
* },
* ReadinessCheck: &appengine.FlexibleAppVersionReadinessCheckArgs{
* Path: pulumi.String("/"),
* },
* EnvVariables: pulumi.StringMap{
* "port": pulumi.String("8080"),
* },
* Handlers: appengine.FlexibleAppVersionHandlerArray{
* &appengine.FlexibleAppVersionHandlerArgs{
* UrlRegex: pulumi.String(".*\\/my-path\\/*"),
* SecurityLevel: pulumi.String("SECURE_ALWAYS"),
* Login: pulumi.String("LOGIN_REQUIRED"),
* AuthFailAction: pulumi.String("AUTH_FAIL_ACTION_REDIRECT"),
* StaticFiles: &appengine.FlexibleAppVersionHandlerStaticFilesArgs{
* Path: pulumi.String("my-other-path"),
* UploadPathRegex: pulumi.String(".*\\/my-path\\/*"),
* },
* },
* },
* AutomaticScaling: &appengine.FlexibleAppVersionAutomaticScalingArgs{
* CoolDownPeriod: pulumi.String("120s"),
* CpuUtilization: &appengine.FlexibleAppVersionAutomaticScalingCpuUtilizationArgs{
* TargetUtilization: pulumi.Float64(0.5),
* },
* },
* DeleteServiceOnDestroy: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* // App Engine Example
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "appengine_neg", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("appengine-neg"),
* NetworkEndpointType: pulumi.String("SERVERLESS"),
* Region: pulumi.String("us-central1"),
* AppEngine: &compute.RegionNetworkEndpointGroupAppEngineArgs{
* Service: appengineNegFlexibleAppVersion.Service,
* Version: appengineNegFlexibleAppVersion.VersionId,
* },
* })
* 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.storage.Bucket;
* import com.pulumi.gcp.storage.BucketArgs;
* import com.pulumi.gcp.storage.BucketObject;
* import com.pulumi.gcp.storage.BucketObjectArgs;
* import com.pulumi.gcp.appengine.FlexibleAppVersion;
* import com.pulumi.gcp.appengine.FlexibleAppVersionArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionEntrypointArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionDeploymentArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionDeploymentZipArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionLivenessCheckArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionReadinessCheckArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionHandlerArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionHandlerStaticFilesArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionAutomaticScalingArgs;
* import com.pulumi.gcp.appengine.inputs.FlexibleAppVersionAutomaticScalingCpuUtilizationArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.inputs.RegionNetworkEndpointGroupAppEngineArgs;
* import com.pulumi.asset.FileAsset;
* 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 appengineNegBucket = new Bucket("appengineNegBucket", BucketArgs.builder()
* .name("appengine-neg")
* .location("US")
* .build());
* var appengineNegBucketObject = new BucketObject("appengineNegBucketObject", BucketObjectArgs.builder()
* .name("hello-world.zip")
* .bucket(appengineNegBucket.name())
* .source(new FileAsset("./test-fixtures/hello-world.zip"))
* .build());
* var appengineNegFlexibleAppVersion = new FlexibleAppVersion("appengineNegFlexibleAppVersion", FlexibleAppVersionArgs.builder()
* .versionId("v1")
* .service("appengine-network-endpoint-group")
* .runtime("nodejs")
* .entrypoint(FlexibleAppVersionEntrypointArgs.builder()
* .shell("node ./app.js")
* .build())
* .deployment(FlexibleAppVersionDeploymentArgs.builder()
* .zip(FlexibleAppVersionDeploymentZipArgs.builder()
* .sourceUrl(Output.tuple(appengineNegBucket.name(), appengineNegBucketObject.name()).applyValue(values -> {
* var appengineNegBucketName = values.t1;
* var appengineNegBucketObjectName = values.t2;
* return String.format("https://storage.googleapis.com/%s/%s", appengineNegBucketName,appengineNegBucketObjectName);
* }))
* .build())
* .build())
* .livenessCheck(FlexibleAppVersionLivenessCheckArgs.builder()
* .path("/")
* .build())
* .readinessCheck(FlexibleAppVersionReadinessCheckArgs.builder()
* .path("/")
* .build())
* .envVariables(Map.of("port", "8080"))
* .handlers(FlexibleAppVersionHandlerArgs.builder()
* .urlRegex(".*\\/my-path\\/*")
* .securityLevel("SECURE_ALWAYS")
* .login("LOGIN_REQUIRED")
* .authFailAction("AUTH_FAIL_ACTION_REDIRECT")
* .staticFiles(FlexibleAppVersionHandlerStaticFilesArgs.builder()
* .path("my-other-path")
* .uploadPathRegex(".*\\/my-path\\/*")
* .build())
* .build())
* .automaticScaling(FlexibleAppVersionAutomaticScalingArgs.builder()
* .coolDownPeriod("120s")
* .cpuUtilization(FlexibleAppVersionAutomaticScalingCpuUtilizationArgs.builder()
* .targetUtilization(0.5)
* .build())
* .build())
* .deleteServiceOnDestroy(true)
* .build());
* // App Engine Example
* var appengineNeg = new RegionNetworkEndpointGroup("appengineNeg", RegionNetworkEndpointGroupArgs.builder()
* .name("appengine-neg")
* .networkEndpointType("SERVERLESS")
* .region("us-central1")
* .appEngine(RegionNetworkEndpointGroupAppEngineArgs.builder()
* .service(appengineNegFlexibleAppVersion.service())
* .version(appengineNegFlexibleAppVersion.versionId())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # App Engine Example
* appengineNeg:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: appengine_neg
* properties:
* name: appengine-neg
* networkEndpointType: SERVERLESS
* region: us-central1
* appEngine:
* service: ${appengineNegFlexibleAppVersion.service}
* version: ${appengineNegFlexibleAppVersion.versionId}
* appengineNegFlexibleAppVersion:
* type: gcp:appengine:FlexibleAppVersion
* name: appengine_neg
* properties:
* versionId: v1
* service: appengine-network-endpoint-group
* runtime: nodejs
* entrypoint:
* shell: node ./app.js
* deployment:
* zip:
* sourceUrl: https://storage.googleapis.com/${appengineNegBucket.name}/${appengineNegBucketObject.name}
* livenessCheck:
* path: /
* readinessCheck:
* path: /
* envVariables:
* port: '8080'
* handlers:
* - urlRegex: .*\/my-path\/*
* securityLevel: SECURE_ALWAYS
* login: LOGIN_REQUIRED
* authFailAction: AUTH_FAIL_ACTION_REDIRECT
* staticFiles:
* path: my-other-path
* uploadPathRegex: .*\/my-path\/*
* automaticScaling:
* coolDownPeriod: 120s
* cpuUtilization:
* targetUtilization: 0.5
* deleteServiceOnDestroy: true
* appengineNegBucket:
* type: gcp:storage:Bucket
* name: appengine_neg
* properties:
* name: appengine-neg
* location: US
* appengineNegBucketObject:
* type: gcp:storage:BucketObject
* name: appengine_neg
* properties:
* name: hello-world.zip
* bucket: ${appengineNegBucket.name}
* source:
* fn::FileAsset: ./test-fixtures/hello-world.zip
* ```
*
* ### Region Network Endpoint Group Appengine Empty
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* // App Engine Example
* const appengineNeg = new gcp.compute.RegionNetworkEndpointGroup("appengine_neg", {
* name: "appengine-neg",
* networkEndpointType: "SERVERLESS",
* region: "us-central1",
* appEngine: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* # App Engine Example
* appengine_neg = gcp.compute.RegionNetworkEndpointGroup("appengine_neg",
* name="appengine-neg",
* network_endpoint_type="SERVERLESS",
* region="us-central1",
* app_engine=gcp.compute.RegionNetworkEndpointGroupAppEngineArgs())
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* // App Engine Example
* var appengineNeg = new Gcp.Compute.RegionNetworkEndpointGroup("appengine_neg", new()
* {
* Name = "appengine-neg",
* NetworkEndpointType = "SERVERLESS",
* Region = "us-central1",
* AppEngine = null,
* });
* });
* ```
* ```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 {
* // App Engine Example
* _, err := compute.NewRegionNetworkEndpointGroup(ctx, "appengine_neg", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("appengine-neg"),
* NetworkEndpointType: pulumi.String("SERVERLESS"),
* Region: pulumi.String("us-central1"),
* AppEngine: nil,
* })
* 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.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* import com.pulumi.gcp.compute.inputs.RegionNetworkEndpointGroupAppEngineArgs;
* 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) {
* // App Engine Example
* var appengineNeg = new RegionNetworkEndpointGroup("appengineNeg", RegionNetworkEndpointGroupArgs.builder()
* .name("appengine-neg")
* .networkEndpointType("SERVERLESS")
* .region("us-central1")
* .appEngine()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # App Engine Example
* appengineNeg:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: appengine_neg
* properties:
* name: appengine-neg
* networkEndpointType: SERVERLESS
* region: us-central1
* appEngine: {}
* ```
*
* ### Region Network Endpoint Group Psc
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const pscNeg = new gcp.compute.RegionNetworkEndpointGroup("psc_neg", {
* name: "psc-neg",
* region: "asia-northeast3",
* networkEndpointType: "PRIVATE_SERVICE_CONNECT",
* pscTargetService: "asia-northeast3-cloudkms.googleapis.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* psc_neg = gcp.compute.RegionNetworkEndpointGroup("psc_neg",
* name="psc-neg",
* region="asia-northeast3",
* network_endpoint_type="PRIVATE_SERVICE_CONNECT",
* psc_target_service="asia-northeast3-cloudkms.googleapis.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var pscNeg = new Gcp.Compute.RegionNetworkEndpointGroup("psc_neg", new()
* {
* Name = "psc-neg",
* Region = "asia-northeast3",
* NetworkEndpointType = "PRIVATE_SERVICE_CONNECT",
* PscTargetService = "asia-northeast3-cloudkms.googleapis.com",
* });
* });
* ```
* ```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.NewRegionNetworkEndpointGroup(ctx, "psc_neg", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("psc-neg"),
* Region: pulumi.String("asia-northeast3"),
* NetworkEndpointType: pulumi.String("PRIVATE_SERVICE_CONNECT"),
* PscTargetService: pulumi.String("asia-northeast3-cloudkms.googleapis.com"),
* })
* 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.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* 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 pscNeg = new RegionNetworkEndpointGroup("pscNeg", RegionNetworkEndpointGroupArgs.builder()
* .name("psc-neg")
* .region("asia-northeast3")
* .networkEndpointType("PRIVATE_SERVICE_CONNECT")
* .pscTargetService("asia-northeast3-cloudkms.googleapis.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* pscNeg:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: psc_neg
* properties:
* name: psc-neg
* region: asia-northeast3
* networkEndpointType: PRIVATE_SERVICE_CONNECT
* pscTargetService: asia-northeast3-cloudkms.googleapis.com
* ```
*
* ### Region Network Endpoint Group Psc Service Attachment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.compute.Network("default", {name: "psc-network"});
* const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
* name: "psc-subnetwork",
* ipCidrRange: "10.0.0.0/16",
* region: "europe-west4",
* network: _default.id,
* });
* const pscSubnetwork = new gcp.compute.Subnetwork("psc_subnetwork", {
* name: "psc-subnetwork-nat",
* ipCidrRange: "10.1.0.0/16",
* region: "europe-west4",
* purpose: "PRIVATE_SERVICE_CONNECT",
* network: _default.id,
* });
* const defaultHealthCheck = new gcp.compute.HealthCheck("default", {
* name: "psc-healthcheck",
* checkIntervalSec: 1,
* timeoutSec: 1,
* tcpHealthCheck: {
* port: 80,
* },
* });
* const defaultRegionBackendService = new gcp.compute.RegionBackendService("default", {
* name: "psc-backend",
* region: "europe-west4",
* healthChecks: defaultHealthCheck.id,
* });
* const defaultForwardingRule = new gcp.compute.ForwardingRule("default", {
* name: "psc-forwarding-rule",
* region: "europe-west4",
* loadBalancingScheme: "INTERNAL",
* backendService: defaultRegionBackendService.id,
* allPorts: true,
* network: _default.name,
* subnetwork: defaultSubnetwork.name,
* });
* const defaultServiceAttachment = new gcp.compute.ServiceAttachment("default", {
* name: "psc-service-attachment",
* region: "europe-west4",
* description: "A service attachment configured with Terraform",
* enableProxyProtocol: false,
* connectionPreference: "ACCEPT_AUTOMATIC",
* natSubnets: [pscSubnetwork.selfLink],
* targetService: defaultForwardingRule.selfLink,
* });
* const pscNegServiceAttachment = new gcp.compute.RegionNetworkEndpointGroup("psc_neg_service_attachment", {
* name: "psc-neg",
* region: "europe-west4",
* networkEndpointType: "PRIVATE_SERVICE_CONNECT",
* pscTargetService: defaultServiceAttachment.selfLink,
* network: _default.selfLink,
* subnetwork: defaultSubnetwork.selfLink,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.Network("default", name="psc-network")
* default_subnetwork = gcp.compute.Subnetwork("default",
* name="psc-subnetwork",
* ip_cidr_range="10.0.0.0/16",
* region="europe-west4",
* network=default.id)
* psc_subnetwork = gcp.compute.Subnetwork("psc_subnetwork",
* name="psc-subnetwork-nat",
* ip_cidr_range="10.1.0.0/16",
* region="europe-west4",
* purpose="PRIVATE_SERVICE_CONNECT",
* network=default.id)
* default_health_check = gcp.compute.HealthCheck("default",
* name="psc-healthcheck",
* check_interval_sec=1,
* timeout_sec=1,
* tcp_health_check=gcp.compute.HealthCheckTcpHealthCheckArgs(
* port=80,
* ))
* default_region_backend_service = gcp.compute.RegionBackendService("default",
* name="psc-backend",
* region="europe-west4",
* health_checks=default_health_check.id)
* default_forwarding_rule = gcp.compute.ForwardingRule("default",
* name="psc-forwarding-rule",
* region="europe-west4",
* load_balancing_scheme="INTERNAL",
* backend_service=default_region_backend_service.id,
* all_ports=True,
* network=default.name,
* subnetwork=default_subnetwork.name)
* default_service_attachment = gcp.compute.ServiceAttachment("default",
* name="psc-service-attachment",
* region="europe-west4",
* description="A service attachment configured with Terraform",
* enable_proxy_protocol=False,
* connection_preference="ACCEPT_AUTOMATIC",
* nat_subnets=[psc_subnetwork.self_link],
* target_service=default_forwarding_rule.self_link)
* psc_neg_service_attachment = gcp.compute.RegionNetworkEndpointGroup("psc_neg_service_attachment",
* name="psc-neg",
* region="europe-west4",
* network_endpoint_type="PRIVATE_SERVICE_CONNECT",
* psc_target_service=default_service_attachment.self_link,
* network=default.self_link,
* subnetwork=default_subnetwork.self_link)
* ```
* ```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 = "psc-network",
* });
* var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
* {
* Name = "psc-subnetwork",
* IpCidrRange = "10.0.0.0/16",
* Region = "europe-west4",
* Network = @default.Id,
* });
* var pscSubnetwork = new Gcp.Compute.Subnetwork("psc_subnetwork", new()
* {
* Name = "psc-subnetwork-nat",
* IpCidrRange = "10.1.0.0/16",
* Region = "europe-west4",
* Purpose = "PRIVATE_SERVICE_CONNECT",
* Network = @default.Id,
* });
* var defaultHealthCheck = new Gcp.Compute.HealthCheck("default", new()
* {
* Name = "psc-healthcheck",
* CheckIntervalSec = 1,
* TimeoutSec = 1,
* TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
* {
* Port = 80,
* },
* });
* var defaultRegionBackendService = new Gcp.Compute.RegionBackendService("default", new()
* {
* Name = "psc-backend",
* Region = "europe-west4",
* HealthChecks = defaultHealthCheck.Id,
* });
* var defaultForwardingRule = new Gcp.Compute.ForwardingRule("default", new()
* {
* Name = "psc-forwarding-rule",
* Region = "europe-west4",
* LoadBalancingScheme = "INTERNAL",
* BackendService = defaultRegionBackendService.Id,
* AllPorts = true,
* Network = @default.Name,
* Subnetwork = defaultSubnetwork.Name,
* });
* var defaultServiceAttachment = new Gcp.Compute.ServiceAttachment("default", new()
* {
* Name = "psc-service-attachment",
* Region = "europe-west4",
* Description = "A service attachment configured with Terraform",
* EnableProxyProtocol = false,
* ConnectionPreference = "ACCEPT_AUTOMATIC",
* NatSubnets = new[]
* {
* pscSubnetwork.SelfLink,
* },
* TargetService = defaultForwardingRule.SelfLink,
* });
* var pscNegServiceAttachment = new Gcp.Compute.RegionNetworkEndpointGroup("psc_neg_service_attachment", new()
* {
* Name = "psc-neg",
* Region = "europe-west4",
* NetworkEndpointType = "PRIVATE_SERVICE_CONNECT",
* PscTargetService = defaultServiceAttachment.SelfLink,
* Network = @default.SelfLink,
* Subnetwork = defaultSubnetwork.SelfLink,
* });
* });
* ```
* ```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("psc-network"),
* })
* if err != nil {
* return err
* }
* defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
* Name: pulumi.String("psc-subnetwork"),
* IpCidrRange: pulumi.String("10.0.0.0/16"),
* Region: pulumi.String("europe-west4"),
* Network: _default.ID(),
* })
* if err != nil {
* return err
* }
* pscSubnetwork, err := compute.NewSubnetwork(ctx, "psc_subnetwork", &compute.SubnetworkArgs{
* Name: pulumi.String("psc-subnetwork-nat"),
* IpCidrRange: pulumi.String("10.1.0.0/16"),
* Region: pulumi.String("europe-west4"),
* Purpose: pulumi.String("PRIVATE_SERVICE_CONNECT"),
* Network: _default.ID(),
* })
* if err != nil {
* return err
* }
* defaultHealthCheck, err := compute.NewHealthCheck(ctx, "default", &compute.HealthCheckArgs{
* Name: pulumi.String("psc-healthcheck"),
* CheckIntervalSec: pulumi.Int(1),
* TimeoutSec: pulumi.Int(1),
* TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
* Port: pulumi.Int(80),
* },
* })
* if err != nil {
* return err
* }
* defaultRegionBackendService, err := compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
* Name: pulumi.String("psc-backend"),
* Region: pulumi.String("europe-west4"),
* HealthChecks: defaultHealthCheck.ID(),
* })
* if err != nil {
* return err
* }
* defaultForwardingRule, err := compute.NewForwardingRule(ctx, "default", &compute.ForwardingRuleArgs{
* Name: pulumi.String("psc-forwarding-rule"),
* Region: pulumi.String("europe-west4"),
* LoadBalancingScheme: pulumi.String("INTERNAL"),
* BackendService: defaultRegionBackendService.ID(),
* AllPorts: pulumi.Bool(true),
* Network: _default.Name,
* Subnetwork: defaultSubnetwork.Name,
* })
* if err != nil {
* return err
* }
* defaultServiceAttachment, err := compute.NewServiceAttachment(ctx, "default", &compute.ServiceAttachmentArgs{
* Name: pulumi.String("psc-service-attachment"),
* Region: pulumi.String("europe-west4"),
* Description: pulumi.String("A service attachment configured with Terraform"),
* EnableProxyProtocol: pulumi.Bool(false),
* ConnectionPreference: pulumi.String("ACCEPT_AUTOMATIC"),
* NatSubnets: pulumi.StringArray{
* pscSubnetwork.SelfLink,
* },
* TargetService: defaultForwardingRule.SelfLink,
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "psc_neg_service_attachment", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("psc-neg"),
* Region: pulumi.String("europe-west4"),
* NetworkEndpointType: pulumi.String("PRIVATE_SERVICE_CONNECT"),
* PscTargetService: defaultServiceAttachment.SelfLink,
* Network: _default.SelfLink,
* Subnetwork: defaultSubnetwork.SelfLink,
* })
* 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.Subnetwork;
* import com.pulumi.gcp.compute.SubnetworkArgs;
* import com.pulumi.gcp.compute.HealthCheck;
* import com.pulumi.gcp.compute.HealthCheckArgs;
* import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
* import com.pulumi.gcp.compute.RegionBackendService;
* import com.pulumi.gcp.compute.RegionBackendServiceArgs;
* import com.pulumi.gcp.compute.ForwardingRule;
* import com.pulumi.gcp.compute.ForwardingRuleArgs;
* import com.pulumi.gcp.compute.ServiceAttachment;
* import com.pulumi.gcp.compute.ServiceAttachmentArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* 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("psc-network")
* .build());
* var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
* .name("psc-subnetwork")
* .ipCidrRange("10.0.0.0/16")
* .region("europe-west4")
* .network(default_.id())
* .build());
* var pscSubnetwork = new Subnetwork("pscSubnetwork", SubnetworkArgs.builder()
* .name("psc-subnetwork-nat")
* .ipCidrRange("10.1.0.0/16")
* .region("europe-west4")
* .purpose("PRIVATE_SERVICE_CONNECT")
* .network(default_.id())
* .build());
* var defaultHealthCheck = new HealthCheck("defaultHealthCheck", HealthCheckArgs.builder()
* .name("psc-healthcheck")
* .checkIntervalSec(1)
* .timeoutSec(1)
* .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
* .port("80")
* .build())
* .build());
* var defaultRegionBackendService = new RegionBackendService("defaultRegionBackendService", RegionBackendServiceArgs.builder()
* .name("psc-backend")
* .region("europe-west4")
* .healthChecks(defaultHealthCheck.id())
* .build());
* var defaultForwardingRule = new ForwardingRule("defaultForwardingRule", ForwardingRuleArgs.builder()
* .name("psc-forwarding-rule")
* .region("europe-west4")
* .loadBalancingScheme("INTERNAL")
* .backendService(defaultRegionBackendService.id())
* .allPorts(true)
* .network(default_.name())
* .subnetwork(defaultSubnetwork.name())
* .build());
* var defaultServiceAttachment = new ServiceAttachment("defaultServiceAttachment", ServiceAttachmentArgs.builder()
* .name("psc-service-attachment")
* .region("europe-west4")
* .description("A service attachment configured with Terraform")
* .enableProxyProtocol(false)
* .connectionPreference("ACCEPT_AUTOMATIC")
* .natSubnets(pscSubnetwork.selfLink())
* .targetService(defaultForwardingRule.selfLink())
* .build());
* var pscNegServiceAttachment = new RegionNetworkEndpointGroup("pscNegServiceAttachment", RegionNetworkEndpointGroupArgs.builder()
* .name("psc-neg")
* .region("europe-west4")
* .networkEndpointType("PRIVATE_SERVICE_CONNECT")
* .pscTargetService(defaultServiceAttachment.selfLink())
* .network(default_.selfLink())
* .subnetwork(defaultSubnetwork.selfLink())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:compute:Network
* properties:
* name: psc-network
* defaultSubnetwork:
* type: gcp:compute:Subnetwork
* name: default
* properties:
* name: psc-subnetwork
* ipCidrRange: 10.0.0.0/16
* region: europe-west4
* network: ${default.id}
* pscSubnetwork:
* type: gcp:compute:Subnetwork
* name: psc_subnetwork
* properties:
* name: psc-subnetwork-nat
* ipCidrRange: 10.1.0.0/16
* region: europe-west4
* purpose: PRIVATE_SERVICE_CONNECT
* network: ${default.id}
* defaultHealthCheck:
* type: gcp:compute:HealthCheck
* name: default
* properties:
* name: psc-healthcheck
* checkIntervalSec: 1
* timeoutSec: 1
* tcpHealthCheck:
* port: '80'
* defaultRegionBackendService:
* type: gcp:compute:RegionBackendService
* name: default
* properties:
* name: psc-backend
* region: europe-west4
* healthChecks: ${defaultHealthCheck.id}
* defaultForwardingRule:
* type: gcp:compute:ForwardingRule
* name: default
* properties:
* name: psc-forwarding-rule
* region: europe-west4
* loadBalancingScheme: INTERNAL
* backendService: ${defaultRegionBackendService.id}
* allPorts: true
* network: ${default.name}
* subnetwork: ${defaultSubnetwork.name}
* defaultServiceAttachment:
* type: gcp:compute:ServiceAttachment
* name: default
* properties:
* name: psc-service-attachment
* region: europe-west4
* description: A service attachment configured with Terraform
* enableProxyProtocol: false
* connectionPreference: ACCEPT_AUTOMATIC
* natSubnets:
* - ${pscSubnetwork.selfLink}
* targetService: ${defaultForwardingRule.selfLink}
* pscNegServiceAttachment:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: psc_neg_service_attachment
* properties:
* name: psc-neg
* region: europe-west4
* networkEndpointType: PRIVATE_SERVICE_CONNECT
* pscTargetService: ${defaultServiceAttachment.selfLink}
* network: ${default.selfLink}
* subnetwork: ${defaultSubnetwork.selfLink}
* ```
*
* ### Region Network Endpoint Group 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"});
* const regionNetworkEndpointGroupInternetIpPort = new gcp.compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_ip_port", {
* name: "ip-port-neg",
* region: "us-central1",
* network: _default.id,
* networkEndpointType: "INTERNET_IP_PORT",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.Network("default", name="network")
* region_network_endpoint_group_internet_ip_port = gcp.compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_ip_port",
* name="ip-port-neg",
* region="us-central1",
* network=default.id,
* network_endpoint_type="INTERNET_IP_PORT")
* ```
* ```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",
* });
* var regionNetworkEndpointGroupInternetIpPort = new Gcp.Compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_ip_port", new()
* {
* Name = "ip-port-neg",
* Region = "us-central1",
* Network = @default.Id,
* NetworkEndpointType = "INTERNET_IP_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.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("network"),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "region_network_endpoint_group_internet_ip_port", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("ip-port-neg"),
* Region: pulumi.String("us-central1"),
* Network: _default.ID(),
* NetworkEndpointType: pulumi.String("INTERNET_IP_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.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* 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")
* .build());
* var regionNetworkEndpointGroupInternetIpPort = new RegionNetworkEndpointGroup("regionNetworkEndpointGroupInternetIpPort", RegionNetworkEndpointGroupArgs.builder()
* .name("ip-port-neg")
* .region("us-central1")
* .network(default_.id())
* .networkEndpointType("INTERNET_IP_PORT")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* regionNetworkEndpointGroupInternetIpPort:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: region_network_endpoint_group_internet_ip_port
* properties:
* name: ip-port-neg
* region: us-central1
* network: ${default.id}
* networkEndpointType: INTERNET_IP_PORT
* default:
* type: gcp:compute:Network
* properties:
* name: network
* ```
*
* ### Region Network Endpoint Group 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"});
* const regionNetworkEndpointGroupInternetFqdnPort = new gcp.compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_fqdn_port", {
* name: "ip-port-neg",
* region: "us-central1",
* network: _default.id,
* networkEndpointType: "INTERNET_FQDN_PORT",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.Network("default", name="network")
* region_network_endpoint_group_internet_fqdn_port = gcp.compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_fqdn_port",
* name="ip-port-neg",
* region="us-central1",
* network=default.id,
* 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 @default = new Gcp.Compute.Network("default", new()
* {
* Name = "network",
* });
* var regionNetworkEndpointGroupInternetFqdnPort = new Gcp.Compute.RegionNetworkEndpointGroup("region_network_endpoint_group_internet_fqdn_port", new()
* {
* Name = "ip-port-neg",
* Region = "us-central1",
* Network = @default.Id,
* 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.NewNetwork(ctx, "default", &compute.NetworkArgs{
* Name: pulumi.String("network"),
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionNetworkEndpointGroup(ctx, "region_network_endpoint_group_internet_fqdn_port", &compute.RegionNetworkEndpointGroupArgs{
* Name: pulumi.String("ip-port-neg"),
* Region: pulumi.String("us-central1"),
* Network: _default.ID(),
* 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.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroup;
* import com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs;
* 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")
* .build());
* var regionNetworkEndpointGroupInternetFqdnPort = new RegionNetworkEndpointGroup("regionNetworkEndpointGroupInternetFqdnPort", RegionNetworkEndpointGroupArgs.builder()
* .name("ip-port-neg")
* .region("us-central1")
* .network(default_.id())
* .networkEndpointType("INTERNET_FQDN_PORT")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* regionNetworkEndpointGroupInternetFqdnPort:
* type: gcp:compute:RegionNetworkEndpointGroup
* name: region_network_endpoint_group_internet_fqdn_port
* properties:
* name: ip-port-neg
* region: us-central1
* network: ${default.id}
* networkEndpointType: INTERNET_FQDN_PORT
* default:
* type: gcp:compute:Network
* properties:
* name: network
* ```
*
* ## Import
* RegionNetworkEndpointGroup can be imported using any of these accepted formats:
* * `projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{name}}`
* * `{{project}}/{{region}}/{{name}}`
* * `{{region}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, RegionNetworkEndpointGroup can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpointGroup:RegionNetworkEndpointGroup default projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpointGroup:RegionNetworkEndpointGroup default {{project}}/{{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpointGroup:RegionNetworkEndpointGroup default {{region}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/regionNetworkEndpointGroup:RegionNetworkEndpointGroup default {{name}}
* ```
* @property appEngine This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
* @property cloudFunction This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
* @property cloudRun This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
* @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 network This field is only used for PSC and INTERNET NEGs.
* The URL of the network to which all network endpoints in the NEG belong. Uses
* "default" project network if unspecified.
* @property networkEndpointType Type of network endpoints in this network endpoint group. Defaults to SERVERLESS.
* Default value is `SERVERLESS`.
* Possible values are: `SERVERLESS`, `PRIVATE_SERVICE_CONNECT`, `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.
* @property pscTargetService This field is only used for PSC and INTERNET NEGs.
* The target service url used to set up private service connection to
* a Google API or a PSC Producer Service Attachment.
* @property region A reference to the region where the regional NEGs reside.
* - - -
* @property serverlessDeployment This field is only used for SERVERLESS NEGs.
* Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
* Structure is documented below.
* @property subnetwork This field is only used for PSC NEGs.
* Optional URL of the subnetwork to which all network endpoints in the NEG belong.
* */*/*/*/*/*/*/*/*/*/*/*/
*/
public data class RegionNetworkEndpointGroupArgs(
public val appEngine: Output? = null,
public val cloudFunction: Output? = null,
public val cloudRun: Output? = null,
public val description: Output? = null,
public val name: Output? = null,
public val network: Output? = null,
public val networkEndpointType: Output? = null,
public val project: Output? = null,
public val pscTargetService: Output? = null,
public val region: Output? = null,
public val serverlessDeployment: Output? =
null,
public val subnetwork: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs =
com.pulumi.gcp.compute.RegionNetworkEndpointGroupArgs.builder()
.appEngine(appEngine?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.cloudFunction(cloudFunction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.cloudRun(cloudRun?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.network(network?.applyValue({ args0 -> args0 }))
.networkEndpointType(networkEndpointType?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.pscTargetService(pscTargetService?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.serverlessDeployment(
serverlessDeployment?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.subnetwork(subnetwork?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionNetworkEndpointGroupArgs].
*/
@PulumiTagMarker
public class RegionNetworkEndpointGroupArgsBuilder internal constructor() {
private var appEngine: Output? = null
private var cloudFunction: Output? = null
private var cloudRun: Output? = null
private var description: Output? = null
private var name: Output? = null
private var network: Output? = null
private var networkEndpointType: Output? = null
private var project: Output? = null
private var pscTargetService: Output? = null
private var region: Output? = null
private var serverlessDeployment: Output? =
null
private var subnetwork: Output? = null
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("skykrdoliqyvltnc")
public suspend fun appEngine(`value`: Output) {
this.appEngine = value
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("yqpcbeiubiyqdgpa")
public suspend fun cloudFunction(`value`: Output) {
this.cloudFunction = value
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("bllftrgdywlagkkv")
public suspend fun cloudRun(`value`: Output) {
this.cloudRun = value
}
/**
* @param value An optional description of this resource. Provide this property when
* you create the resource.
*/
@JvmName("tdyowyxrulyenwqv")
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("uagqbituddwfwrww")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value This field is only used for PSC and INTERNET NEGs.
* The URL of the network to which all network endpoints in the NEG belong. Uses
* "default" project network if unspecified.
*/
@JvmName("cxtupblbpdfdnyrc")
public suspend fun network(`value`: Output) {
this.network = value
}
/**
* @param value Type of network endpoints in this network endpoint group. Defaults to SERVERLESS.
* Default value is `SERVERLESS`.
* Possible values are: `SERVERLESS`, `PRIVATE_SERVICE_CONNECT`, `INTERNET_IP_PORT`, `INTERNET_FQDN_PORT`.
*/
@JvmName("ffojdmtusxdfvhpk")
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("pdeesxeaytfjhifn")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value This field is only used for PSC and INTERNET NEGs.
* The target service url used to set up private service connection to
* a Google API or a PSC Producer Service Attachment.
*/
@JvmName("mbledkmnjsxtrjyr")
public suspend fun pscTargetService(`value`: Output) {
this.pscTargetService = value
}
/**
* @param value A reference to the region where the regional NEGs reside.
* - - -
*/
@JvmName("kycoqrsypmkrulqm")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
* Structure is documented below.
*/
@JvmName("xllcwigskspmsnvt")
public suspend fun serverlessDeployment(`value`: Output) {
this.serverlessDeployment = value
}
/**
* @param value This field is only used for PSC NEGs.
* Optional URL of the subnetwork to which all network endpoints in the NEG belong.
*/
@JvmName("rilsfqrbiaqgsnch")
public suspend fun subnetwork(`value`: Output) {
this.subnetwork = value
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("wvkcvuhgwvorawwf")
public suspend fun appEngine(`value`: RegionNetworkEndpointGroupAppEngineArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.appEngine = mapped
}
/**
* @param argument This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("lhqrocgffoxguqkb")
public suspend fun appEngine(argument: suspend RegionNetworkEndpointGroupAppEngineArgsBuilder.() -> Unit) {
val toBeMapped = RegionNetworkEndpointGroupAppEngineArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.appEngine = mapped
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("kmcollxnsnuxcepv")
public suspend fun cloudFunction(`value`: RegionNetworkEndpointGroupCloudFunctionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloudFunction = mapped
}
/**
* @param argument This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("tmwxgojtrcbskril")
public suspend fun cloudFunction(argument: suspend RegionNetworkEndpointGroupCloudFunctionArgsBuilder.() -> Unit) {
val toBeMapped = RegionNetworkEndpointGroupCloudFunctionArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.cloudFunction = mapped
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("cwyhldffakqyueye")
public suspend fun cloudRun(`value`: RegionNetworkEndpointGroupCloudRunArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloudRun = mapped
}
/**
* @param argument This field is only used for SERVERLESS NEGs.
* Only one of cloud_run, app_engine, cloud_function or serverless_deployment may be set.
* Structure is documented below.
*/
@JvmName("mypltbcrcawkojnm")
public suspend fun cloudRun(argument: suspend RegionNetworkEndpointGroupCloudRunArgsBuilder.() -> Unit) {
val toBeMapped = RegionNetworkEndpointGroupCloudRunArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.cloudRun = mapped
}
/**
* @param value An optional description of this resource. Provide this property when
* you create the resource.
*/
@JvmName("jrhycbhdjfbuwsrj")
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("dlxiyvvsaipdhsmd")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value This field is only used for PSC and INTERNET NEGs.
* The URL of the network to which all network endpoints in the NEG belong. Uses
* "default" project network if unspecified.
*/
@JvmName("ndwshhkxvxauwmsx")
public suspend fun network(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.network = mapped
}
/**
* @param value Type of network endpoints in this network endpoint group. Defaults to SERVERLESS.
* Default value is `SERVERLESS`.
* Possible values are: `SERVERLESS`, `PRIVATE_SERVICE_CONNECT`, `INTERNET_IP_PORT`, `INTERNET_FQDN_PORT`.
*/
@JvmName("gyshoslfnmhqrhdu")
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("lewrixunnjjpxqpq")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value This field is only used for PSC and INTERNET NEGs.
* The target service url used to set up private service connection to
* a Google API or a PSC Producer Service Attachment.
*/
@JvmName("pkqckvhvtxptuqle")
public suspend fun pscTargetService(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pscTargetService = mapped
}
/**
* @param value A reference to the region where the regional NEGs reside.
* - - -
*/
@JvmName("xdkcqnpsgxfmrcjx")
public suspend fun region(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.region = mapped
}
/**
* @param value This field is only used for SERVERLESS NEGs.
* Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
* Structure is documented below.
*/
@JvmName("mlcvubkfgqxggspf")
public suspend fun serverlessDeployment(`value`: RegionNetworkEndpointGroupServerlessDeploymentArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serverlessDeployment = mapped
}
/**
* @param argument This field is only used for SERVERLESS NEGs.
* Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
* Structure is documented below.
*/
@JvmName("hgwqdjppluqlsemc")
public suspend fun serverlessDeployment(argument: suspend RegionNetworkEndpointGroupServerlessDeploymentArgsBuilder.() -> Unit) {
val toBeMapped = RegionNetworkEndpointGroupServerlessDeploymentArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.serverlessDeployment = mapped
}
/**
* @param value This field is only used for PSC NEGs.
* Optional URL of the subnetwork to which all network endpoints in the NEG belong.
*/
@JvmName("dvrrgdfvyvxxufrt")
public suspend fun subnetwork(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetwork = mapped
}
internal fun build(): RegionNetworkEndpointGroupArgs = RegionNetworkEndpointGroupArgs(
appEngine = appEngine,
cloudFunction = cloudFunction,
cloudRun = cloudRun,
description = description,
name = name,
network = network,
networkEndpointType = networkEndpointType,
project = project,
pscTargetService = pscTargetService,
region = region,
serverlessDeployment = serverlessDeployment,
subnetwork = subnetwork,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy