SyncGhDestinationArgs

data class SyncGhDestinationArgs(val accessToken: Output<String>? = null, val appName: Output<String>? = null, val granularity: Output<String>? = null, val installationId: Output<Int>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val repositoryName: Output<String>? = null, val repositoryOwner: Output<String>? = null, val secretNameTemplate: Output<String>? = null) : ConvertibleToJava<SyncGhDestinationArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const gh = new vault.secrets.SyncGhDestination("gh", {
name: "gh-dest",
accessToken: accessToken,
repositoryOwner: repoOwner,
repositoryName: "repo-name-example",
secretNameTemplate: "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
});
import pulumi
import pulumi_vault as vault
gh = vault.secrets.SyncGhDestination("gh",
name="gh-dest",
access_token=access_token,
repository_owner=repo_owner,
repository_name="repo-name-example",
secret_name_template="vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var gh = new Vault.Secrets.SyncGhDestination("gh", new()
{
Name = "gh-dest",
AccessToken = accessToken,
RepositoryOwner = repoOwner,
RepositoryName = "repo-name-example",
SecretNameTemplate = "vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}",
});
});
package main
import (
"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 {
_, err := secrets.NewSyncGhDestination(ctx, "gh", &secrets.SyncGhDestinationArgs{
Name: pulumi.String("gh-dest"),
AccessToken: pulumi.Any(accessToken),
RepositoryOwner: pulumi.Any(repoOwner),
RepositoryName: pulumi.String("repo-name-example"),
SecretNameTemplate: pulumi.String("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.secrets.SyncGhDestination;
import com.pulumi.vault.secrets.SyncGhDestinationArgs;
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 gh = new SyncGhDestination("gh", SyncGhDestinationArgs.builder()
.name("gh-dest")
.accessToken(accessToken)
.repositoryOwner(repoOwner)
.repositoryName("repo-name-example")
.secretNameTemplate("vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}")
.build());
}
}
resources:
gh:
type: vault:secrets:SyncGhDestination
properties:
name: gh-dest
accessToken: ${accessToken}
repositoryOwner: ${repoOwner}
repositoryName: repo-name-example
secretNameTemplate: vault_{{ .MountAccessor | lowercase }}_{{ .SecretPath | lowercase }}

Import

GitHub Secrets sync destinations can be imported using the name, e.g.

$ pulumi import vault:secrets/syncGhDestination:SyncGhDestination gh gh-dest

Constructors

Link copied to clipboard
constructor(accessToken: Output<String>? = null, appName: Output<String>? = null, granularity: Output<String>? = null, installationId: Output<Int>? = null, name: Output<String>? = null, namespace: Output<String>? = null, repositoryName: Output<String>? = null, repositoryOwner: Output<String>? = null, secretNameTemplate: Output<String>? = null)

Properties

Link copied to clipboard
val accessToken: Output<String>? = null

Fine-grained or personal access token. Can be omitted and directly provided to Vault using the GITHUB_ACCESS_TOKEN environment variable.

Link copied to clipboard
val appName: Output<String>? = null

The user-defined name of the GitHub App configuration. This is a reference to the name used on the new endpoint when configuring the GitHub app on the Vault Server. Can be modified. Takes precedence over the access_token field.

Link copied to clipboard
val granularity: Output<String>? = null

Determines what level of information is synced as a distinct resource at the destination. Supports secret-path and secret-key.

Link copied to clipboard
val installationId: Output<Int>? = null

The ID of the installation generated by GitHub when the app referenced by the app_name was installed in the user’s GitHub account. Can be modified. Necessary if the app_name field is also provided.

Link copied to clipboard
val name: Output<String>? = null

Unique name of the GitHub destination.

Link copied to clipboard
val namespace: Output<String>? = null

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.

Link copied to clipboard
val repositoryName: Output<String>? = null

Name of the repository. Can be omitted and directly provided to Vault using the GITHUB_REPOSITORY_NAME environment variable.

Link copied to clipboard
val repositoryOwner: Output<String>? = null

GitHub organization or username that owns the repository. Can be omitted and directly provided to Vault using the GITHUB_REPOSITORY_OWNER environment variable.

Link copied to clipboard
val secretNameTemplate: Output<String>? = null

Template describing how to generate external secret names. Supports a subset of the Go Template syntax.

Functions

Link copied to clipboard
open override fun toJava(): SyncGhDestinationArgs