@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
159 lines (158 loc) • 5.25 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages variable group variables within a variable group.
*
* > **Note** Variable group variables can also be managed inlined in the `variable` blocks in `azuredevops.VariableGroup`.
*
* ## Example Usage
*
* ### Basic usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {
* name: "Example Project",
* workItemTemplate: "Agile",
* versionControl: "Git",
* visibility: "private",
* description: "Managed by Pulumi",
* });
* const exampleVariableGroup = new azuredevops.VariableGroup("example", {
* projectId: example.id,
* name: "Example Variable Group",
* description: "Example Variable Group Description",
* allowAccess: true,
* variables: [{
* name: "key1",
* value: "val1",
* }],
* });
* const exampleVariableGroupVariable = new azuredevops.VariableGroupVariable("example", {
* projectId: example.id,
* variableGroupId: exampleVariableGroup.id,
* name: "key2",
* value: "val2",
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Variable Groups](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/variablegroups?view=azure-devops-rest-7.0)
*
* ## PAT Permissions Required
*
* - **Variable Groups**: Read, Create, & Manage
*
* ## Import
*
* **Secret variable cannot be imported.**
*
* Azure DevOps Variable group variables can be imported using the `project ID/variable group ID/variable name`, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/variableGroupVariable:VariableGroupVariable example 00000000-0000-0000-0000-000000000000/0/key1
* ```
*/
export declare class VariableGroupVariable extends pulumi.CustomResource {
/**
* Get an existing VariableGroupVariable resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VariableGroupVariableState, opts?: pulumi.CustomResourceOptions): VariableGroupVariable;
/**
* Returns true if the given object is an instance of VariableGroupVariable. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is VariableGroupVariable;
/**
* The name of the variable. Must be unique within the Variable Group.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project.
*/
readonly projectId: pulumi.Output<string>;
/**
* The value of the secret variable.
*
* > **NOTE** Exactly one of `value` and `secretValue` must be specified.
*/
readonly secretValue: pulumi.Output<string | undefined>;
/**
* The value of the variable.
*/
readonly value: pulumi.Output<string | undefined>;
/**
* The ID of the variable group.
*/
readonly variableGroupId: pulumi.Output<string>;
/**
* Create a VariableGroupVariable resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VariableGroupVariableArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VariableGroupVariable resources.
*/
export interface VariableGroupVariableState {
/**
* The name of the variable. Must be unique within the Variable Group.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project.
*/
projectId?: pulumi.Input<string>;
/**
* The value of the secret variable.
*
* > **NOTE** Exactly one of `value` and `secretValue` must be specified.
*/
secretValue?: pulumi.Input<string>;
/**
* The value of the variable.
*/
value?: pulumi.Input<string>;
/**
* The ID of the variable group.
*/
variableGroupId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a VariableGroupVariable resource.
*/
export interface VariableGroupVariableArgs {
/**
* The name of the variable. Must be unique within the Variable Group.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project.
*/
projectId: pulumi.Input<string>;
/**
* The value of the secret variable.
*
* > **NOTE** Exactly one of `value` and `secretValue` must be specified.
*/
secretValue?: pulumi.Input<string>;
/**
* The value of the variable.
*/
value?: pulumi.Input<string>;
/**
* The ID of the variable group.
*/
variableGroupId: pulumi.Input<string>;
}