Sync Gh Destination Args
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
Properties
Fine-grained or personal access token. Can be omitted and directly provided to Vault using the GITHUB_ACCESS_TOKEN
environment variable.
Determines what level of information is synced as a distinct resource at the destination. Supports secret-path
and secret-key
.
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.
Name of the repository. Can be omitted and directly provided to Vault using the GITHUB_REPOSITORY_NAME
environment variable.
GitHub organization or username that owns the repository. Can be omitted and directly provided to Vault using the GITHUB_REPOSITORY_OWNER
environment variable.
Template describing how to generate external secret names. Supports a subset of the Go Template syntax.