Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi
azuredevops.getVariableGroup
Explore with Pulumi AI
Use this data source to access information about existing Variable Groups within Azure DevOps.
Note: Secret values are masked by service and cannot be obtained through API. Set secret variables
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = azuredevops.getProject({
name: "Example Project",
});
const exampleGetVariableGroup = example.then(example => azuredevops.getVariableGroup({
projectId: example.id,
name: "Example Variable Group",
}));
export const id = exampleGetVariableGroup.then(exampleGetVariableGroup => exampleGetVariableGroup.id);
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.get_project(name="Example Project")
example_get_variable_group = azuredevops.get_variable_group(project_id=example.id,
name="Example Variable Group")
pulumi.export("id", example_get_variable_group.id)
package main
import (
"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := azuredevops.LookupProject(ctx, &azuredevops.LookupProjectArgs{
Name: pulumi.StringRef("Example Project"),
}, nil)
if err != nil {
return err
}
exampleGetVariableGroup, err := azuredevops.LookupVariableGroup(ctx, &azuredevops.LookupVariableGroupArgs{
ProjectId: example.Id,
Name: "Example Variable Group",
}, nil)
if err != nil {
return err
}
ctx.Export("id", exampleGetVariableGroup.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var example = AzureDevOps.GetProject.Invoke(new()
{
Name = "Example Project",
});
var exampleGetVariableGroup = AzureDevOps.GetVariableGroup.Invoke(new()
{
ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
Name = "Example Variable Group",
});
return new Dictionary<string, object?>
{
["id"] = exampleGetVariableGroup.Apply(getVariableGroupResult => getVariableGroupResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetProjectArgs;
import com.pulumi.azuredevops.inputs.GetVariableGroupArgs;
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) {
final var example = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
.name("Example Project")
.build());
final var exampleGetVariableGroup = AzuredevopsFunctions.getVariableGroup(GetVariableGroupArgs.builder()
.projectId(example.applyValue(getProjectResult -> getProjectResult.id()))
.name("Example Variable Group")
.build());
ctx.export("id", exampleGetVariableGroup.applyValue(getVariableGroupResult -> getVariableGroupResult.id()));
}
}
variables:
example:
fn::invoke:
Function: azuredevops:getProject
Arguments:
name: Example Project
exampleGetVariableGroup:
fn::invoke:
Function: azuredevops:getVariableGroup
Arguments:
projectId: ${example.id}
name: Example Variable Group
outputs:
id: ${exampleGetVariableGroup.id}
Relevant Links
Using getVariableGroup
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVariableGroup(args: GetVariableGroupArgs, opts?: InvokeOptions): Promise<GetVariableGroupResult>
function getVariableGroupOutput(args: GetVariableGroupOutputArgs, opts?: InvokeOptions): Output<GetVariableGroupResult>
def get_variable_group(name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVariableGroupResult
def get_variable_group_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVariableGroupResult]
func LookupVariableGroup(ctx *Context, args *LookupVariableGroupArgs, opts ...InvokeOption) (*LookupVariableGroupResult, error)
func LookupVariableGroupOutput(ctx *Context, args *LookupVariableGroupOutputArgs, opts ...InvokeOption) LookupVariableGroupResultOutput
> Note: This function is named LookupVariableGroup
in the Go SDK.
public static class GetVariableGroup
{
public static Task<GetVariableGroupResult> InvokeAsync(GetVariableGroupArgs args, InvokeOptions? opts = null)
public static Output<GetVariableGroupResult> Invoke(GetVariableGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVariableGroupResult> getVariableGroup(GetVariableGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azuredevops:index/getVariableGroup:getVariableGroup
arguments:
# arguments dictionary
The following arguments are supported:
- name str
- The name of the Variable Group to retrieve.
- project_
id str - The project ID.
getVariableGroup Result
The following output properties are available:
- Allow
Access bool - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- Description string
- The description of the Variable Group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vaults List<Pulumi.Azure Dev Ops. Outputs. Get Variable Group Key Vault> - A list of
key_vault
blocks as documented below. - Name string
- The name of the Azure key vault to link secrets from as variables.
- Project
Id string - Variables
List<Pulumi.
Azure Dev Ops. Outputs. Get Variable Group Variable> - One or more
variable
blocks as documented below.
- Allow
Access bool - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- Description string
- The description of the Variable Group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Vaults []GetVariable Group Key Vault - A list of
key_vault
blocks as documented below. - Name string
- The name of the Azure key vault to link secrets from as variables.
- Project
Id string - Variables
[]Get
Variable Group Variable - One or more
variable
blocks as documented below.
- allow
Access Boolean - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- description String
- The description of the Variable Group.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vaults List<GetVariable Group Key Vault> - A list of
key_vault
blocks as documented below. - name String
- The name of the Azure key vault to link secrets from as variables.
- project
Id String - variables
List<Get
Variable Group Variable> - One or more
variable
blocks as documented below.
- allow
Access boolean - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- description string
- The description of the Variable Group.
- id string
- The provider-assigned unique ID for this managed resource.
- key
Vaults GetVariable Group Key Vault[] - A list of
key_vault
blocks as documented below. - name string
- The name of the Azure key vault to link secrets from as variables.
- project
Id string - variables
Get
Variable Group Variable[] - One or more
variable
blocks as documented below.
- allow_
access bool - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- description str
- The description of the Variable Group.
- id str
- The provider-assigned unique ID for this managed resource.
- key_
vaults Sequence[GetVariable Group Key Vault] - A list of
key_vault
blocks as documented below. - name str
- The name of the Azure key vault to link secrets from as variables.
- project_
id str - variables
Sequence[Get
Variable Group Variable] - One or more
variable
blocks as documented below.
- allow
Access Boolean - Boolean that indicate if this Variable Group is shared by all pipelines of this project.
- description String
- The description of the Variable Group.
- id String
- The provider-assigned unique ID for this managed resource.
- key
Vaults List<Property Map> - A list of
key_vault
blocks as documented below. - name String
- The name of the Azure key vault to link secrets from as variables.
- project
Id String - variables List<Property Map>
- One or more
variable
blocks as documented below.
Supporting Types
GetVariableGroupKeyVault
- Name string
- The name of the Variable Group to retrieve.
- Service
Endpoint stringId - The id of the Azure subscription endpoint to access the key vault.
- Name string
- The name of the Variable Group to retrieve.
- Service
Endpoint stringId - The id of the Azure subscription endpoint to access the key vault.
- name String
- The name of the Variable Group to retrieve.
- service
Endpoint StringId - The id of the Azure subscription endpoint to access the key vault.
- name string
- The name of the Variable Group to retrieve.
- service
Endpoint stringId - The id of the Azure subscription endpoint to access the key vault.
- name str
- The name of the Variable Group to retrieve.
- service_
endpoint_ strid - The id of the Azure subscription endpoint to access the key vault.
- name String
- The name of the Variable Group to retrieve.
- service
Endpoint StringId - The id of the Azure subscription endpoint to access the key vault.
GetVariableGroupVariable
- Content
Type string - Enabled bool
- Expires string
- Is
Secret bool - A boolean flag describing if the variable value is sensitive.
- Name string
- The name of the Variable Group to retrieve.
- Secret
Value string - The secret value of the variable.
- Value string
- The value of the variable.
- Content
Type string - Enabled bool
- Expires string
- Is
Secret bool - A boolean flag describing if the variable value is sensitive.
- Name string
- The name of the Variable Group to retrieve.
- Secret
Value string - The secret value of the variable.
- Value string
- The value of the variable.
- content
Type String - enabled Boolean
- expires String
- is
Secret Boolean - A boolean flag describing if the variable value is sensitive.
- name String
- The name of the Variable Group to retrieve.
- secret
Value String - The secret value of the variable.
- value String
- The value of the variable.
- content
Type string - enabled boolean
- expires string
- is
Secret boolean - A boolean flag describing if the variable value is sensitive.
- name string
- The name of the Variable Group to retrieve.
- secret
Value string - The secret value of the variable.
- value string
- The value of the variable.
- content_
type str - enabled bool
- expires str
- is_
secret bool - A boolean flag describing if the variable value is sensitive.
- name str
- The name of the Variable Group to retrieve.
- secret_
value str - The secret value of the variable.
- value str
- The value of the variable.
- content
Type String - enabled Boolean
- expires String
- is
Secret Boolean - A boolean flag describing if the variable value is sensitive.
- name String
- The name of the Variable Group to retrieve.
- secret
Value String - The secret value of the variable.
- value String
- The value of the variable.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevops
Terraform Provider.