1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. GitOpsGnupg
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

harness.platform.GitOpsGnupg

Explore with Pulumi AI

harness logo
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

    Resource for managing Harness GitOps GPG public key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = new harness.platform.GitOpsGnupg("example", {
        accountId: "account_id",
        agentId: "agent_id",
        requests: [{
            upsert: true,
            publickeys: [{
                keyData: "-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----",
            }],
        }],
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.GitOpsGnupg("example",
        account_id="account_id",
        agent_id="agent_id",
        requests=[harness.platform.GitOpsGnupgRequestArgs(
            upsert=True,
            publickeys=[harness.platform.GitOpsGnupgRequestPublickeyArgs(
                key_data="-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----",
            )],
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewGitOpsGnupg(ctx, "example", &platform.GitOpsGnupgArgs{
    			AccountId: pulumi.String("account_id"),
    			AgentId:   pulumi.String("agent_id"),
    			Requests: platform.GitOpsGnupgRequestArray{
    				&platform.GitOpsGnupgRequestArgs{
    					Upsert: pulumi.Bool(true),
    					Publickeys: platform.GitOpsGnupgRequestPublickeyArray{
    						&platform.GitOpsGnupgRequestPublickeyArgs{
    							KeyData: pulumi.String("-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Harness.Platform.GitOpsGnupg("example", new()
        {
            AccountId = "account_id",
            AgentId = "agent_id",
            Requests = new[]
            {
                new Harness.Platform.Inputs.GitOpsGnupgRequestArgs
                {
                    Upsert = true,
                    Publickeys = new[]
                    {
                        new Harness.Platform.Inputs.GitOpsGnupgRequestPublickeyArgs
                        {
                            KeyData = "-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.GitOpsGnupg;
    import com.pulumi.harness.platform.GitOpsGnupgArgs;
    import com.pulumi.harness.platform.inputs.GitOpsGnupgRequestArgs;
    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 GitOpsGnupg("example", GitOpsGnupgArgs.builder()
                .accountId("account_id")
                .agentId("agent_id")
                .requests(GitOpsGnupgRequestArgs.builder()
                    .upsert(true)
                    .publickeys(GitOpsGnupgRequestPublickeyArgs.builder()
                        .keyData("-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: harness:platform:GitOpsGnupg
        properties:
          accountId: account_id
          agentId: agent_id
          requests:
            - upsert: true
              publickeys:
                - keyData: '-----BEGIN PGP PUBLIC KEY BLOCK-----XXXXXX-----END PGP PUBLIC KEY BLOCK-----'
    

    Create GitOpsGnupg Resource

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

    Constructor syntax

    new GitOpsGnupg(name: string, args: GitOpsGnupgArgs, opts?: CustomResourceOptions);
    @overload
    def GitOpsGnupg(resource_name: str,
                    args: GitOpsGnupgArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def GitOpsGnupg(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_id: Optional[str] = None,
                    agent_id: Optional[str] = None,
                    requests: Optional[Sequence[GitOpsGnupgRequestArgs]] = None,
                    org_id: Optional[str] = None,
                    project_id: Optional[str] = None)
    func NewGitOpsGnupg(ctx *Context, name string, args GitOpsGnupgArgs, opts ...ResourceOption) (*GitOpsGnupg, error)
    public GitOpsGnupg(string name, GitOpsGnupgArgs args, CustomResourceOptions? opts = null)
    public GitOpsGnupg(String name, GitOpsGnupgArgs args)
    public GitOpsGnupg(String name, GitOpsGnupgArgs args, CustomResourceOptions options)
    
    type: harness:platform:GitOpsGnupg
    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 GitOpsGnupgArgs
    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 GitOpsGnupgArgs
    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 GitOpsGnupgArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GitOpsGnupgArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GitOpsGnupgArgs
    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 gitOpsGnupgResource = new Harness.Platform.GitOpsGnupg("gitOpsGnupgResource", new()
    {
        AccountId = "string",
        AgentId = "string",
        Requests = new[]
        {
            new Harness.Platform.Inputs.GitOpsGnupgRequestArgs
            {
                Upsert = false,
                Publickeys = new[]
                {
                    new Harness.Platform.Inputs.GitOpsGnupgRequestPublickeyArgs
                    {
                        KeyData = "string",
                        Fingerprint = "string",
                        KeyId = "string",
                        Owner = "string",
                        SubType = "string",
                        Trust = "string",
                    },
                },
            },
        },
        OrgId = "string",
        ProjectId = "string",
    });
    
    example, err := platform.NewGitOpsGnupg(ctx, "gitOpsGnupgResource", &platform.GitOpsGnupgArgs{
    	AccountId: pulumi.String("string"),
    	AgentId:   pulumi.String("string"),
    	Requests: platform.GitOpsGnupgRequestArray{
    		&platform.GitOpsGnupgRequestArgs{
    			Upsert: pulumi.Bool(false),
    			Publickeys: platform.GitOpsGnupgRequestPublickeyArray{
    				&platform.GitOpsGnupgRequestPublickeyArgs{
    					KeyData:     pulumi.String("string"),
    					Fingerprint: pulumi.String("string"),
    					KeyId:       pulumi.String("string"),
    					Owner:       pulumi.String("string"),
    					SubType:     pulumi.String("string"),
    					Trust:       pulumi.String("string"),
    				},
    			},
    		},
    	},
    	OrgId:     pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    })
    
    var gitOpsGnupgResource = new GitOpsGnupg("gitOpsGnupgResource", GitOpsGnupgArgs.builder()
        .accountId("string")
        .agentId("string")
        .requests(GitOpsGnupgRequestArgs.builder()
            .upsert(false)
            .publickeys(GitOpsGnupgRequestPublickeyArgs.builder()
                .keyData("string")
                .fingerprint("string")
                .keyId("string")
                .owner("string")
                .subType("string")
                .trust("string")
                .build())
            .build())
        .orgId("string")
        .projectId("string")
        .build());
    
    git_ops_gnupg_resource = harness.platform.GitOpsGnupg("gitOpsGnupgResource",
        account_id="string",
        agent_id="string",
        requests=[harness.platform.GitOpsGnupgRequestArgs(
            upsert=False,
            publickeys=[harness.platform.GitOpsGnupgRequestPublickeyArgs(
                key_data="string",
                fingerprint="string",
                key_id="string",
                owner="string",
                sub_type="string",
                trust="string",
            )],
        )],
        org_id="string",
        project_id="string")
    
    const gitOpsGnupgResource = new harness.platform.GitOpsGnupg("gitOpsGnupgResource", {
        accountId: "string",
        agentId: "string",
        requests: [{
            upsert: false,
            publickeys: [{
                keyData: "string",
                fingerprint: "string",
                keyId: "string",
                owner: "string",
                subType: "string",
                trust: "string",
            }],
        }],
        orgId: "string",
        projectId: "string",
    });
    
    type: harness:platform:GitOpsGnupg
    properties:
        accountId: string
        agentId: string
        orgId: string
        projectId: string
        requests:
            - publickeys:
                - fingerprint: string
                  keyData: string
                  keyId: string
                  owner: string
                  subType: string
                  trust: string
              upsert: false
    

    GitOpsGnupg 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 GitOpsGnupg resource accepts the following input properties:

    AccountId string
    Account Identifier for the GnuPG Key.
    AgentId string
    Agent identifier for the GnuPG Key.
    Requests List<GitOpsGnupgRequest>
    GnuPGPublicKey is a representation of a GnuPG public key
    OrgId string
    Organization Identifier for the GnuPG Key.
    ProjectId string
    Project Identifier for the GnuPG Key.
    AccountId string
    Account Identifier for the GnuPG Key.
    AgentId string
    Agent identifier for the GnuPG Key.
    Requests []GitOpsGnupgRequestArgs
    GnuPGPublicKey is a representation of a GnuPG public key
    OrgId string
    Organization Identifier for the GnuPG Key.
    ProjectId string
    Project Identifier for the GnuPG Key.
    accountId String
    Account Identifier for the GnuPG Key.
    agentId String
    Agent identifier for the GnuPG Key.
    requests List<GitOpsGnupgRequest>
    GnuPGPublicKey is a representation of a GnuPG public key
    orgId String
    Organization Identifier for the GnuPG Key.
    projectId String
    Project Identifier for the GnuPG Key.
    accountId string
    Account Identifier for the GnuPG Key.
    agentId string
    Agent identifier for the GnuPG Key.
    requests GitOpsGnupgRequest[]
    GnuPGPublicKey is a representation of a GnuPG public key
    orgId string
    Organization Identifier for the GnuPG Key.
    projectId string
    Project Identifier for the GnuPG Key.
    account_id str
    Account Identifier for the GnuPG Key.
    agent_id str
    Agent identifier for the GnuPG Key.
    requests Sequence[GitOpsGnupgRequestArgs]
    GnuPGPublicKey is a representation of a GnuPG public key
    org_id str
    Organization Identifier for the GnuPG Key.
    project_id str
    Project Identifier for the GnuPG Key.
    accountId String
    Account Identifier for the GnuPG Key.
    agentId String
    Agent identifier for the GnuPG Key.
    requests List<Property Map>
    GnuPGPublicKey is a representation of a GnuPG public key
    orgId String
    Organization Identifier for the GnuPG Key.
    projectId String
    Project Identifier for the GnuPG Key.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Identifier for the GnuPG Key.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier string
    Identifier for the GnuPG Key.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Identifier for the GnuPG Key.
    id string
    The provider-assigned unique ID for this managed resource.
    identifier string
    Identifier for the GnuPG Key.
    id str
    The provider-assigned unique ID for this managed resource.
    identifier str
    Identifier for the GnuPG Key.
    id String
    The provider-assigned unique ID for this managed resource.
    identifier String
    Identifier for the GnuPG Key.

    Look up Existing GitOpsGnupg Resource

    Get an existing GitOpsGnupg 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?: GitOpsGnupgState, opts?: CustomResourceOptions): GitOpsGnupg
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            agent_id: Optional[str] = None,
            identifier: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            requests: Optional[Sequence[GitOpsGnupgRequestArgs]] = None) -> GitOpsGnupg
    func GetGitOpsGnupg(ctx *Context, name string, id IDInput, state *GitOpsGnupgState, opts ...ResourceOption) (*GitOpsGnupg, error)
    public static GitOpsGnupg Get(string name, Input<string> id, GitOpsGnupgState? state, CustomResourceOptions? opts = null)
    public static GitOpsGnupg get(String name, Output<String> id, GitOpsGnupgState 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:
    AccountId string
    Account Identifier for the GnuPG Key.
    AgentId string
    Agent identifier for the GnuPG Key.
    Identifier string
    Identifier for the GnuPG Key.
    OrgId string
    Organization Identifier for the GnuPG Key.
    ProjectId string
    Project Identifier for the GnuPG Key.
    Requests List<GitOpsGnupgRequest>
    GnuPGPublicKey is a representation of a GnuPG public key
    AccountId string
    Account Identifier for the GnuPG Key.
    AgentId string
    Agent identifier for the GnuPG Key.
    Identifier string
    Identifier for the GnuPG Key.
    OrgId string
    Organization Identifier for the GnuPG Key.
    ProjectId string
    Project Identifier for the GnuPG Key.
    Requests []GitOpsGnupgRequestArgs
    GnuPGPublicKey is a representation of a GnuPG public key
    accountId String
    Account Identifier for the GnuPG Key.
    agentId String
    Agent identifier for the GnuPG Key.
    identifier String
    Identifier for the GnuPG Key.
    orgId String
    Organization Identifier for the GnuPG Key.
    projectId String
    Project Identifier for the GnuPG Key.
    requests List<GitOpsGnupgRequest>
    GnuPGPublicKey is a representation of a GnuPG public key
    accountId string
    Account Identifier for the GnuPG Key.
    agentId string
    Agent identifier for the GnuPG Key.
    identifier string
    Identifier for the GnuPG Key.
    orgId string
    Organization Identifier for the GnuPG Key.
    projectId string
    Project Identifier for the GnuPG Key.
    requests GitOpsGnupgRequest[]
    GnuPGPublicKey is a representation of a GnuPG public key
    account_id str
    Account Identifier for the GnuPG Key.
    agent_id str
    Agent identifier for the GnuPG Key.
    identifier str
    Identifier for the GnuPG Key.
    org_id str
    Organization Identifier for the GnuPG Key.
    project_id str
    Project Identifier for the GnuPG Key.
    requests Sequence[GitOpsGnupgRequestArgs]
    GnuPGPublicKey is a representation of a GnuPG public key
    accountId String
    Account Identifier for the GnuPG Key.
    agentId String
    Agent identifier for the GnuPG Key.
    identifier String
    Identifier for the GnuPG Key.
    orgId String
    Organization Identifier for the GnuPG Key.
    projectId String
    Project Identifier for the GnuPG Key.
    requests List<Property Map>
    GnuPGPublicKey is a representation of a GnuPG public key

    Supporting Types

    GitOpsGnupgRequest, GitOpsGnupgRequestArgs

    Upsert bool
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    Publickeys List<GitOpsGnupgRequestPublickey>
    Public key details.
    Upsert bool
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    Publickeys []GitOpsGnupgRequestPublickey
    Public key details.
    upsert Boolean
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    publickeys List<GitOpsGnupgRequestPublickey>
    Public key details.
    upsert boolean
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    publickeys GitOpsGnupgRequestPublickey[]
    Public key details.
    upsert bool
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    publickeys Sequence[GitOpsGnupgRequestPublickey]
    Public key details.
    upsert Boolean
    Indicates if the GnuPG Key should be inserted if not present or updated if present.
    publickeys List<Property Map>
    Public key details.

    GitOpsGnupgRequestPublickey, GitOpsGnupgRequestPublickeyArgs

    KeyData string
    KeyData holds the raw key data, in base64 encoded format.
    Fingerprint string
    Fingerprint is the fingerprint of the key
    KeyId string
    KeyID specifies the key ID, in hexadecimal string format.
    Owner string
    Owner holds the owner identification, e.g. a name and e-mail address
    SubType string
    SubType holds the key's sub type
    Trust string
    Trust holds the level of trust assigned to this key
    KeyData string
    KeyData holds the raw key data, in base64 encoded format.
    Fingerprint string
    Fingerprint is the fingerprint of the key
    KeyId string
    KeyID specifies the key ID, in hexadecimal string format.
    Owner string
    Owner holds the owner identification, e.g. a name and e-mail address
    SubType string
    SubType holds the key's sub type
    Trust string
    Trust holds the level of trust assigned to this key
    keyData String
    KeyData holds the raw key data, in base64 encoded format.
    fingerprint String
    Fingerprint is the fingerprint of the key
    keyId String
    KeyID specifies the key ID, in hexadecimal string format.
    owner String
    Owner holds the owner identification, e.g. a name and e-mail address
    subType String
    SubType holds the key's sub type
    trust String
    Trust holds the level of trust assigned to this key
    keyData string
    KeyData holds the raw key data, in base64 encoded format.
    fingerprint string
    Fingerprint is the fingerprint of the key
    keyId string
    KeyID specifies the key ID, in hexadecimal string format.
    owner string
    Owner holds the owner identification, e.g. a name and e-mail address
    subType string
    SubType holds the key's sub type
    trust string
    Trust holds the level of trust assigned to this key
    key_data str
    KeyData holds the raw key data, in base64 encoded format.
    fingerprint str
    Fingerprint is the fingerprint of the key
    key_id str
    KeyID specifies the key ID, in hexadecimal string format.
    owner str
    Owner holds the owner identification, e.g. a name and e-mail address
    sub_type str
    SubType holds the key's sub type
    trust str
    Trust holds the level of trust assigned to this key
    keyData String
    KeyData holds the raw key data, in base64 encoded format.
    fingerprint String
    Fingerprint is the fingerprint of the key
    keyId String
    KeyID specifies the key ID, in hexadecimal string format.
    owner String
    Owner holds the owner identification, e.g. a name and e-mail address
    subType String
    SubType holds the key's sub type
    trust String
    Trust holds the level of trust assigned to this key

    Import

    Import an Account level Gitops GnuPG Key

    $ pulumi import harness:platform/gitOpsGnupg:GitOpsGnupg example <agent_id>/<key_id>
    

    Import an Org level Gitops GnuPG Key

    $ pulumi import harness:platform/gitOpsGnupg:GitOpsGnupg example <organization_id>/<agent_id>/<key_id>
    

    Import a Project level Gitops GnuPG Key

    $ pulumi import harness:platform/gitOpsGnupg:GitOpsGnupg example <organization_id>/<project_id>/<agent_id>/<key_id>
    

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi