com.pulumi.gcp.networksecurity.kotlin.ClientTlsPolicyArgs.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.networksecurity.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs.builder
import com.pulumi.gcp.networksecurity.kotlin.inputs.ClientTlsPolicyClientCertificateArgs
import com.pulumi.gcp.networksecurity.kotlin.inputs.ClientTlsPolicyClientCertificateArgsBuilder
import com.pulumi.gcp.networksecurity.kotlin.inputs.ClientTlsPolicyServerValidationCaArgs
import com.pulumi.gcp.networksecurity.kotlin.inputs.ClientTlsPolicyServerValidationCaArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* ## Example Usage
* ### Network Security Client Tls Policy Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.networksecurity.ClientTlsPolicy("default", {
* name: "my-client-tls-policy",
* labels: {
* foo: "bar",
* },
* description: "my description",
* sni: "secure.example.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.networksecurity.ClientTlsPolicy("default",
* name="my-client-tls-policy",
* labels={
* "foo": "bar",
* },
* description="my description",
* sni="secure.example.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.NetworkSecurity.ClientTlsPolicy("default", new()
* {
* Name = "my-client-tls-policy",
* Labels =
* {
* { "foo", "bar" },
* },
* Description = "my description",
* Sni = "secure.example.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networksecurity.NewClientTlsPolicy(ctx, "default", &networksecurity.ClientTlsPolicyArgs{
* Name: pulumi.String("my-client-tls-policy"),
* Labels: pulumi.StringMap{
* "foo": pulumi.String("bar"),
* },
* Description: pulumi.String("my description"),
* Sni: pulumi.String("secure.example.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.networksecurity.ClientTlsPolicy;
* import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs;
* 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 ClientTlsPolicy("default", ClientTlsPolicyArgs.builder()
* .name("my-client-tls-policy")
* .labels(Map.of("foo", "bar"))
* .description("my description")
* .sni("secure.example.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:networksecurity:ClientTlsPolicy
* properties:
* name: my-client-tls-policy
* labels:
* foo: bar
* description: my description
* sni: secure.example.com
* ```
*
* ### Network Security Client Tls Policy Advanced
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.networksecurity.ClientTlsPolicy("default", {
* name: "my-client-tls-policy",
* labels: {
* foo: "bar",
* },
* description: "my description",
* clientCertificate: {
* certificateProviderInstance: {
* pluginInstance: "google_cloud_private_spiffe",
* },
* },
* serverValidationCas: [
* {
* grpcEndpoint: {
* targetUri: "unix:mypath",
* },
* },
* {
* grpcEndpoint: {
* targetUri: "unix:mypath1",
* },
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.networksecurity.ClientTlsPolicy("default",
* name="my-client-tls-policy",
* labels={
* "foo": "bar",
* },
* description="my description",
* client_certificate=gcp.networksecurity.ClientTlsPolicyClientCertificateArgs(
* certificate_provider_instance=gcp.networksecurity.ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs(
* plugin_instance="google_cloud_private_spiffe",
* ),
* ),
* server_validation_cas=[
* gcp.networksecurity.ClientTlsPolicyServerValidationCaArgs(
* grpc_endpoint=gcp.networksecurity.ClientTlsPolicyServerValidationCaGrpcEndpointArgs(
* target_uri="unix:mypath",
* ),
* ),
* gcp.networksecurity.ClientTlsPolicyServerValidationCaArgs(
* grpc_endpoint=gcp.networksecurity.ClientTlsPolicyServerValidationCaGrpcEndpointArgs(
* target_uri="unix:mypath1",
* ),
* ),
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.NetworkSecurity.ClientTlsPolicy("default", new()
* {
* Name = "my-client-tls-policy",
* Labels =
* {
* { "foo", "bar" },
* },
* Description = "my description",
* ClientCertificate = new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyClientCertificateArgs
* {
* CertificateProviderInstance = new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs
* {
* PluginInstance = "google_cloud_private_spiffe",
* },
* },
* ServerValidationCas = new[]
* {
* new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyServerValidationCaArgs
* {
* GrpcEndpoint = new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyServerValidationCaGrpcEndpointArgs
* {
* TargetUri = "unix:mypath",
* },
* },
* new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyServerValidationCaArgs
* {
* GrpcEndpoint = new Gcp.NetworkSecurity.Inputs.ClientTlsPolicyServerValidationCaGrpcEndpointArgs
* {
* TargetUri = "unix:mypath1",
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networksecurity.NewClientTlsPolicy(ctx, "default", &networksecurity.ClientTlsPolicyArgs{
* Name: pulumi.String("my-client-tls-policy"),
* Labels: pulumi.StringMap{
* "foo": pulumi.String("bar"),
* },
* Description: pulumi.String("my description"),
* ClientCertificate: &networksecurity.ClientTlsPolicyClientCertificateArgs{
* CertificateProviderInstance: &networksecurity.ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs{
* PluginInstance: pulumi.String("google_cloud_private_spiffe"),
* },
* },
* ServerValidationCas: networksecurity.ClientTlsPolicyServerValidationCaArray{
* &networksecurity.ClientTlsPolicyServerValidationCaArgs{
* GrpcEndpoint: &networksecurity.ClientTlsPolicyServerValidationCaGrpcEndpointArgs{
* TargetUri: pulumi.String("unix:mypath"),
* },
* },
* &networksecurity.ClientTlsPolicyServerValidationCaArgs{
* GrpcEndpoint: &networksecurity.ClientTlsPolicyServerValidationCaGrpcEndpointArgs{
* TargetUri: pulumi.String("unix:mypath1"),
* },
* },
* },
* })
* 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.networksecurity.ClientTlsPolicy;
* import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs;
* import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyClientCertificateArgs;
* import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs;
* import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyServerValidationCaArgs;
* import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyServerValidationCaGrpcEndpointArgs;
* 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 ClientTlsPolicy("default", ClientTlsPolicyArgs.builder()
* .name("my-client-tls-policy")
* .labels(Map.of("foo", "bar"))
* .description("my description")
* .clientCertificate(ClientTlsPolicyClientCertificateArgs.builder()
* .certificateProviderInstance(ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs.builder()
* .pluginInstance("google_cloud_private_spiffe")
* .build())
* .build())
* .serverValidationCas(
* ClientTlsPolicyServerValidationCaArgs.builder()
* .grpcEndpoint(ClientTlsPolicyServerValidationCaGrpcEndpointArgs.builder()
* .targetUri("unix:mypath")
* .build())
* .build(),
* ClientTlsPolicyServerValidationCaArgs.builder()
* .grpcEndpoint(ClientTlsPolicyServerValidationCaGrpcEndpointArgs.builder()
* .targetUri("unix:mypath1")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:networksecurity:ClientTlsPolicy
* properties:
* name: my-client-tls-policy
* labels:
* foo: bar
* description: my description
* clientCertificate:
* certificateProviderInstance:
* pluginInstance: google_cloud_private_spiffe
* serverValidationCas:
* - grpcEndpoint:
* targetUri: unix:mypath
* - grpcEndpoint:
* targetUri: unix:mypath1
* ```
*
* ## Import
* ClientTlsPolicy can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/clientTlsPolicies/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
* When using the `pulumi import` command, ClientTlsPolicy can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default projects/{{project}}/locations/{{location}}/clientTlsPolicies/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default {{project}}/{{location}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default {{location}}/{{name}}
* ```
* @property clientCertificate Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS.
* Structure is documented below.
* @property description A free-text description of the resource. Max length 1024 characters.
* @property labels Set of label tags associated with the ClientTlsPolicy 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 location The location of the client tls policy.
* The default value is `global`.
* @property name Name of the ClientTlsPolicy resource.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property serverValidationCas Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
* Structure is documented below.
* @property sni Server Name Indication string to present to the server during TLS handshake. E.g: "secure.example.com".
*/
public data class ClientTlsPolicyArgs(
public val clientCertificate: Output? = null,
public val description: Output? = null,
public val labels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy