com.pulumi.vault.secrets.kotlin.SyncGithubAppsArgs.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.SyncGithubAppsArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
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 github_apps = new vault.secrets.SyncGithubApps("github-apps", {
* name: "gh-apps",
* appId: appId,
* privateKey: std.file({
* input: privatekeyFile,
* }).then(invoke => invoke.result),
* });
* ```
* ```python
* import pulumi
* import pulumi_std as std
* import pulumi_vault as vault
* github_apps = vault.secrets.SyncGithubApps("github-apps",
* name="gh-apps",
* app_id=app_id,
* private_key=std.file(input=privatekey_file).result)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Std = Pulumi.Std;
* using Vault = Pulumi.Vault;
* return await Deployment.RunAsync(() =>
* {
* var github_apps = new Vault.Secrets.SyncGithubApps("github-apps", new()
* {
* Name = "gh-apps",
* AppId = appId,
* PrivateKey = Std.File.Invoke(new()
* {
* Input = privatekeyFile,
* }).Apply(invoke => invoke.Result),
* });
* });
* ```
* ```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: privatekeyFile,
* }, nil)
* if err != nil {
* return err
* }
* _, err = secrets.NewSyncGithubApps(ctx, "github-apps", &secrets.SyncGithubAppsArgs{
* Name: pulumi.String("gh-apps"),
* AppId: pulumi.Any(appId),
* PrivateKey: pulumi.String(invokeFile.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.vault.secrets.SyncGithubApps;
* import com.pulumi.vault.secrets.SyncGithubAppsArgs;
* 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 github_apps = new SyncGithubApps("github-apps", SyncGithubAppsArgs.builder()
* .name("gh-apps")
* .appId(appId)
* .privateKey(StdFunctions.file(FileArgs.builder()
* .input(privatekeyFile)
* .build()).result())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* github-apps:
* type: vault:secrets:SyncGithubApps
* properties:
* name: gh-apps
* appId: ${appId}
* privateKey:
* fn::invoke:
* Function: std:file
* Arguments:
* input: ${privatekeyFile}
* Return: result
* ```
*
* ## Import
* GitHub Apps Secrets sync configuration endpoint can be imported using the `name`, e.g.
* ```sh
* $ pulumi import vault:secrets/syncGithubApps:SyncGithubApps gh github-apps
* ```
* @property appId The GitHub application ID.
* @property name The user-defined name of the GitHub App configuration.
* @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 privateKey The content of a PEM formatted private key generated on GitHub for the app.
*/
public data class SyncGithubAppsArgs(
public val appId: Output? = null,
public val name: Output? = null,
public val namespace: Output? = null,
public val privateKey: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.vault.secrets.SyncGithubAppsArgs =
com.pulumi.vault.secrets.SyncGithubAppsArgs.builder()
.appId(appId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namespace(namespace?.applyValue({ args0 -> args0 }))
.privateKey(privateKey?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SyncGithubAppsArgs].
*/
@PulumiTagMarker
public class SyncGithubAppsArgsBuilder internal constructor() {
private var appId: Output? = null
private var name: Output? = null
private var namespace: Output? = null
private var privateKey: Output? = null
/**
* @param value The GitHub application ID.
*/
@JvmName("bcpepqutepjdeeiv")
public suspend fun appId(`value`: Output) {
this.appId = value
}
/**
* @param value The user-defined name of the GitHub App configuration.
*/
@JvmName("cpbxfhidvsbwqlcx")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value 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).
*/
@JvmName("ynnkrogwagbxjssn")
public suspend fun namespace(`value`: Output) {
this.namespace = value
}
/**
* @param value The content of a PEM formatted private key generated on GitHub for the app.
*/
@JvmName("ujxapoikbkhutyvn")
public suspend fun privateKey(`value`: Output) {
this.privateKey = value
}
/**
* @param value The GitHub application ID.
*/
@JvmName("xrmdaqwkaghkpxjx")
public suspend fun appId(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.appId = mapped
}
/**
* @param value The user-defined name of the GitHub App configuration.
*/
@JvmName("lyooquvqhvuxsdhw")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value 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).
*/
@JvmName("epigscidbfovarov")
public suspend fun namespace(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.namespace = mapped
}
/**
* @param value The content of a PEM formatted private key generated on GitHub for the app.
*/
@JvmName("ndtwqxqmaugnarwv")
public suspend fun privateKey(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateKey = mapped
}
internal fun build(): SyncGithubAppsArgs = SyncGithubAppsArgs(
appId = appId,
name = name,
namespace = namespace,
privateKey = privateKey,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy