com.pulumi.gcp.composer.kotlin.UserWorkloadsSecretArgs.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.composer.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.composer.UserWorkloadsSecretArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
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 gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
* const example = new gcp.composer.Environment("example", {
* name: "example-environment",
* project: "example-project",
* region: "us-central1",
* config: {
* softwareConfig: {
* imageVersion: "example-image-version",
* },
* },
* });
* const exampleUserWorkloadsSecret = new gcp.composer.UserWorkloadsSecret("example", {
* name: "example-secret",
* project: "example-project",
* region: "us-central1",
* environment: example.name,
* data: {
* email: std.base64encode({
* input: "example-email",
* }).then(invoke => invoke.result),
* password: std.base64encode({
* input: "example-password",
* }).then(invoke => invoke.result),
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* import pulumi_std as std
* example = gcp.composer.Environment("example",
* name="example-environment",
* project="example-project",
* region="us-central1",
* config=gcp.composer.EnvironmentConfigArgs(
* software_config=gcp.composer.EnvironmentConfigSoftwareConfigArgs(
* image_version="example-image-version",
* ),
* ))
* example_user_workloads_secret = gcp.composer.UserWorkloadsSecret("example",
* name="example-secret",
* project="example-project",
* region="us-central1",
* environment=example.name,
* data={
* "email": std.base64encode(input="example-email").result,
* "password": std.base64encode(input="example-password").result,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* using Std = Pulumi.Std;
* return await Deployment.RunAsync(() =>
* {
* var example = new Gcp.Composer.Environment("example", new()
* {
* Name = "example-environment",
* Project = "example-project",
* Region = "us-central1",
* Config = new Gcp.Composer.Inputs.EnvironmentConfigArgs
* {
* SoftwareConfig = new Gcp.Composer.Inputs.EnvironmentConfigSoftwareConfigArgs
* {
* ImageVersion = "example-image-version",
* },
* },
* });
* var exampleUserWorkloadsSecret = new Gcp.Composer.UserWorkloadsSecret("example", new()
* {
* Name = "example-secret",
* Project = "example-project",
* Region = "us-central1",
* Environment = example.Name,
* Data =
* {
* { "email", Std.Base64encode.Invoke(new()
* {
* Input = "example-email",
* }).Apply(invoke => invoke.Result) },
* { "password", Std.Base64encode.Invoke(new()
* {
* Input = "example-password",
* }).Apply(invoke => invoke.Result) },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/composer"
* "github.com/pulumi/pulumi-std/sdk/go/std"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := composer.NewEnvironment(ctx, "example", &composer.EnvironmentArgs{
* Name: pulumi.String("example-environment"),
* Project: pulumi.String("example-project"),
* Region: pulumi.String("us-central1"),
* Config: &composer.EnvironmentConfigArgs{
* SoftwareConfig: &composer.EnvironmentConfigSoftwareConfigArgs{
* ImageVersion: pulumi.String("example-image-version"),
* },
* },
* })
* if err != nil {
* return err
* }
* invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
* Input: "example-email",
* }, nil)
* if err != nil {
* return err
* }
* invokeBase64encode1, err := std.Base64encode(ctx, &std.Base64encodeArgs{
* Input: "example-password",
* }, nil)
* if err != nil {
* return err
* }
* _, err = composer.NewUserWorkloadsSecret(ctx, "example", &composer.UserWorkloadsSecretArgs{
* Name: pulumi.String("example-secret"),
* Project: pulumi.String("example-project"),
* Region: pulumi.String("us-central1"),
* Environment: example.Name,
* Data: pulumi.Map{
* "email": invokeBase64encode.Result,
* "password": invokeBase64encode1.Result,
* },
* })
* 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.composer.Environment;
* import com.pulumi.gcp.composer.EnvironmentArgs;
* import com.pulumi.gcp.composer.inputs.EnvironmentConfigArgs;
* import com.pulumi.gcp.composer.inputs.EnvironmentConfigSoftwareConfigArgs;
* import com.pulumi.gcp.composer.UserWorkloadsSecret;
* import com.pulumi.gcp.composer.UserWorkloadsSecretArgs;
* 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 example = new Environment("example", EnvironmentArgs.builder()
* .name("example-environment")
* .project("example-project")
* .region("us-central1")
* .config(EnvironmentConfigArgs.builder()
* .softwareConfig(EnvironmentConfigSoftwareConfigArgs.builder()
* .imageVersion("example-image-version")
* .build())
* .build())
* .build());
* var exampleUserWorkloadsSecret = new UserWorkloadsSecret("exampleUserWorkloadsSecret", UserWorkloadsSecretArgs.builder()
* .name("example-secret")
* .project("example-project")
* .region("us-central1")
* .environment(example.name())
* .data(Map.ofEntries(
* Map.entry("email", StdFunctions.base64encode(Base64encodeArgs.builder()
* .input("example-email")
* .build()).result()),
* Map.entry("password", StdFunctions.base64encode(Base64encodeArgs.builder()
* .input("example-password")
* .build()).result())
* ))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: gcp:composer:Environment
* properties:
* name: example-environment
* project: example-project
* region: us-central1
* config:
* softwareConfig:
* imageVersion: example-image-version
* exampleUserWorkloadsSecret:
* type: gcp:composer:UserWorkloadsSecret
* name: example
* properties:
* name: example-secret
* project: example-project
* region: us-central1
* environment: ${example.name}
* data:
* email:
* fn::invoke:
* Function: std:base64encode
* Arguments:
* input: example-email
* Return: result
* password:
* fn::invoke:
* Function: std:base64encode
* Arguments:
* input: example-password
* Return: result
* ```
*
* ## Import
* Secret can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsSecrets/{{name}}`
* * `{{project}}/{{region}}/{{environment}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, Environment can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsSecrets/{{name}}
* ```
* ```sh
* $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example {{project}}/{{region}}/{{environment}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:composer/userWorkloadsSecret:UserWorkloadsSecret example {{name}}
* ```
* @property data A map of the secret data.
* @property environment Environment where the Kubernetes Secret will be stored and used.
* @property name Name of the Kubernetes Secret.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property region The location or Compute Engine region for the environment.
*/
public data class UserWorkloadsSecretArgs(
public val `data`: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy