1. Packages
  2. Bitbucket Provider
  3. API Docs
  4. PipelineSshKnownHost
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

bitbucket.PipelineSshKnownHost

Explore with Pulumi AI

bitbucket logo
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

    Provides a Bitbucket Pipeline Ssh Known Host resource.

    This allows you to manage your Pipeline Ssh Known Hosts for a repository.

    OAuth2 Scopes: none

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitbucket from "@pulumi/bitbucket";
    
    const test = new bitbucket.PipelineSshKnownHost("test", {
        workspace: "example",
        repository: bitbucket_repository.test.name,
        hostname: "[example.com]:22",
        publicKey: {
            keyType: "ssh-ed25519",
            key: "AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
        },
    });
    
    import pulumi
    import pulumi_bitbucket as bitbucket
    
    test = bitbucket.PipelineSshKnownHost("test",
        workspace="example",
        repository=bitbucket_repository["test"]["name"],
        hostname="[example.com]:22",
        public_key={
            "key_type": "ssh-ed25519",
            "key": "AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bitbucket.NewPipelineSshKnownHost(ctx, "test", &bitbucket.PipelineSshKnownHostArgs{
    			Workspace:  pulumi.String("example"),
    			Repository: pulumi.Any(bitbucket_repository.Test.Name),
    			Hostname:   pulumi.String("[example.com]:22"),
    			PublicKey: &bitbucket.PipelineSshKnownHostPublicKeyArgs{
    				KeyType: pulumi.String("ssh-ed25519"),
    				Key:     pulumi.String("AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitbucket = Pulumi.Bitbucket;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Bitbucket.PipelineSshKnownHost("test", new()
        {
            Workspace = "example",
            Repository = bitbucket_repository.Test.Name,
            Hostname = "[example.com]:22",
            PublicKey = new Bitbucket.Inputs.PipelineSshKnownHostPublicKeyArgs
            {
                KeyType = "ssh-ed25519",
                Key = "AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.bitbucket.PipelineSshKnownHost;
    import com.pulumi.bitbucket.PipelineSshKnownHostArgs;
    import com.pulumi.bitbucket.inputs.PipelineSshKnownHostPublicKeyArgs;
    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 test = new PipelineSshKnownHost("test", PipelineSshKnownHostArgs.builder()
                .workspace("example")
                .repository(bitbucket_repository.test().name())
                .hostname("[example.com]:22")
                .publicKey(PipelineSshKnownHostPublicKeyArgs.builder()
                    .keyType("ssh-ed25519")
                    .key("AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: bitbucket:PipelineSshKnownHost
        properties:
          workspace: example
          repository: ${bitbucket_repository.test.name}
          hostname: '[example.com]:22'
          publicKey:
            keyType: ssh-ed25519
            key: AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY
    

    Create PipelineSshKnownHost Resource

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

    Constructor syntax

    new PipelineSshKnownHost(name: string, args: PipelineSshKnownHostArgs, opts?: CustomResourceOptions);
    @overload
    def PipelineSshKnownHost(resource_name: str,
                             args: PipelineSshKnownHostArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PipelineSshKnownHost(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             public_key: Optional[PipelineSshKnownHostPublicKeyArgs] = None,
                             repository: Optional[str] = None,
                             workspace: Optional[str] = None,
                             hostname: Optional[str] = None,
                             pipeline_ssh_known_host_id: Optional[str] = None)
    func NewPipelineSshKnownHost(ctx *Context, name string, args PipelineSshKnownHostArgs, opts ...ResourceOption) (*PipelineSshKnownHost, error)
    public PipelineSshKnownHost(string name, PipelineSshKnownHostArgs args, CustomResourceOptions? opts = null)
    public PipelineSshKnownHost(String name, PipelineSshKnownHostArgs args)
    public PipelineSshKnownHost(String name, PipelineSshKnownHostArgs args, CustomResourceOptions options)
    
    type: bitbucket:PipelineSshKnownHost
    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 PipelineSshKnownHostArgs
    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 PipelineSshKnownHostArgs
    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 PipelineSshKnownHostArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PipelineSshKnownHostArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PipelineSshKnownHostArgs
    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 pipelineSshKnownHostResource = new Bitbucket.PipelineSshKnownHost("pipelineSshKnownHostResource", new()
    {
        PublicKey = new Bitbucket.Inputs.PipelineSshKnownHostPublicKeyArgs
        {
            Key = "string",
            KeyType = "string",
            Md5Fingerprint = "string",
            Sha256Fingerprint = "string",
        },
        Repository = "string",
        Workspace = "string",
        Hostname = "string",
        PipelineSshKnownHostId = "string",
    });
    
    example, err := bitbucket.NewPipelineSshKnownHost(ctx, "pipelineSshKnownHostResource", &bitbucket.PipelineSshKnownHostArgs{
    	PublicKey: &bitbucket.PipelineSshKnownHostPublicKeyArgs{
    		Key:               pulumi.String("string"),
    		KeyType:           pulumi.String("string"),
    		Md5Fingerprint:    pulumi.String("string"),
    		Sha256Fingerprint: pulumi.String("string"),
    	},
    	Repository:             pulumi.String("string"),
    	Workspace:              pulumi.String("string"),
    	Hostname:               pulumi.String("string"),
    	PipelineSshKnownHostId: pulumi.String("string"),
    })
    
    var pipelineSshKnownHostResource = new PipelineSshKnownHost("pipelineSshKnownHostResource", PipelineSshKnownHostArgs.builder()
        .publicKey(PipelineSshKnownHostPublicKeyArgs.builder()
            .key("string")
            .keyType("string")
            .md5Fingerprint("string")
            .sha256Fingerprint("string")
            .build())
        .repository("string")
        .workspace("string")
        .hostname("string")
        .pipelineSshKnownHostId("string")
        .build());
    
    pipeline_ssh_known_host_resource = bitbucket.PipelineSshKnownHost("pipelineSshKnownHostResource",
        public_key={
            "key": "string",
            "key_type": "string",
            "md5_fingerprint": "string",
            "sha256_fingerprint": "string",
        },
        repository="string",
        workspace="string",
        hostname="string",
        pipeline_ssh_known_host_id="string")
    
    const pipelineSshKnownHostResource = new bitbucket.PipelineSshKnownHost("pipelineSshKnownHostResource", {
        publicKey: {
            key: "string",
            keyType: "string",
            md5Fingerprint: "string",
            sha256Fingerprint: "string",
        },
        repository: "string",
        workspace: "string",
        hostname: "string",
        pipelineSshKnownHostId: "string",
    });
    
    type: bitbucket:PipelineSshKnownHost
    properties:
        hostname: string
        pipelineSshKnownHostId: string
        publicKey:
            key: string
            keyType: string
            md5Fingerprint: string
            sha256Fingerprint: string
        repository: string
        workspace: string
    

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

    PublicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    Repository string
    The Repository to create config for the known host in.
    Workspace string
    The Workspace where the repository resides.
    Hostname string
    The hostname of the known host.
    PipelineSshKnownHostId string
    PublicKey PipelineSshKnownHostPublicKeyArgs
    The Public key config for the known host.
    Repository string
    The Repository to create config for the known host in.
    Workspace string
    The Workspace where the repository resides.
    Hostname string
    The hostname of the known host.
    PipelineSshKnownHostId string
    publicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    repository String
    The Repository to create config for the known host in.
    workspace String
    The Workspace where the repository resides.
    hostname String
    The hostname of the known host.
    pipelineSshKnownHostId String
    publicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    repository string
    The Repository to create config for the known host in.
    workspace string
    The Workspace where the repository resides.
    hostname string
    The hostname of the known host.
    pipelineSshKnownHostId string
    public_key PipelineSshKnownHostPublicKeyArgs
    The Public key config for the known host.
    repository str
    The Repository to create config for the known host in.
    workspace str
    The Workspace where the repository resides.
    hostname str
    The hostname of the known host.
    pipeline_ssh_known_host_id str
    publicKey Property Map
    The Public key config for the known host.
    repository String
    The Repository to create config for the known host in.
    workspace String
    The Workspace where the repository resides.
    hostname String
    The hostname of the known host.
    pipelineSshKnownHostId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID identifying the known host.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The UUID identifying the known host.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID identifying the known host.
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    The UUID identifying the known host.
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    The UUID identifying the known host.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The UUID identifying the known host.

    Look up Existing PipelineSshKnownHost Resource

    Get an existing PipelineSshKnownHost 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?: PipelineSshKnownHostState, opts?: CustomResourceOptions): PipelineSshKnownHost
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            hostname: Optional[str] = None,
            pipeline_ssh_known_host_id: Optional[str] = None,
            public_key: Optional[PipelineSshKnownHostPublicKeyArgs] = None,
            repository: Optional[str] = None,
            uuid: Optional[str] = None,
            workspace: Optional[str] = None) -> PipelineSshKnownHost
    func GetPipelineSshKnownHost(ctx *Context, name string, id IDInput, state *PipelineSshKnownHostState, opts ...ResourceOption) (*PipelineSshKnownHost, error)
    public static PipelineSshKnownHost Get(string name, Input<string> id, PipelineSshKnownHostState? state, CustomResourceOptions? opts = null)
    public static PipelineSshKnownHost get(String name, Output<String> id, PipelineSshKnownHostState state, CustomResourceOptions options)
    resources:  _:    type: bitbucket:PipelineSshKnownHost    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:
    Hostname string
    The hostname of the known host.
    PipelineSshKnownHostId string
    PublicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    Repository string
    The Repository to create config for the known host in.
    Uuid string
    The UUID identifying the known host.
    Workspace string
    The Workspace where the repository resides.
    Hostname string
    The hostname of the known host.
    PipelineSshKnownHostId string
    PublicKey PipelineSshKnownHostPublicKeyArgs
    The Public key config for the known host.
    Repository string
    The Repository to create config for the known host in.
    Uuid string
    The UUID identifying the known host.
    Workspace string
    The Workspace where the repository resides.
    hostname String
    The hostname of the known host.
    pipelineSshKnownHostId String
    publicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    repository String
    The Repository to create config for the known host in.
    uuid String
    The UUID identifying the known host.
    workspace String
    The Workspace where the repository resides.
    hostname string
    The hostname of the known host.
    pipelineSshKnownHostId string
    publicKey PipelineSshKnownHostPublicKey
    The Public key config for the known host.
    repository string
    The Repository to create config for the known host in.
    uuid string
    The UUID identifying the known host.
    workspace string
    The Workspace where the repository resides.
    hostname str
    The hostname of the known host.
    pipeline_ssh_known_host_id str
    public_key PipelineSshKnownHostPublicKeyArgs
    The Public key config for the known host.
    repository str
    The Repository to create config for the known host in.
    uuid str
    The UUID identifying the known host.
    workspace str
    The Workspace where the repository resides.
    hostname String
    The hostname of the known host.
    pipelineSshKnownHostId String
    publicKey Property Map
    The Public key config for the known host.
    repository String
    The Repository to create config for the known host in.
    uuid String
    The UUID identifying the known host.
    workspace String
    The Workspace where the repository resides.

    Supporting Types

    PipelineSshKnownHostPublicKey, PipelineSshKnownHostPublicKeyArgs

    Key string
    The plain public key.
    KeyType string
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    Md5Fingerprint string
    The MD5 fingerprint of the public key.
    Sha256Fingerprint string
    The SHA-256 fingerprint of the public key.
    Key string
    The plain public key.
    KeyType string
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    Md5Fingerprint string
    The MD5 fingerprint of the public key.
    Sha256Fingerprint string
    The SHA-256 fingerprint of the public key.
    key String
    The plain public key.
    keyType String
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    md5Fingerprint String
    The MD5 fingerprint of the public key.
    sha256Fingerprint String
    The SHA-256 fingerprint of the public key.
    key string
    The plain public key.
    keyType string
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    md5Fingerprint string
    The MD5 fingerprint of the public key.
    sha256Fingerprint string
    The SHA-256 fingerprint of the public key.
    key str
    The plain public key.
    key_type str
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    md5_fingerprint str
    The MD5 fingerprint of the public key.
    sha256_fingerprint str
    The SHA-256 fingerprint of the public key.
    key String
    The plain public key.
    keyType String
    The type of the public key. Valid values are ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa, and ssh-dss.
    md5Fingerprint String
    The MD5 fingerprint of the public key.
    sha256Fingerprint String
    The SHA-256 fingerprint of the public key.

    Import

    Pipeline Ssh Known Hosts can be imported using their workspace/repo-slug/uuid ID, e.g.

    $ pulumi import bitbucket:index/pipelineSshKnownHost:PipelineSshKnownHost key workspace/repo-slug/uuid
    

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

    Package Details

    Repository
    bitbucket drfaust92/terraform-provider-bitbucket
    License
    Notes
    This Pulumi package is based on the bitbucket Terraform Provider.
    bitbucket logo
    bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92