bitbucket.Deployment
Explore with Pulumi AI
This resource allows you to setup pipelines deployment environments.
OAuth2 Scopes: none
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const monorepo = new bitbucket.Repository("monorepo", {
owner: "gob",
pipelinesEnabled: true,
});
const test = new bitbucket.Deployment("test", {
repository: monorepo.repositoryId,
stage: "Test",
});
import pulumi
import pulumi_bitbucket as bitbucket
monorepo = bitbucket.Repository("monorepo",
owner="gob",
pipelines_enabled=True)
test = bitbucket.Deployment("test",
repository=monorepo.repository_id,
stage="Test")
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 {
monorepo, err := bitbucket.NewRepository(ctx, "monorepo", &bitbucket.RepositoryArgs{
Owner: pulumi.String("gob"),
PipelinesEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = bitbucket.NewDeployment(ctx, "test", &bitbucket.DeploymentArgs{
Repository: monorepo.RepositoryId,
Stage: pulumi.String("Test"),
})
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 monorepo = new Bitbucket.Repository("monorepo", new()
{
Owner = "gob",
PipelinesEnabled = true,
});
var test = new Bitbucket.Deployment("test", new()
{
Repository = monorepo.RepositoryId,
Stage = "Test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitbucket.Repository;
import com.pulumi.bitbucket.RepositoryArgs;
import com.pulumi.bitbucket.Deployment;
import com.pulumi.bitbucket.DeploymentArgs;
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 monorepo = new Repository("monorepo", RepositoryArgs.builder()
.owner("gob")
.pipelinesEnabled(true)
.build());
var test = new Deployment("test", DeploymentArgs.builder()
.repository(monorepo.repositoryId())
.stage("Test")
.build());
}
}
resources:
monorepo:
type: bitbucket:Repository
properties:
owner: gob
pipelinesEnabled: true
test:
type: bitbucket:Deployment
properties:
repository: ${monorepo.repositoryId}
stage: Test
Create Deployment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
@overload
def Deployment(resource_name: str,
args: DeploymentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Deployment(resource_name: str,
opts: Optional[ResourceOptions] = None,
repository: Optional[str] = None,
stage: Optional[str] = None,
deployment_id: Optional[str] = None,
name: Optional[str] = None,
restrictions: Optional[DeploymentRestrictionsArgs] = None)
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
public Deployment(String name, DeploymentArgs args)
public Deployment(String name, DeploymentArgs args, CustomResourceOptions options)
type: bitbucket:Deployment
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 DeploymentArgs
- 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 DeploymentArgs
- 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 DeploymentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeploymentArgs
- 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 deploymentResource = new Bitbucket.Deployment("deploymentResource", new()
{
Repository = "string",
Stage = "string",
DeploymentId = "string",
Name = "string",
Restrictions = new Bitbucket.Inputs.DeploymentRestrictionsArgs
{
AdminOnly = false,
},
});
example, err := bitbucket.NewDeployment(ctx, "deploymentResource", &bitbucket.DeploymentArgs{
Repository: pulumi.String("string"),
Stage: pulumi.String("string"),
DeploymentId: pulumi.String("string"),
Name: pulumi.String("string"),
Restrictions: &bitbucket.DeploymentRestrictionsArgs{
AdminOnly: pulumi.Bool(false),
},
})
var deploymentResource = new Deployment("deploymentResource", DeploymentArgs.builder()
.repository("string")
.stage("string")
.deploymentId("string")
.name("string")
.restrictions(DeploymentRestrictionsArgs.builder()
.adminOnly(false)
.build())
.build());
deployment_resource = bitbucket.Deployment("deploymentResource",
repository="string",
stage="string",
deployment_id="string",
name="string",
restrictions={
"admin_only": False,
})
const deploymentResource = new bitbucket.Deployment("deploymentResource", {
repository: "string",
stage: "string",
deploymentId: "string",
name: "string",
restrictions: {
adminOnly: false,
},
});
type: bitbucket:Deployment
properties:
deploymentId: string
name: string
repository: string
restrictions:
adminOnly: false
stage: string
Deployment 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 Deployment resource accepts the following input properties:
- Repository string
- The repository ID to which you want to assign this deployment environment to
- Stage string
- The stage (Test, Staging, Production)
- Deployment
Id string - Name string
- The name of the deployment environment
- Restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- Repository string
- The repository ID to which you want to assign this deployment environment to
- Stage string
- The stage (Test, Staging, Production)
- Deployment
Id string - Name string
- The name of the deployment environment
- Restrictions
Deployment
Restrictions Args - Deployment restrictions. See Restrictions below.
- repository String
- The repository ID to which you want to assign this deployment environment to
- stage String
- The stage (Test, Staging, Production)
- deployment
Id String - name String
- The name of the deployment environment
- restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- repository string
- The repository ID to which you want to assign this deployment environment to
- stage string
- The stage (Test, Staging, Production)
- deployment
Id string - name string
- The name of the deployment environment
- restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- repository str
- The repository ID to which you want to assign this deployment environment to
- stage str
- The stage (Test, Staging, Production)
- deployment_
id str - name str
- The name of the deployment environment
- restrictions
Deployment
Restrictions Args - Deployment restrictions. See Restrictions below.
- repository String
- The repository ID to which you want to assign this deployment environment to
- stage String
- The stage (Test, Staging, Production)
- deployment
Id String - name String
- The name of the deployment environment
- restrictions Property Map
- Deployment restrictions. See Restrictions below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Deployment resource produces the following output properties:
Look up Existing Deployment Resource
Get an existing Deployment 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?: DeploymentState, opts?: CustomResourceOptions): Deployment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
deployment_id: Optional[str] = None,
name: Optional[str] = None,
repository: Optional[str] = None,
restrictions: Optional[DeploymentRestrictionsArgs] = None,
stage: Optional[str] = None,
uuid: Optional[str] = None) -> Deployment
func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
public static Deployment get(String name, Output<String> id, DeploymentState state, CustomResourceOptions options)
resources: _: type: bitbucket:Deployment 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.
- Deployment
Id string - Name string
- The name of the deployment environment
- Repository string
- The repository ID to which you want to assign this deployment environment to
- Restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- Stage string
- The stage (Test, Staging, Production)
- Uuid string
- (Computed) The UUID identifying the deployment.
- Deployment
Id string - Name string
- The name of the deployment environment
- Repository string
- The repository ID to which you want to assign this deployment environment to
- Restrictions
Deployment
Restrictions Args - Deployment restrictions. See Restrictions below.
- Stage string
- The stage (Test, Staging, Production)
- Uuid string
- (Computed) The UUID identifying the deployment.
- deployment
Id String - name String
- The name of the deployment environment
- repository String
- The repository ID to which you want to assign this deployment environment to
- restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- stage String
- The stage (Test, Staging, Production)
- uuid String
- (Computed) The UUID identifying the deployment.
- deployment
Id string - name string
- The name of the deployment environment
- repository string
- The repository ID to which you want to assign this deployment environment to
- restrictions
Deployment
Restrictions - Deployment restrictions. See Restrictions below.
- stage string
- The stage (Test, Staging, Production)
- uuid string
- (Computed) The UUID identifying the deployment.
- deployment_
id str - name str
- The name of the deployment environment
- repository str
- The repository ID to which you want to assign this deployment environment to
- restrictions
Deployment
Restrictions Args - Deployment restrictions. See Restrictions below.
- stage str
- The stage (Test, Staging, Production)
- uuid str
- (Computed) The UUID identifying the deployment.
- deployment
Id String - name String
- The name of the deployment environment
- repository String
- The repository ID to which you want to assign this deployment environment to
- restrictions Property Map
- Deployment restrictions. See Restrictions below.
- stage String
- The stage (Test, Staging, Production)
- uuid String
- (Computed) The UUID identifying the deployment.
Supporting Types
DeploymentRestrictions, DeploymentRestrictionsArgs
- Admin
Only bool - Only Admins can deploy this deployment stage.
- Admin
Only bool - Only Admins can deploy this deployment stage.
- admin
Only Boolean - Only Admins can deploy this deployment stage.
- admin
Only boolean - Only Admins can deploy this deployment stage.
- admin_
only bool - Only Admins can deploy this deployment stage.
- admin
Only Boolean - Only Admins can deploy this deployment stage.
Import
Deployments can be imported using their repository/uuid
ID, e.g.
$ pulumi import bitbucket:index/deployment:Deployment example repository/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.