1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. secrets
  5. SyncGithubApps
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

vault.secrets.SyncGithubApps

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi

    Example Usage

    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),
    });
    
    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)
    
    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
    	})
    }
    
    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),
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      github-apps:
        type: vault:secrets:SyncGithubApps
        properties:
          name: gh-apps
          appId: ${appId}
          privateKey:
            fn::invoke:
              Function: std:file
              Arguments:
                input: ${privatekeyFile}
              Return: result
    

    Create SyncGithubApps Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SyncGithubApps(name: string, args: SyncGithubAppsArgs, opts?: CustomResourceOptions);
    @overload
    def SyncGithubApps(resource_name: str,
                       args: SyncGithubAppsArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def SyncGithubApps(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       app_id: Optional[int] = None,
                       private_key: Optional[str] = None,
                       name: Optional[str] = None,
                       namespace: Optional[str] = None)
    func NewSyncGithubApps(ctx *Context, name string, args SyncGithubAppsArgs, opts ...ResourceOption) (*SyncGithubApps, error)
    public SyncGithubApps(string name, SyncGithubAppsArgs args, CustomResourceOptions? opts = null)
    public SyncGithubApps(String name, SyncGithubAppsArgs args)
    public SyncGithubApps(String name, SyncGithubAppsArgs args, CustomResourceOptions options)
    
    type: vault:secrets:SyncGithubApps
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SyncGithubAppsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SyncGithubAppsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SyncGithubAppsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SyncGithubAppsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SyncGithubAppsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var syncGithubAppsResource = new Vault.Secrets.SyncGithubApps("syncGithubAppsResource", new()
    {
        AppId = 0,
        PrivateKey = "string",
        Name = "string",
        Namespace = "string",
    });
    
    example, err := secrets.NewSyncGithubApps(ctx, "syncGithubAppsResource", &secrets.SyncGithubAppsArgs{
    	AppId:      pulumi.Int(0),
    	PrivateKey: pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	Namespace:  pulumi.String("string"),
    })
    
    var syncGithubAppsResource = new SyncGithubApps("syncGithubAppsResource", SyncGithubAppsArgs.builder()
        .appId(0)
        .privateKey("string")
        .name("string")
        .namespace("string")
        .build());
    
    sync_github_apps_resource = vault.secrets.SyncGithubApps("syncGithubAppsResource",
        app_id=0,
        private_key="string",
        name="string",
        namespace="string")
    
    const syncGithubAppsResource = new vault.secrets.SyncGithubApps("syncGithubAppsResource", {
        appId: 0,
        privateKey: "string",
        name: "string",
        namespace: "string",
    });
    
    type: vault:secrets:SyncGithubApps
    properties:
        appId: 0
        name: string
        namespace: string
        privateKey: string
    

    SyncGithubApps Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SyncGithubApps resource accepts the following input properties:

    AppId int
    The GitHub application ID.
    PrivateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    Name string
    The user-defined name of the GitHub App configuration.
    Namespace string
    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.
    AppId int
    The GitHub application ID.
    PrivateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    Name string
    The user-defined name of the GitHub App configuration.
    Namespace string
    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.
    appId Integer
    The GitHub application ID.
    privateKey String
    The content of a PEM formatted private key generated on GitHub for the app.
    name String
    The user-defined name of the GitHub App configuration.
    namespace String
    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.
    appId number
    The GitHub application ID.
    privateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    name string
    The user-defined name of the GitHub App configuration.
    namespace string
    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.
    app_id int
    The GitHub application ID.
    private_key str
    The content of a PEM formatted private key generated on GitHub for the app.
    name str
    The user-defined name of the GitHub App configuration.
    namespace str
    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.
    appId Number
    The GitHub application ID.
    privateKey String
    The content of a PEM formatted private key generated on GitHub for the app.
    name String
    The user-defined name of the GitHub App configuration.
    namespace String
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SyncGithubApps resource produces the following output properties:

    Fingerprint string
    A fingerprint of a private key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Fingerprint string
    A fingerprint of a private key.
    Id string
    The provider-assigned unique ID for this managed resource.
    fingerprint String
    A fingerprint of a private key.
    id String
    The provider-assigned unique ID for this managed resource.
    fingerprint string
    A fingerprint of a private key.
    id string
    The provider-assigned unique ID for this managed resource.
    fingerprint str
    A fingerprint of a private key.
    id str
    The provider-assigned unique ID for this managed resource.
    fingerprint String
    A fingerprint of a private key.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SyncGithubApps Resource

    Get an existing SyncGithubApps resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SyncGithubAppsState, opts?: CustomResourceOptions): SyncGithubApps
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[int] = None,
            fingerprint: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            private_key: Optional[str] = None) -> SyncGithubApps
    func GetSyncGithubApps(ctx *Context, name string, id IDInput, state *SyncGithubAppsState, opts ...ResourceOption) (*SyncGithubApps, error)
    public static SyncGithubApps Get(string name, Input<string> id, SyncGithubAppsState? state, CustomResourceOptions? opts = null)
    public static SyncGithubApps get(String name, Output<String> id, SyncGithubAppsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AppId int
    The GitHub application ID.
    Fingerprint string
    A fingerprint of a private key.
    Name string
    The user-defined name of the GitHub App configuration.
    Namespace string
    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.
    PrivateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    AppId int
    The GitHub application ID.
    Fingerprint string
    A fingerprint of a private key.
    Name string
    The user-defined name of the GitHub App configuration.
    Namespace string
    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.
    PrivateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    appId Integer
    The GitHub application ID.
    fingerprint String
    A fingerprint of a private key.
    name String
    The user-defined name of the GitHub App configuration.
    namespace String
    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.
    privateKey String
    The content of a PEM formatted private key generated on GitHub for the app.
    appId number
    The GitHub application ID.
    fingerprint string
    A fingerprint of a private key.
    name string
    The user-defined name of the GitHub App configuration.
    namespace string
    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.
    privateKey string
    The content of a PEM formatted private key generated on GitHub for the app.
    app_id int
    The GitHub application ID.
    fingerprint str
    A fingerprint of a private key.
    name str
    The user-defined name of the GitHub App configuration.
    namespace str
    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.
    private_key str
    The content of a PEM formatted private key generated on GitHub for the app.
    appId Number
    The GitHub application ID.
    fingerprint String
    A fingerprint of a private key.
    name String
    The user-defined name of the GitHub App configuration.
    namespace String
    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.
    privateKey String
    The content of a PEM formatted private key generated on GitHub for the app.

    Import

    GitHub Apps Secrets sync configuration endpoint can be imported using the name, e.g.

    $ pulumi import vault:secrets/syncGithubApps:SyncGithubApps gh github-apps
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo
    HashiCorp Vault v6.3.0 published on Thursday, Aug 8, 2024 by Pulumi