Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.networkservices.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.AuthzExtensionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* AuthzExtension is a resource that allows traffic forwarding to a callout backend service to make an authorization decision.
* To get more information about AuthzExtension, see:
* * [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.authzExtensions)
* ## Example Usage
* ### Network Services Authz Extension Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.compute.RegionBackendService("default", {
* name: "authz-service",
* project: "my-project-name",
* region: "us-west1",
* protocol: "HTTP2",
* loadBalancingScheme: "INTERNAL_MANAGED",
* portName: "grpc",
* });
* const defaultAuthzExtension = new gcp.networkservices.AuthzExtension("default", {
* name: "my-authz-ext",
* project: "my-project-name",
* location: "us-west1",
* description: "my description",
* loadBalancingScheme: "INTERNAL_MANAGED",
* authority: "ext11.com",
* service: _default.selfLink,
* timeout: "0.1s",
* failOpen: false,
* forwardHeaders: ["Authorization"],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.compute.RegionBackendService("default",
* name="authz-service",
* project="my-project-name",
* region="us-west1",
* protocol="HTTP2",
* load_balancing_scheme="INTERNAL_MANAGED",
* port_name="grpc")
* default_authz_extension = gcp.networkservices.AuthzExtension("default",
* name="my-authz-ext",
* project="my-project-name",
* location="us-west1",
* description="my description",
* load_balancing_scheme="INTERNAL_MANAGED",
* authority="ext11.com",
* service=default.self_link,
* timeout="0.1s",
* fail_open=False,
* forward_headers=["Authorization"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.Compute.RegionBackendService("default", new()
* {
* Name = "authz-service",
* Project = "my-project-name",
* Region = "us-west1",
* Protocol = "HTTP2",
* LoadBalancingScheme = "INTERNAL_MANAGED",
* PortName = "grpc",
* });
* var defaultAuthzExtension = new Gcp.NetworkServices.AuthzExtension("default", new()
* {
* Name = "my-authz-ext",
* Project = "my-project-name",
* Location = "us-west1",
* Description = "my description",
* LoadBalancingScheme = "INTERNAL_MANAGED",
* Authority = "ext11.com",
* Service = @default.SelfLink,
* Timeout = "0.1s",
* FailOpen = false,
* ForwardHeaders = new[]
* {
* "Authorization",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networkservices"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewRegionBackendService(ctx, "default", &compute.RegionBackendServiceArgs{
* Name: pulumi.String("authz-service"),
* Project: pulumi.String("my-project-name"),
* Region: pulumi.String("us-west1"),
* Protocol: pulumi.String("HTTP2"),
* LoadBalancingScheme: pulumi.String("INTERNAL_MANAGED"),
* PortName: pulumi.String("grpc"),
* })
* if err != nil {
* return err
* }
* _, err = networkservices.NewAuthzExtension(ctx, "default", &networkservices.AuthzExtensionArgs{
* Name: pulumi.String("my-authz-ext"),
* Project: pulumi.String("my-project-name"),
* Location: pulumi.String("us-west1"),
* Description: pulumi.String("my description"),
* LoadBalancingScheme: pulumi.String("INTERNAL_MANAGED"),
* Authority: pulumi.String("ext11.com"),
* Service: _default.SelfLink,
* Timeout: pulumi.String("0.1s"),
* FailOpen: pulumi.Bool(false),
* ForwardHeaders: pulumi.StringArray{
* pulumi.String("Authorization"),
* },
* })
* 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.RegionBackendService;
* import com.pulumi.gcp.compute.RegionBackendServiceArgs;
* import com.pulumi.gcp.networkservices.AuthzExtension;
* import com.pulumi.gcp.networkservices.AuthzExtensionArgs;
* 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 RegionBackendService("default", RegionBackendServiceArgs.builder()
* .name("authz-service")
* .project("my-project-name")
* .region("us-west1")
* .protocol("HTTP2")
* .loadBalancingScheme("INTERNAL_MANAGED")
* .portName("grpc")
* .build());
* var defaultAuthzExtension = new AuthzExtension("defaultAuthzExtension", AuthzExtensionArgs.builder()
* .name("my-authz-ext")
* .project("my-project-name")
* .location("us-west1")
* .description("my description")
* .loadBalancingScheme("INTERNAL_MANAGED")
* .authority("ext11.com")
* .service(default_.selfLink())
* .timeout("0.1s")
* .failOpen(false)
* .forwardHeaders("Authorization")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:compute:RegionBackendService
* properties:
* name: authz-service
* project: my-project-name
* region: us-west1
* protocol: HTTP2
* loadBalancingScheme: INTERNAL_MANAGED
* portName: grpc
* defaultAuthzExtension:
* type: gcp:networkservices:AuthzExtension
* name: default
* properties:
* name: my-authz-ext
* project: my-project-name
* location: us-west1
* description: my description
* loadBalancingScheme: INTERNAL_MANAGED
* authority: ext11.com
* service: ${default.selfLink}
* timeout: 0.1s
* failOpen: false
* forwardHeaders:
* - Authorization
* ```
*
* ## Import
* AuthzExtension can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/authzExtensions/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, AuthzExtension can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:networkservices/authzExtension:AuthzExtension default projects/{{project}}/locations/{{location}}/authzExtensions/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/authzExtension:AuthzExtension default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/authzExtension:AuthzExtension default {{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/authzExtension:AuthzExtension default {{name}}
* ```
* @property authority The :authority header in the gRPC request sent from Envoy to the extension service.
* @property description A human-readable description of the resource.
* @property failOpen Determines how the proxy behaves if the call to the extension fails or times out.
* When set to TRUE, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to FALSE or the default setting of FALSE is used, one of the following happens:
* * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer.
* * If response headers have been delivered, then the HTTP stream to the downstream client is reset.
* @property forwardHeaders List of the HTTP headers to forward to the extension (from the client). If omitted, all headers are sent. Each element is a string indicating the header name.
* @property labels Set of labels associated with the AuthzExtension resource.
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effective_labels` for all of the labels present on the resource.
* @property loadBalancingScheme All backend services and forwarding rules referenced by this extension must share the same load balancing scheme.
* For more information, refer to [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service).
* Possible values are: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`.
* @property location The location of the resource.
* - - -
* @property metadata The metadata provided here is included as part of the metadata_context (of type google.protobuf.Struct) in the ProcessingRequest message sent to the extension server. The metadata is available under the namespace com.google.authz_extension.. The following variables are supported in the metadata Struct:
* {forwarding_rule_id} - substituted with the forwarding rule's fully qualified resource name.
* @property name Identifier. Name of the AuthzExtension resource.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property service The reference to the service that runs the extension.
* To configure a callout extension, service must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format:
* https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService} or https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}.
* @property timeout Specifies the timeout for each individual message on the stream. The timeout must be between 10-10000 milliseconds.
* @property wireFormat The format of communication supported by the callout extension.
* Default value is `EXT_PROC_GRPC`.
* Possible values are: `WIRE_FORMAT_UNSPECIFIED`, `EXT_PROC_GRPC`.
*/
public data class AuthzExtensionArgs(
public val authority: Output? = null,
public val description: Output? = null,
public val failOpen: Output? = null,
public val forwardHeaders: Output>? = null,
public val labels: Output