bitbucket.WorkspaceVariable
Explore with Pulumi AI
This resource allows you to configure workspace variables.
OAuth2 Scopes: none
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const country = new bitbucket.WorkspaceVariable("country", {
workspace: bitbucket_workspace.test.id,
key: "COUNTRY",
value: "Kenya",
secured: false,
});
import pulumi
import pulumi_bitbucket as bitbucket
country = bitbucket.WorkspaceVariable("country",
workspace=bitbucket_workspace["test"]["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 {
_, err := bitbucket.NewWorkspaceVariable(ctx, "country", &bitbucket.WorkspaceVariableArgs{
Workspace: pulumi.Any(bitbucket_workspace.Test.Id),
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 country = new Bitbucket.WorkspaceVariable("country", new()
{
Workspace = bitbucket_workspace.Test.Id,
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.WorkspaceVariable;
import com.pulumi.bitbucket.WorkspaceVariableArgs;
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 country = new WorkspaceVariable("country", WorkspaceVariableArgs.builder()
.workspace(bitbucket_workspace.test().id())
.key("COUNTRY")
.value("Kenya")
.secured(false)
.build());
}
}
resources:
country:
type: bitbucket:WorkspaceVariable
properties:
workspace: ${bitbucket_workspace.test.id}
key: COUNTRY
value: Kenya
secured: false
Create WorkspaceVariable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceVariable(name: string, args: WorkspaceVariableArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceVariable(resource_name: str,
args: WorkspaceVariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceVariable(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
value: Optional[str] = None,
workspace: Optional[str] = None,
secured: Optional[bool] = None,
workspace_variable_id: Optional[str] = None)
func NewWorkspaceVariable(ctx *Context, name string, args WorkspaceVariableArgs, opts ...ResourceOption) (*WorkspaceVariable, error)
public WorkspaceVariable(string name, WorkspaceVariableArgs args, CustomResourceOptions? opts = null)
public WorkspaceVariable(String name, WorkspaceVariableArgs args)
public WorkspaceVariable(String name, WorkspaceVariableArgs args, CustomResourceOptions options)
type: bitbucket:WorkspaceVariable
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 WorkspaceVariableArgs
- 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 WorkspaceVariableArgs
- 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 WorkspaceVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceVariableArgs
- 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 workspaceVariableResource = new Bitbucket.WorkspaceVariable("workspaceVariableResource", new()
{
Key = "string",
Value = "string",
Workspace = "string",
Secured = false,
WorkspaceVariableId = "string",
});
example, err := bitbucket.NewWorkspaceVariable(ctx, "workspaceVariableResource", &bitbucket.WorkspaceVariableArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
Workspace: pulumi.String("string"),
Secured: pulumi.Bool(false),
WorkspaceVariableId: pulumi.String("string"),
})
var workspaceVariableResource = new WorkspaceVariable("workspaceVariableResource", WorkspaceVariableArgs.builder()
.key("string")
.value("string")
.workspace("string")
.secured(false)
.workspaceVariableId("string")
.build());
workspace_variable_resource = bitbucket.WorkspaceVariable("workspaceVariableResource",
key="string",
value="string",
workspace="string",
secured=False,
workspace_variable_id="string")
const workspaceVariableResource = new bitbucket.WorkspaceVariable("workspaceVariableResource", {
key: "string",
value: "string",
workspace: "string",
secured: false,
workspaceVariableId: "string",
});
type: bitbucket:WorkspaceVariable
properties:
key: string
secured: false
value: string
workspace: string
workspaceVariableId: string
WorkspaceVariable 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 WorkspaceVariable resource accepts the following input properties:
- Key string
- The unique name of the variable.
- Value string
- The value of the variable.
- Workspace string
- The workspace ID you want to assign this variable to.
- Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- Workspace
Variable stringId
- Key string
- The unique name of the variable.
- Value string
- The value of the variable.
- Workspace string
- The workspace ID you want to assign this variable to.
- Secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- Workspace
Variable stringId
- key String
- The unique name of the variable.
- value String
- The value of the variable.
- workspace String
- The workspace ID you want to assign this variable to.
- secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- workspace
Variable StringId
- key string
- The unique name of the variable.
- value string
- The value of the variable.
- workspace string
- The workspace ID you want to assign this variable to.
- secured boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- workspace
Variable stringId
- key str
- The unique name of the variable.
- value str
- The value of the variable.
- workspace str
- The workspace ID you want to assign this variable to.
- secured bool
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- workspace_
variable_ strid
- key String
- The unique name of the variable.
- value String
- The value of the variable.
- workspace String
- The workspace ID you want to assign this variable to.
- secured Boolean
- If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
- workspace
Variable StringId
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceVariable resource produces the following output properties:
Look up Existing WorkspaceVariable Resource
Get an existing WorkspaceVariable 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?: WorkspaceVariableState, opts?: CustomResourceOptions): WorkspaceVariable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
secured: Optional[bool] = None,
uuid: Optional[str] = None,
value: Optional[str] = None,
workspace: Optional[str] = None,
workspace_variable_id: Optional[str] = None) -> WorkspaceVariable
func GetWorkspaceVariable(ctx *Context, name string, id IDInput, state *WorkspaceVariableState, opts ...ResourceOption) (*WorkspaceVariable, error)
public static WorkspaceVariable Get(string name, Input<string> id, WorkspaceVariableState? state, CustomResourceOptions? opts = null)
public static WorkspaceVariable get(String name, Output<String> id, WorkspaceVariableState state, CustomResourceOptions options)
resources: _: type: bitbucket:WorkspaceVariable 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.
- 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.
- Workspace string
- The workspace ID you want to assign this variable to.
- Workspace
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.
- Workspace string
- The workspace ID you want to assign this variable to.
- Workspace
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.
- workspace String
- The workspace ID you want to assign this variable to.
- workspace
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.
- workspace string
- The workspace ID you want to assign this variable to.
- workspace
Variable stringId
- 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.
- workspace str
- The workspace ID you want to assign this variable to.
- workspace_
variable_ strid
- 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.
- workspace String
- The workspace ID you want to assign this variable to.
- workspace
Variable StringId
Import
Workspace Variables can be imported using their workspace-id/uuid
ID, e.g.
$ pulumi import bitbucket:index/workspaceVariable:WorkspaceVariable example workspace-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.