1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. SshKeyAccount
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

octopusdeploy.SshKeyAccount

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

    This resource manages SSH key accounts in Octopus Deploy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    const example = new octopusdeploy.SshKeyAccount("example", {
        privateKeyFile: "[private_key_file]",
        username: "[username]",
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    example = octopusdeploy.SshKeyAccount("example",
        private_key_file="[private_key_file]",
        username="[username]")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := octopusdeploy.NewSshKeyAccount(ctx, "example", &octopusdeploy.SshKeyAccountArgs{
    			PrivateKeyFile: pulumi.String("[private_key_file]"),
    			Username:       pulumi.String("[username]"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Octopusdeploy = Pulumi.Octopusdeploy;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Octopusdeploy.SshKeyAccount("example", new()
        {
            PrivateKeyFile = "[private_key_file]",
            Username = "[username]",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.octopusdeploy.SshKeyAccount;
    import com.pulumi.octopusdeploy.SshKeyAccountArgs;
    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 SshKeyAccount("example", SshKeyAccountArgs.builder()
                .privateKeyFile("[private_key_file]")
                .username("[username]")
                .build());
    
        }
    }
    
    resources:
      example:
        type: octopusdeploy:SshKeyAccount
        properties:
          privateKeyFile: '[private_key_file]'
          username: '[username]'
    

    Create SshKeyAccount Resource

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

    Constructor syntax

    new SshKeyAccount(name: string, args: SshKeyAccountArgs, opts?: CustomResourceOptions);
    @overload
    def SshKeyAccount(resource_name: str,
                      args: SshKeyAccountArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def SshKeyAccount(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      private_key_file: Optional[str] = None,
                      username: Optional[str] = None,
                      description: Optional[str] = None,
                      environments: Optional[Sequence[str]] = None,
                      name: Optional[str] = None,
                      private_key_passphrase: Optional[str] = None,
                      space_id: Optional[str] = None,
                      ssh_key_account_id: Optional[str] = None,
                      tenant_tags: Optional[Sequence[str]] = None,
                      tenanted_deployment_participation: Optional[str] = None,
                      tenants: Optional[Sequence[str]] = None)
    func NewSshKeyAccount(ctx *Context, name string, args SshKeyAccountArgs, opts ...ResourceOption) (*SshKeyAccount, error)
    public SshKeyAccount(string name, SshKeyAccountArgs args, CustomResourceOptions? opts = null)
    public SshKeyAccount(String name, SshKeyAccountArgs args)
    public SshKeyAccount(String name, SshKeyAccountArgs args, CustomResourceOptions options)
    
    type: octopusdeploy:SshKeyAccount
    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 SshKeyAccountArgs
    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 SshKeyAccountArgs
    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 SshKeyAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SshKeyAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SshKeyAccountArgs
    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 sshKeyAccountResource = new Octopusdeploy.SshKeyAccount("sshKeyAccountResource", new()
    {
        PrivateKeyFile = "string",
        Username = "string",
        Description = "string",
        Environments = new[]
        {
            "string",
        },
        Name = "string",
        PrivateKeyPassphrase = "string",
        SpaceId = "string",
        SshKeyAccountId = "string",
        TenantTags = new[]
        {
            "string",
        },
        TenantedDeploymentParticipation = "string",
        Tenants = new[]
        {
            "string",
        },
    });
    
    example, err := octopusdeploy.NewSshKeyAccount(ctx, "sshKeyAccountResource", &octopusdeploy.SshKeyAccountArgs{
    	PrivateKeyFile: pulumi.String("string"),
    	Username:       pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Environments: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:                 pulumi.String("string"),
    	PrivateKeyPassphrase: pulumi.String("string"),
    	SpaceId:              pulumi.String("string"),
    	SshKeyAccountId:      pulumi.String("string"),
    	TenantTags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TenantedDeploymentParticipation: pulumi.String("string"),
    	Tenants: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var sshKeyAccountResource = new SshKeyAccount("sshKeyAccountResource", SshKeyAccountArgs.builder()
        .privateKeyFile("string")
        .username("string")
        .description("string")
        .environments("string")
        .name("string")
        .privateKeyPassphrase("string")
        .spaceId("string")
        .sshKeyAccountId("string")
        .tenantTags("string")
        .tenantedDeploymentParticipation("string")
        .tenants("string")
        .build());
    
    ssh_key_account_resource = octopusdeploy.SshKeyAccount("sshKeyAccountResource",
        private_key_file="string",
        username="string",
        description="string",
        environments=["string"],
        name="string",
        private_key_passphrase="string",
        space_id="string",
        ssh_key_account_id="string",
        tenant_tags=["string"],
        tenanted_deployment_participation="string",
        tenants=["string"])
    
    const sshKeyAccountResource = new octopusdeploy.SshKeyAccount("sshKeyAccountResource", {
        privateKeyFile: "string",
        username: "string",
        description: "string",
        environments: ["string"],
        name: "string",
        privateKeyPassphrase: "string",
        spaceId: "string",
        sshKeyAccountId: "string",
        tenantTags: ["string"],
        tenantedDeploymentParticipation: "string",
        tenants: ["string"],
    });
    
    type: octopusdeploy:SshKeyAccount
    properties:
        description: string
        environments:
            - string
        name: string
        privateKeyFile: string
        privateKeyPassphrase: string
        spaceId: string
        sshKeyAccountId: string
        tenantTags:
            - string
        tenantedDeploymentParticipation: string
        tenants:
            - string
        username: string
    

    SshKeyAccount Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SshKeyAccount resource accepts the following input properties:

    PrivateKeyFile string
    Username string
    The username associated with this resource.
    Description string
    The description of this SSH key account.
    Environments List<string>
    A list of environment IDs associated with this resource.
    Name string
    The name of this resource.
    PrivateKeyPassphrase string
    SpaceId string
    The space ID associated with this resource.
    SshKeyAccountId string
    The unique ID for this resource.
    TenantTags List<string>
    A list of tenant tags associated with this resource.
    TenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    Tenants List<string>
    A list of tenant IDs associated with this resource.
    PrivateKeyFile string
    Username string
    The username associated with this resource.
    Description string
    The description of this SSH key account.
    Environments []string
    A list of environment IDs associated with this resource.
    Name string
    The name of this resource.
    PrivateKeyPassphrase string
    SpaceId string
    The space ID associated with this resource.
    SshKeyAccountId string
    The unique ID for this resource.
    TenantTags []string
    A list of tenant tags associated with this resource.
    TenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    Tenants []string
    A list of tenant IDs associated with this resource.
    privateKeyFile String
    username String
    The username associated with this resource.
    description String
    The description of this SSH key account.
    environments List<String>
    A list of environment IDs associated with this resource.
    name String
    The name of this resource.
    privateKeyPassphrase String
    spaceId String
    The space ID associated with this resource.
    sshKeyAccountId String
    The unique ID for this resource.
    tenantTags List<String>
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation String
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants List<String>
    A list of tenant IDs associated with this resource.
    privateKeyFile string
    username string
    The username associated with this resource.
    description string
    The description of this SSH key account.
    environments string[]
    A list of environment IDs associated with this resource.
    name string
    The name of this resource.
    privateKeyPassphrase string
    spaceId string
    The space ID associated with this resource.
    sshKeyAccountId string
    The unique ID for this resource.
    tenantTags string[]
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants string[]
    A list of tenant IDs associated with this resource.
    private_key_file str
    username str
    The username associated with this resource.
    description str
    The description of this SSH key account.
    environments Sequence[str]
    A list of environment IDs associated with this resource.
    name str
    The name of this resource.
    private_key_passphrase str
    space_id str
    The space ID associated with this resource.
    ssh_key_account_id str
    The unique ID for this resource.
    tenant_tags Sequence[str]
    A list of tenant tags associated with this resource.
    tenanted_deployment_participation str
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants Sequence[str]
    A list of tenant IDs associated with this resource.
    privateKeyFile String
    username String
    The username associated with this resource.
    description String
    The description of this SSH key account.
    environments List<String>
    A list of environment IDs associated with this resource.
    name String
    The name of this resource.
    privateKeyPassphrase String
    spaceId String
    The space ID associated with this resource.
    sshKeyAccountId String
    The unique ID for this resource.
    tenantTags List<String>
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation String
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants List<String>
    A list of tenant IDs associated with this resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SshKeyAccount Resource

    Get an existing SshKeyAccount 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?: SshKeyAccountState, opts?: CustomResourceOptions): SshKeyAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            environments: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            private_key_file: Optional[str] = None,
            private_key_passphrase: Optional[str] = None,
            space_id: Optional[str] = None,
            ssh_key_account_id: Optional[str] = None,
            tenant_tags: Optional[Sequence[str]] = None,
            tenanted_deployment_participation: Optional[str] = None,
            tenants: Optional[Sequence[str]] = None,
            username: Optional[str] = None) -> SshKeyAccount
    func GetSshKeyAccount(ctx *Context, name string, id IDInput, state *SshKeyAccountState, opts ...ResourceOption) (*SshKeyAccount, error)
    public static SshKeyAccount Get(string name, Input<string> id, SshKeyAccountState? state, CustomResourceOptions? opts = null)
    public static SshKeyAccount get(String name, Output<String> id, SshKeyAccountState state, CustomResourceOptions options)
    resources:  _:    type: octopusdeploy:SshKeyAccount    get:      id: ${id}
    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:
    Description string
    The description of this SSH key account.
    Environments List<string>
    A list of environment IDs associated with this resource.
    Name string
    The name of this resource.
    PrivateKeyFile string
    PrivateKeyPassphrase string
    SpaceId string
    The space ID associated with this resource.
    SshKeyAccountId string
    The unique ID for this resource.
    TenantTags List<string>
    A list of tenant tags associated with this resource.
    TenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    Tenants List<string>
    A list of tenant IDs associated with this resource.
    Username string
    The username associated with this resource.
    Description string
    The description of this SSH key account.
    Environments []string
    A list of environment IDs associated with this resource.
    Name string
    The name of this resource.
    PrivateKeyFile string
    PrivateKeyPassphrase string
    SpaceId string
    The space ID associated with this resource.
    SshKeyAccountId string
    The unique ID for this resource.
    TenantTags []string
    A list of tenant tags associated with this resource.
    TenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    Tenants []string
    A list of tenant IDs associated with this resource.
    Username string
    The username associated with this resource.
    description String
    The description of this SSH key account.
    environments List<String>
    A list of environment IDs associated with this resource.
    name String
    The name of this resource.
    privateKeyFile String
    privateKeyPassphrase String
    spaceId String
    The space ID associated with this resource.
    sshKeyAccountId String
    The unique ID for this resource.
    tenantTags List<String>
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation String
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants List<String>
    A list of tenant IDs associated with this resource.
    username String
    The username associated with this resource.
    description string
    The description of this SSH key account.
    environments string[]
    A list of environment IDs associated with this resource.
    name string
    The name of this resource.
    privateKeyFile string
    privateKeyPassphrase string
    spaceId string
    The space ID associated with this resource.
    sshKeyAccountId string
    The unique ID for this resource.
    tenantTags string[]
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation string
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants string[]
    A list of tenant IDs associated with this resource.
    username string
    The username associated with this resource.
    description str
    The description of this SSH key account.
    environments Sequence[str]
    A list of environment IDs associated with this resource.
    name str
    The name of this resource.
    private_key_file str
    private_key_passphrase str
    space_id str
    The space ID associated with this resource.
    ssh_key_account_id str
    The unique ID for this resource.
    tenant_tags Sequence[str]
    A list of tenant tags associated with this resource.
    tenanted_deployment_participation str
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants Sequence[str]
    A list of tenant IDs associated with this resource.
    username str
    The username associated with this resource.
    description String
    The description of this SSH key account.
    environments List<String>
    A list of environment IDs associated with this resource.
    name String
    The name of this resource.
    privateKeyFile String
    privateKeyPassphrase String
    spaceId String
    The space ID associated with this resource.
    sshKeyAccountId String
    The unique ID for this resource.
    tenantTags List<String>
    A list of tenant tags associated with this resource.
    tenantedDeploymentParticipation String
    The tenanted deployment mode of the resource. Valid account types are Untenanted, TenantedOrUntenanted, or Tenanted.
    tenants List<String>
    A list of tenant IDs associated with this resource.
    username String
    The username associated with this resource.

    Import

    $ pulumi import octopusdeploy:index/sshKeyAccount:SshKeyAccount [options] octopusdeploy_ssh_key_account.<name> <account-id>
    

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

    Package Details

    Repository
    octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
    License
    Notes
    This Pulumi package is based on the octopusdeploy Terraform Provider.
    octopusdeploy logo
    octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs