bitbucket.RepositoryVariable
Explore with Pulumi AI
This resource allows you to setup pipelines variables to manage your builds with. Once you have enabled pipelines on your repository you can then further setup variables here to use.
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 debug = new bitbucket.RepositoryVariable("debug", {
key: "DEBUG",
value: "true",
repository: monorepo.repositoryId,
secured: false,
});
import pulumi
import pulumi_bitbucket as bitbucket
monorepo = bitbucket.Repository("monorepo",
owner="gob",
pipelines_enabled=True)
debug = bitbucket.RepositoryVariable("debug",
key="DEBUG",
value="true",
repository=monorepo.repository_id,
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
}
_, err = bitbucket.NewRepositoryVariable(ctx, "debug", &bitbucket.RepositoryVariableArgs{
Key: pulumi.String("DEBUG"),
Value: pulumi.String("true"),
Repository: monorepo.RepositoryId,
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 debug = new Bitbucket.RepositoryVariable("debug", new()
{
Key = "DEBUG",
Value = "true",
Repository = monorepo.RepositoryId,
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.RepositoryVariable;
import com.pulumi.bitbucket.RepositoryVariableArgs;
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 debug = new RepositoryVariable("debug", RepositoryVariableArgs.builder()
.key("DEBUG")
.value("true")
.repository(monorepo.repositoryId())
.secured(false)
.build());
}
}
resources:
monorepo:
type: bitbucket:Repository
properties:
owner: gob
pipelinesEnabled: true
debug:
type: bitbucket:RepositoryVariable
properties:
key: DEBUG
value: 'true'
repository: ${monorepo.repositoryId}
secured: false
Create RepositoryVariable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryVariable(name: string, args: RepositoryVariableArgs, opts?: CustomResourceOptions);
@overload
def RepositoryVariable(resource_name: str,
args: RepositoryVariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryVariable(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
repository: Optional[str] = None,
value: Optional[str] = None,
repository_variable_id: Optional[str] = None,
secured: Optional[bool] = None)
func NewRepositoryVariable(ctx *Context, name string, args RepositoryVariableArgs, opts ...ResourceOption) (*RepositoryVariable, error)
public RepositoryVariable(string name, RepositoryVariableArgs args, CustomResourceOptions? opts = null)
public RepositoryVariable(String name, RepositoryVariableArgs args)
public RepositoryVariable(String name, RepositoryVariableArgs args, CustomResourceOptions options)
type: bitbucket:RepositoryVariable
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 RepositoryVariableArgs
- 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 RepositoryVariableArgs
- 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 RepositoryVariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryVariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryVariableArgs
- 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 repositoryVariableResource = new Bitbucket.RepositoryVariable("repositoryVariableResource", new()
{
Key = "string",
Repository = "string",
Value = "string",
RepositoryVariableId = "string",
Secured = false,
});
example, err := bitbucket.NewRepositoryVariable(ctx, "repositoryVariableResource", &bitbucket.RepositoryVariableArgs{
Key: pulumi.String("string"),
Repository: pulumi.String("string"),
Value: pulumi.String("string"),
RepositoryVariableId: pulumi.String("string"),
Secured: pulumi.Bool(false),
})
var repositoryVariableResource = new RepositoryVariable("repositoryVariableResource", RepositoryVariableArgs.builder()
.key("string")
.repository("string")
.value("string")
.repositoryVariableId("string")
.secured(false)
.build());
repository_variable_resource = bitbucket.RepositoryVariable("repositoryVariableResource",
key="string",
repository="string",
value="string",
repository_variable_id="string",
secured=False)
const repositoryVariableResource = new bitbucket.RepositoryVariable("repositoryVariableResource", {
key: "string",
repository: "string",
value: "string",
repositoryVariableId: "string",
secured: false,
});
type: bitbucket:RepositoryVariable
properties:
key: string
repository: string
repositoryVariableId: string
secured: false
value: string
RepositoryVariable 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 RepositoryVariable resource accepts the following input properties:
- Key string
- The key of the key value pair
- Repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- Value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - Repository
Variable stringId - Secured bool
- If you want to make this viewable in the UI.
- Key string
- The key of the key value pair
- Repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- Value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - Repository
Variable stringId - Secured bool
- If you want to make this viewable in the UI.
- key String
- The key of the key value pair
- repository String
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- value String
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - repository
Variable StringId - secured Boolean
- If you want to make this viewable in the UI.
- key string
- The key of the key value pair
- repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - repository
Variable stringId - secured boolean
- If you want to make this viewable in the UI.
- key str
- The key of the key value pair
- repository str
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- value str
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - repository_
variable_ strid - secured bool
- If you want to make this viewable in the UI.
- key String
- The key of the key value pair
- repository String
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- value String
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - repository
Variable StringId - secured Boolean
- If you want to make this viewable in the UI.
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryVariable resource produces the following output properties:
Look up Existing RepositoryVariable Resource
Get an existing RepositoryVariable 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?: RepositoryVariableState, opts?: CustomResourceOptions): RepositoryVariable
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
repository: Optional[str] = None,
repository_variable_id: Optional[str] = None,
secured: Optional[bool] = None,
uuid: Optional[str] = None,
value: Optional[str] = None,
workspace: Optional[str] = None) -> RepositoryVariable
func GetRepositoryVariable(ctx *Context, name string, id IDInput, state *RepositoryVariableState, opts ...ResourceOption) (*RepositoryVariable, error)
public static RepositoryVariable Get(string name, Input<string> id, RepositoryVariableState? state, CustomResourceOptions? opts = null)
public static RepositoryVariable get(String name, Output<String> id, RepositoryVariableState state, CustomResourceOptions options)
resources: _: type: bitbucket:RepositoryVariable 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 key of the key value pair
- Repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- Repository
Variable stringId - Secured bool
- If you want to make this viewable in the UI.
- Uuid string
- (Computed) The UUID identifying the variable.
- Value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - Workspace string
- (Computed) The workspace the variable is created in.
- Key string
- The key of the key value pair
- Repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- Repository
Variable stringId - Secured bool
- If you want to make this viewable in the UI.
- Uuid string
- (Computed) The UUID identifying the variable.
- Value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - Workspace string
- (Computed) The workspace the variable is created in.
- key String
- The key of the key value pair
- repository String
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- repository
Variable StringId - secured Boolean
- If you want to make this viewable in the UI.
- uuid String
- (Computed) The UUID identifying the variable.
- value String
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - workspace String
- (Computed) The workspace the variable is created in.
- key string
- The key of the key value pair
- repository string
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- repository
Variable stringId - secured boolean
- If you want to make this viewable in the UI.
- uuid string
- (Computed) The UUID identifying the variable.
- value string
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - workspace string
- (Computed) The workspace the variable is created in.
- key str
- The key of the key value pair
- repository str
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- repository_
variable_ strid - secured bool
- If you want to make this viewable in the UI.
- uuid str
- (Computed) The UUID identifying the variable.
- value str
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - workspace str
- (Computed) The workspace the variable is created in.
- key String
- The key of the key value pair
- repository String
- The repository ID you want to put this variable onto. (of form workspace-id/repository-id)
- repository
Variable StringId - secured Boolean
- If you want to make this viewable in the UI.
- uuid String
- (Computed) The UUID identifying the variable.
- value String
- The value of the key. This will not be returned if
secured
is set to true from API and wont be drift detected by provider. - workspace String
- (Computed) The workspace the variable is created in.
Import
Repository Variables can be imported using their workspace/repository/key/uuid
ID, e.g.
$ pulumi import bitbucket:index/repositoryVariable:RepositoryVariable example workspace/repository/key/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.