harness.platform.GitOpsGnupg
Explore with Pulumi AI
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=[{
"upsert": True,
"publickeys": [{
"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:
- account_
id str - Account Identifier for the GnuPG Key.
- agent_
id str - Agent identifier for the GnuPG Key.
- requests
Sequence[Git
Ops Gnupg Request Args] - 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.
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.
- Account
Id string - Account Identifier for the GnuPG Key.
- Agent
Id string - Agent identifier for the GnuPG Key.
- Identifier string
- Identifier for the GnuPG Key.
- Org
Id string - Organization Identifier for the GnuPG Key.
- Project
Id string - Project Identifier for the GnuPG Key.
- Requests
List<Git
Ops Gnupg Request> - GnuPGPublicKey is a representation of a GnuPG public key
- Account
Id string - Account Identifier for the GnuPG Key.
- Agent
Id string - Agent identifier for the GnuPG Key.
- Identifier string
- Identifier for the GnuPG Key.
- Org
Id string - Organization Identifier for the GnuPG Key.
- Project
Id string - Project Identifier for the GnuPG Key.
- Requests
[]Git
Ops Gnupg Request Args - GnuPGPublicKey is a representation of a GnuPG public key
- account
Id String - Account Identifier for the GnuPG Key.
- agent
Id String - Agent identifier for the GnuPG Key.
- identifier String
- Identifier for the GnuPG Key.
- org
Id String - Organization Identifier for the GnuPG Key.
- project
Id String - Project Identifier for the GnuPG Key.
- requests
List<Git
Ops Gnupg Request> - GnuPGPublicKey is a representation of a GnuPG public key
- account
Id string - Account Identifier for the GnuPG Key.
- agent
Id string - Agent identifier for the GnuPG Key.
- identifier string
- Identifier for the GnuPG Key.
- org
Id string - Organization Identifier for the GnuPG Key.
- project
Id string - Project Identifier for the GnuPG Key.
- requests
Git
Ops Gnupg Request[] - 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[Git
Ops Gnupg Request Args] - GnuPGPublicKey is a representation of a GnuPG public key
- account
Id String - Account Identifier for the GnuPG Key.
- agent
Id String - Agent identifier for the GnuPG Key.
- identifier String
- Identifier for the GnuPG Key.
- org
Id String - Organization Identifier for the GnuPG Key.
- project
Id 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<Git
Ops Gnupg Request Publickey> - Public key details.
- Upsert bool
- Indicates if the GnuPG Key should be inserted if not present or updated if present.
- Publickeys
[]Git
Ops Gnupg Request Publickey - Public key details.
- upsert Boolean
- Indicates if the GnuPG Key should be inserted if not present or updated if present.
- publickeys
List<Git
Ops Gnupg Request Publickey> - Public key details.
- upsert boolean
- Indicates if the GnuPG Key should be inserted if not present or updated if present.
- publickeys
Git
Ops Gnupg Request Publickey[] - Public key details.
- upsert bool
- Indicates if the GnuPG Key should be inserted if not present or updated if present.
- publickeys
Sequence[Git
Ops Gnupg Request Publickey] - 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
- Key
Data string - KeyData holds the raw key data, in base64 encoded format.
- Fingerprint string
- Fingerprint is the fingerprint of the key
- Key
Id 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
- Sub
Type string - SubType holds the key's sub type
- Trust string
- Trust holds the level of trust assigned to this key
- Key
Data string - KeyData holds the raw key data, in base64 encoded format.
- Fingerprint string
- Fingerprint is the fingerprint of the key
- Key
Id 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
- Sub
Type string - SubType holds the key's sub type
- Trust string
- Trust holds the level of trust assigned to this key
- key
Data String - KeyData holds the raw key data, in base64 encoded format.
- fingerprint String
- Fingerprint is the fingerprint of the key
- key
Id 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
- sub
Type String - SubType holds the key's sub type
- trust String
- Trust holds the level of trust assigned to this key
- key
Data string - KeyData holds the raw key data, in base64 encoded format.
- fingerprint string
- Fingerprint is the fingerprint of the key
- key
Id 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
- sub
Type 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
- key
Data String - KeyData holds the raw key data, in base64 encoded format.
- fingerprint String
- Fingerprint is the fingerprint of the key
- key
Id 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
- sub
Type 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.