bitbucket.DeploymentVariable
Explore with Pulumi AI
This resource allows you to configure deployment variables.
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",
});
const country = new bitbucket.DeploymentVariable("country", {
deployment: test.deploymentId,
key: "COUNTRY",
value: "Kenya",
secured: false,
});
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")
country = bitbucket.DeploymentVariable("country",
deployment=test.deployment_id,
key="COUNTRY",
value="Kenya",
secured=False)
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
}
test, err := bitbucket.NewDeployment(ctx, "test", &bitbucket.DeploymentArgs{
Repository: monorepo.RepositoryId,
Stage: pulumi.String("Test"),
})
if err != nil {
return err
}
_, err = bitbucket.NewDeploymentVariable(ctx, "country", &bitbucket.DeploymentVariableArgs{
Deployment: test.DeploymentId,
Key: pulumi.String("COUNTRY"),
Value: pulumi.String("Kenya"),
Secured: pulumi.Bool(false),
})
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",
});
var country = new Bitbucket.DeploymentVariable("country", new()
{
Deployment = test.DeploymentId,
Key = "COUNTRY",
Value = "Kenya",
Secured = false,
});
});
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 com.pulumi.bitbucket.DeploymentVariable;
import com.pulumi.bitbucket.DeploymentVariableArgs;
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());
var country = new DeploymentVariable("country", DeploymentVariableArgs.builder()
.deployment(test.deploymentId())
.key("COUNTRY")
.value("Kenya")
.secured(false)
.build());
}
}
resources:
monorepo:
type: bitbucket:Repository
properties:
owner: gob
pipelinesEnabled: true
test:
type: bitbucket:Deployment
properties:
repository: ${monorepo.repositoryId}
stage: Test
country:
type: bitbucket:DeploymentVariable
properties:
deployment: ${test.deploymentId}
key: COUNTRY
value: Kenya
secured: false
Create DeploymentVariable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DeploymentVariable(name: string, args: DeploymentVariableArgs, opts?: CustomResourceOptions);
@overload
def DeploymentVariable(resource_name: str,
args: DeploymentVariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DeploymentVariable(resource_name: str,
opts: Optional[ResourceOptions] = None,
deployment: Optional[str] = None,
key: Optional[str] = None,
value: Optional[str] = None,
deployment_variable_id: Optional[str] = None,
secured: Optional[bool] = None)
func NewDeploymentVariable(ctx *Context, name string, args DeploymentVariableArgs, opts ...ResourceOption) (*DeploymentVariable, error)
public DeploymentVariable(string name, DeploymentVariableArgs args, CustomResourceOptions? opts = null)
public DeploymentVariable(String name, DeploymentVariableArgs args)
public DeploymentVariable(String name, DeploymentVariableArgs args, CustomResourceOptions options)
type: bitbucket:DeploymentVariable
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 DeploymentVariableArgs
- 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 DeploymentVariableArgs
- 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 DeploymentVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeploymentVariableArgs
- 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 deploymentVariableResource = new Bitbucket.DeploymentVariable("deploymentVariableResource", new()
{
Deployment = "string",
Key = "string",
Value = "string",
DeploymentVariableId = "string",
Secured = false,
});
example, err := bitbucket.NewDeploymentVariable(ctx, "deploymentVariableResource", &bitbucket.DeploymentVariableArgs{
Deployment: pulumi.String("string"),
Key: pulumi.String("string"),
Value: pulumi.String("string"),
DeploymentVariableId: pulumi.String("string"),
Secured: pulumi.Bool(false),
})
var deploymentVariableResource = new DeploymentVariable("deploymentVariableResource", DeploymentVariableArgs.builder()
.deployment("string")
.key("string")
.value("string")
.deploymentVariableId("string")
.secured(false)
.build());
deployment_variable_resource = bitbucket.DeploymentVariable("deploymentVariableResource",
deployment="string",
key="string",
value="string",
deployment_variable_id="string",
secured=False)
const deploymentVariableResource = new bitbucket.DeploymentVariable("deploymentVariableResource", {
deployment: "string",
key: "string",
value: "string",
deploymentVariableId: "string",
secured: false,
});
type: bitbucket:DeploymentVariable
properties:
deployment: string
deploymentVariableId: string
key: string
secured: false
value: string
DeploymentVariable 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 DeploymentVariable resource accepts the following input properties:
- Deployment string
- The deployment ID you want to assign this variable to.
- Key string
- The unique name of the variable.
- Value string
- The value of the variable.
- Deployment
Variable stringId - Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- Deployment string
- The deployment ID you want to assign this variable to.
- Key string
- The unique name of the variable.
- Value string
- The value of the variable.
- Deployment
Variable stringId - Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- deployment String
- The deployment ID you want to assign this variable to.
- key String
- The unique name of the variable.
- value String
- The value of the variable.
- deployment
Variable StringId - secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- deployment string
- The deployment ID you want to assign this variable to.
- key string
- The unique name of the variable.
- value string
- The value of the variable.
- deployment
Variable stringId - secured boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- deployment str
- The deployment ID you want to assign this variable to.
- key str
- The unique name of the variable.
- value str
- The value of the variable.
- deployment_
variable_ strid - secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- deployment String
- The deployment ID you want to assign this variable to.
- key String
- The unique name of the variable.
- value String
- The value of the variable.
- deployment
Variable StringId - secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
Outputs
All input properties are implicitly available as output properties. Additionally, the DeploymentVariable resource produces the following output properties:
Look up Existing DeploymentVariable Resource
Get an existing DeploymentVariable 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?: DeploymentVariableState, opts?: CustomResourceOptions): DeploymentVariable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
deployment: Optional[str] = None,
deployment_variable_id: Optional[str] = None,
key: Optional[str] = None,
secured: Optional[bool] = None,
uuid: Optional[str] = None,
value: Optional[str] = None) -> DeploymentVariable
func GetDeploymentVariable(ctx *Context, name string, id IDInput, state *DeploymentVariableState, opts ...ResourceOption) (*DeploymentVariable, error)
public static DeploymentVariable Get(string name, Input<string> id, DeploymentVariableState? state, CustomResourceOptions? opts = null)
public static DeploymentVariable get(String name, Output<String> id, DeploymentVariableState state, CustomResourceOptions options)
resources: _: type: bitbucket:DeploymentVariable 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 string
- The deployment ID you want to assign this variable to.
- Deployment
Variable stringId - Key string
- The unique name of the variable.
- Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- Uuid string
- (Computed) The UUID identifying the variable.
- Value string
- The value of the variable.
- Deployment string
- The deployment ID you want to assign this variable to.
- Deployment
Variable stringId - Key string
- The unique name of the variable.
- Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- Uuid string
- (Computed) The UUID identifying the variable.
- Value string
- The value of the variable.
- deployment String
- The deployment ID you want to assign this variable to.
- deployment
Variable StringId - key String
- The unique name of the variable.
- secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- uuid String
- (Computed) The UUID identifying the variable.
- value String
- The value of the variable.
- deployment string
- The deployment ID you want to assign this variable to.
- deployment
Variable stringId - key string
- The unique name of the variable.
- secured boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- uuid string
- (Computed) The UUID identifying the variable.
- value string
- The value of the variable.
- deployment str
- The deployment ID you want to assign this variable to.
- deployment_
variable_ strid - key str
- The unique name of the variable.
- secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- uuid str
- (Computed) The UUID identifying the variable.
- value str
- The value of the variable.
- deployment String
- The deployment ID you want to assign this variable to.
- deployment
Variable StringId - key String
- The unique name of the variable.
- secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- uuid String
- (Computed) The UUID identifying the variable.
- value String
- The value of the variable.
Import
Deployment Variables can be imported using their deployment-id/uuid
ID, e.g.
$ pulumi import bitbucket:index/deploymentVariable:DeploymentVariable example deployment-id/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.