com.pulumi.vault.secrets.kotlin.SyncGcpDestinationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-vault-kotlin Show documentation
Show all versions of pulumi-vault-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.vault.secrets.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.secrets.SyncGcpDestinationArgs.builder
import kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as std from "@pulumi/std";
* import * as vault from "@pulumi/vault";
* const gcp = new vault.secrets.SyncGcpDestination("gcp", {
* name: "gcp-dest",
* projectId: "gcp-project-id",
* credentials: std.file({
* input: credentialsFile,
* }).then(invoke => invoke.result),
* secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
* customTags: {
* foo: "bar",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_std as std
* import pulumi_vault as vault
* gcp = vault.secrets.SyncGcpDestination("gcp",
* name="gcp-dest",
* project_id="gcp-project-id",
* credentials=std.file(input=credentials_file).result,
* secret_name_template="vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
* custom_tags={
* "foo": "bar",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Std = Pulumi.Std;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var gcp = new Vault.Secrets.SyncGcpDestination("gcp", new()
* {
* Name = "gcp-dest",
* ProjectId = "gcp-project-id",
* Credentials = Std.File.Invoke(new()
* {
* Input = credentialsFile,
* }).Apply(invoke => invoke.Result),
* SecretNameTemplate = "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
* CustomTags =
* {
* { "foo", "bar" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-std/sdk/go/std"
* "github.com/pulumi/pulumi-vault/sdk/v6/go/vault/secrets"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* invokeFile, err := std.File(ctx, &std.FileArgs{
* Input: credentialsFile,
* }, nil)
* if err != nil {
* return err
* }
* _, err = secrets.NewSyncGcpDestination(ctx, "gcp", &secrets.SyncGcpDestinationArgs{
* Name: pulumi.String("gcp-dest"),
* ProjectId: pulumi.String("gcp-project-id"),
* Credentials: pulumi.String(invokeFile.Result),
* SecretNameTemplate: pulumi.String("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}"),
* CustomTags: pulumi.Map{
* "foo": pulumi.Any("bar"),
* },
* })
* 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.vault.secrets.SyncGcpDestination;
* import com.pulumi.vault.secrets.SyncGcpDestinationArgs;
* 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 gcp = new SyncGcpDestination("gcp", SyncGcpDestinationArgs.builder()
* .name("gcp-dest")
* .projectId("gcp-project-id")
* .credentials(StdFunctions.file(FileArgs.builder()
* .input(credentialsFile)
* .build()).result())
* .secretNameTemplate("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
* .customTags(Map.of("foo", "bar"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* gcp:
* type: vault:secrets:SyncGcpDestination
* properties:
* name: gcp-dest
* projectId: gcp-project-id
* credentials:
* fn::invoke:
* Function: std:file
* Arguments:
* input: ${credentialsFile}
* Return: result
* secretNameTemplate: vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}
* customTags:
* foo: bar
* ```
*
* ## Import
* GCP Secrets sync destinations can be imported using the `name`, e.g.
* ```sh
* $ pulumi import vault:secrets/syncGcpDestination:SyncGcpDestination gcp gcp-dest
* ```
* @property credentials JSON-encoded credentials to use to connect to GCP.
* Can be omitted and directly provided to Vault using the `GOOGLE_APPLICATION_CREDENTIALS` environment
* variable.
* @property customTags Custom tags to set on the secret managed at the destination.
* @property granularity Determines what level of information is synced as a distinct resource
* at the destination. Supports `secret-path` and `secret-key`.
* @property name Unique name of the GCP destination.
* @property namespace The namespace to provision the resource in.
* The value should not contain leading or trailing forward slashes.
* The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
* @property projectId The target project to manage secrets in. If set,
* overrides the project ID derived from the service account JSON credentials or application
* default credentials. The service account must be [authorized](https://cloud.google.com/iam/docs/service-account-overview#locations)
* to perform Secret Manager actions in the target project.
* @property secretNameTemplate Template describing how to generate external secret names.
* Supports a subset of the Go Template syntax.
*/
public data class SyncGcpDestinationArgs(
public val credentials: Output? = null,
public val customTags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy