bitbucket.PipelineSshKey
Explore with Pulumi AI
Provides a Bitbucket Pipeline Ssh Key resource.
This allows you to manage your Pipeline Ssh Keys for a repository.
OAuth2 Scopes: none
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const test = new bitbucket.PipelineSshKey("test", {
privateKey: "test-key",
publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
repository: "example",
workspace: "example",
});
import pulumi
import pulumi_bitbucket as bitbucket
test = bitbucket.PipelineSshKey("test",
private_key="test-key",
public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
repository="example",
workspace="example")
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.NewPipelineSshKey(ctx, "test", &bitbucket.PipelineSshKeyArgs{
PrivateKey: pulumi.String("test-key"),
PublicKey: pulumi.String("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY"),
Repository: pulumi.String("example"),
Workspace: pulumi.String("example"),
})
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.PipelineSshKey("test", new()
{
PrivateKey = "test-key",
PublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
Repository = "example",
Workspace = "example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitbucket.PipelineSshKey;
import com.pulumi.bitbucket.PipelineSshKeyArgs;
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 PipelineSshKey("test", PipelineSshKeyArgs.builder()
.privateKey("test-key")
.publicKey("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY")
.repository("example")
.workspace("example")
.build());
}
}
resources:
test:
type: bitbucket:PipelineSshKey
properties:
privateKey: test-key
publicKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY
repository: example
workspace: example
Create PipelineSshKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PipelineSshKey(name: string, args: PipelineSshKeyArgs, opts?: CustomResourceOptions);
@overload
def PipelineSshKey(resource_name: str,
args: PipelineSshKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PipelineSshKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
repository: Optional[str] = None,
workspace: Optional[str] = None,
pipeline_ssh_key_id: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None)
func NewPipelineSshKey(ctx *Context, name string, args PipelineSshKeyArgs, opts ...ResourceOption) (*PipelineSshKey, error)
public PipelineSshKey(string name, PipelineSshKeyArgs args, CustomResourceOptions? opts = null)
public PipelineSshKey(String name, PipelineSshKeyArgs args)
public PipelineSshKey(String name, PipelineSshKeyArgs args, CustomResourceOptions options)
type: bitbucket:PipelineSshKey
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 PipelineSshKeyArgs
- 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 PipelineSshKeyArgs
- 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 PipelineSshKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PipelineSshKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PipelineSshKeyArgs
- 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 pipelineSshKeyResource = new Bitbucket.PipelineSshKey("pipelineSshKeyResource", new()
{
Repository = "string",
Workspace = "string",
PipelineSshKeyId = "string",
PrivateKey = "string",
PublicKey = "string",
});
example, err := bitbucket.NewPipelineSshKey(ctx, "pipelineSshKeyResource", &bitbucket.PipelineSshKeyArgs{
Repository: pulumi.String("string"),
Workspace: pulumi.String("string"),
PipelineSshKeyId: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
PublicKey: pulumi.String("string"),
})
var pipelineSshKeyResource = new PipelineSshKey("pipelineSshKeyResource", PipelineSshKeyArgs.builder()
.repository("string")
.workspace("string")
.pipelineSshKeyId("string")
.privateKey("string")
.publicKey("string")
.build());
pipeline_ssh_key_resource = bitbucket.PipelineSshKey("pipelineSshKeyResource",
repository="string",
workspace="string",
pipeline_ssh_key_id="string",
private_key="string",
public_key="string")
const pipelineSshKeyResource = new bitbucket.PipelineSshKey("pipelineSshKeyResource", {
repository: "string",
workspace: "string",
pipelineSshKeyId: "string",
privateKey: "string",
publicKey: "string",
});
type: bitbucket:PipelineSshKey
properties:
pipelineSshKeyId: string
privateKey: string
publicKey: string
repository: string
workspace: string
PipelineSshKey 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 PipelineSshKey resource accepts the following input properties:
- Repository string
- The Repository to create ssh key in.
- Workspace string
- The Workspace where the repository resides.
- Pipeline
Ssh stringKey Id - Private
Key string - The SSH private key value in OpenSSH format.
- Public
Key string - The SSH public key value in OpenSSH format.
- Repository string
- The Repository to create ssh key in.
- Workspace string
- The Workspace where the repository resides.
- Pipeline
Ssh stringKey Id - Private
Key string - The SSH private key value in OpenSSH format.
- Public
Key string - The SSH public key value in OpenSSH format.
- repository String
- The Repository to create ssh key in.
- workspace String
- The Workspace where the repository resides.
- pipeline
Ssh StringKey Id - private
Key String - The SSH private key value in OpenSSH format.
- public
Key String - The SSH public key value in OpenSSH format.
- repository string
- The Repository to create ssh key in.
- workspace string
- The Workspace where the repository resides.
- pipeline
Ssh stringKey Id - private
Key string - The SSH private key value in OpenSSH format.
- public
Key string - The SSH public key value in OpenSSH format.
- repository str
- The Repository to create ssh key in.
- workspace str
- The Workspace where the repository resides.
- pipeline_
ssh_ strkey_ id - private_
key str - The SSH private key value in OpenSSH format.
- public_
key str - The SSH public key value in OpenSSH format.
- repository String
- The Repository to create ssh key in.
- workspace String
- The Workspace where the repository resides.
- pipeline
Ssh StringKey Id - private
Key String - The SSH private key value in OpenSSH format.
- public
Key String - The SSH public key value in OpenSSH format.
Outputs
All input properties are implicitly available as output properties. Additionally, the PipelineSshKey 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 PipelineSshKey Resource
Get an existing PipelineSshKey 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?: PipelineSshKeyState, opts?: CustomResourceOptions): PipelineSshKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
pipeline_ssh_key_id: Optional[str] = None,
private_key: Optional[str] = None,
public_key: Optional[str] = None,
repository: Optional[str] = None,
workspace: Optional[str] = None) -> PipelineSshKey
func GetPipelineSshKey(ctx *Context, name string, id IDInput, state *PipelineSshKeyState, opts ...ResourceOption) (*PipelineSshKey, error)
public static PipelineSshKey Get(string name, Input<string> id, PipelineSshKeyState? state, CustomResourceOptions? opts = null)
public static PipelineSshKey get(String name, Output<String> id, PipelineSshKeyState state, CustomResourceOptions options)
resources: _: type: bitbucket:PipelineSshKey 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.
- Pipeline
Ssh stringKey Id - Private
Key string - The SSH private key value in OpenSSH format.
- Public
Key string - The SSH public key value in OpenSSH format.
- Repository string
- The Repository to create ssh key in.
- Workspace string
- The Workspace where the repository resides.
- Pipeline
Ssh stringKey Id - Private
Key string - The SSH private key value in OpenSSH format.
- Public
Key string - The SSH public key value in OpenSSH format.
- Repository string
- The Repository to create ssh key in.
- Workspace string
- The Workspace where the repository resides.
- pipeline
Ssh StringKey Id - private
Key String - The SSH private key value in OpenSSH format.
- public
Key String - The SSH public key value in OpenSSH format.
- repository String
- The Repository to create ssh key in.
- workspace String
- The Workspace where the repository resides.
- pipeline
Ssh stringKey Id - private
Key string - The SSH private key value in OpenSSH format.
- public
Key string - The SSH public key value in OpenSSH format.
- repository string
- The Repository to create ssh key in.
- workspace string
- The Workspace where the repository resides.
- pipeline_
ssh_ strkey_ id - private_
key str - The SSH private key value in OpenSSH format.
- public_
key str - The SSH public key value in OpenSSH format.
- repository str
- The Repository to create ssh key in.
- workspace str
- The Workspace where the repository resides.
- pipeline
Ssh StringKey Id - private
Key String - The SSH private key value in OpenSSH format.
- public
Key String - The SSH public key value in OpenSSH format.
- repository String
- The Repository to create ssh key in.
- workspace String
- The Workspace where the repository resides.
Import
Pipeline Ssh Keys can be imported using their workspace/repo-slug
ID, e.g.
$ pulumi import bitbucket:index/pipelineSshKey:PipelineSshKey key workspace/repo-slug
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.