1. Packages
  2. AzureDevOps
  3. API Docs
  4. VariableGroup
Azure DevOps v3.1.1 published on Monday, May 20, 2024 by Pulumi

azuredevops.VariableGroup

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.1.1 published on Monday, May 20, 2024 by Pulumi

    Example Usage

    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 Terraform",
    });
    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",
            },
            {
                name: "key2",
                secretValue: "val2",
                isSecret: true,
            },
        ],
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        name="Example Project",
        work_item_template="Agile",
        version_control="Git",
        visibility="private",
        description="Managed by Terraform")
    example_variable_group = azuredevops.VariableGroup("example",
        project_id=example.id,
        name="Example Variable Group",
        description="Example Variable Group Description",
        allow_access=True,
        variables=[
            azuredevops.VariableGroupVariableArgs(
                name="key1",
                value="val1",
            ),
            azuredevops.VariableGroupVariableArgs(
                name="key2",
                secret_value="val2",
                is_secret=True,
            ),
        ])
    
    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.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name:             pulumi.String("Example Project"),
    			WorkItemTemplate: pulumi.String("Agile"),
    			VersionControl:   pulumi.String("Git"),
    			Visibility:       pulumi.String("private"),
    			Description:      pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewVariableGroup(ctx, "example", &azuredevops.VariableGroupArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("Example Variable Group"),
    			Description: pulumi.String("Example Variable Group Description"),
    			AllowAccess: pulumi.Bool(true),
    			Variables: azuredevops.VariableGroupVariableArray{
    				&azuredevops.VariableGroupVariableArgs{
    					Name:  pulumi.String("key1"),
    					Value: pulumi.String("val1"),
    				},
    				&azuredevops.VariableGroupVariableArgs{
    					Name:        pulumi.String("key2"),
    					SecretValue: pulumi.String("val2"),
    					IsSecret:    pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
            WorkItemTemplate = "Agile",
            VersionControl = "Git",
            Visibility = "private",
            Description = "Managed by Terraform",
        });
    
        var exampleVariableGroup = new AzureDevOps.VariableGroup("example", new()
        {
            ProjectId = example.Id,
            Name = "Example Variable Group",
            Description = "Example Variable Group Description",
            AllowAccess = true,
            Variables = new[]
            {
                new AzureDevOps.Inputs.VariableGroupVariableArgs
                {
                    Name = "key1",
                    Value = "val1",
                },
                new AzureDevOps.Inputs.VariableGroupVariableArgs
                {
                    Name = "key2",
                    SecretValue = "val2",
                    IsSecret = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.VariableGroup;
    import com.pulumi.azuredevops.VariableGroupArgs;
    import com.pulumi.azuredevops.inputs.VariableGroupVariableArgs;
    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 example = new Project("example", ProjectArgs.builder()        
                .name("Example Project")
                .workItemTemplate("Agile")
                .versionControl("Git")
                .visibility("private")
                .description("Managed by Terraform")
                .build());
    
            var exampleVariableGroup = new VariableGroup("exampleVariableGroup", VariableGroupArgs.builder()        
                .projectId(example.id())
                .name("Example Variable Group")
                .description("Example Variable Group Description")
                .allowAccess(true)
                .variables(            
                    VariableGroupVariableArgs.builder()
                        .name("key1")
                        .value("val1")
                        .build(),
                    VariableGroupVariableArgs.builder()
                        .name("key2")
                        .secretValue("val2")
                        .isSecret(true)
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
          workItemTemplate: Agile
          versionControl: Git
          visibility: private
          description: Managed by Terraform
      exampleVariableGroup:
        type: azuredevops:VariableGroup
        name: example
        properties:
          projectId: ${example.id}
          name: Example Variable Group
          description: Example Variable Group Description
          allowAccess: true
          variables:
            - name: key1
              value: val1
            - name: key2
              secretValue: val2
              isSecret: true
    

    With AzureRM Key Vault

    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 Terraform",
    });
    const exampleServiceEndpointAzureRM = new azuredevops.ServiceEndpointAzureRM("example", {
        projectId: example.id,
        serviceEndpointName: "Example AzureRM",
        description: "Managed by Terraform",
        credentials: {
            serviceprincipalid: "00000000-0000-0000-0000-000000000000",
            serviceprincipalkey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        },
        azurermSpnTenantid: "00000000-0000-0000-0000-000000000000",
        azurermSubscriptionId: "00000000-0000-0000-0000-000000000000",
        azurermSubscriptionName: "Example Subscription Name",
    });
    const exampleVariableGroup = new azuredevops.VariableGroup("example", {
        projectId: example.id,
        name: "Example Variable Group",
        description: "Example Variable Group Description",
        allowAccess: true,
        keyVault: {
            name: "example-kv",
            serviceEndpointId: exampleServiceEndpointAzureRM.id,
        },
        variables: [
            {
                name: "key1",
            },
            {
                name: "key2",
            },
        ],
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        name="Example Project",
        work_item_template="Agile",
        version_control="Git",
        visibility="private",
        description="Managed by Terraform")
    example_service_endpoint_azure_rm = azuredevops.ServiceEndpointAzureRM("example",
        project_id=example.id,
        service_endpoint_name="Example AzureRM",
        description="Managed by Terraform",
        credentials=azuredevops.ServiceEndpointAzureRMCredentialsArgs(
            serviceprincipalid="00000000-0000-0000-0000-000000000000",
            serviceprincipalkey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        ),
        azurerm_spn_tenantid="00000000-0000-0000-0000-000000000000",
        azurerm_subscription_id="00000000-0000-0000-0000-000000000000",
        azurerm_subscription_name="Example Subscription Name")
    example_variable_group = azuredevops.VariableGroup("example",
        project_id=example.id,
        name="Example Variable Group",
        description="Example Variable Group Description",
        allow_access=True,
        key_vault=azuredevops.VariableGroupKeyVaultArgs(
            name="example-kv",
            service_endpoint_id=example_service_endpoint_azure_rm.id,
        ),
        variables=[
            azuredevops.VariableGroupVariableArgs(
                name="key1",
            ),
            azuredevops.VariableGroupVariableArgs(
                name="key2",
            ),
        ])
    
    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.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name:             pulumi.String("Example Project"),
    			WorkItemTemplate: pulumi.String("Agile"),
    			VersionControl:   pulumi.String("Git"),
    			Visibility:       pulumi.String("private"),
    			Description:      pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleServiceEndpointAzureRM, err := azuredevops.NewServiceEndpointAzureRM(ctx, "example", &azuredevops.ServiceEndpointAzureRMArgs{
    			ProjectId:           example.ID(),
    			ServiceEndpointName: pulumi.String("Example AzureRM"),
    			Description:         pulumi.String("Managed by Terraform"),
    			Credentials: &azuredevops.ServiceEndpointAzureRMCredentialsArgs{
    				Serviceprincipalid:  pulumi.String("00000000-0000-0000-0000-000000000000"),
    				Serviceprincipalkey: pulumi.String("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
    			},
    			AzurermSpnTenantid:      pulumi.String("00000000-0000-0000-0000-000000000000"),
    			AzurermSubscriptionId:   pulumi.String("00000000-0000-0000-0000-000000000000"),
    			AzurermSubscriptionName: pulumi.String("Example Subscription Name"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewVariableGroup(ctx, "example", &azuredevops.VariableGroupArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("Example Variable Group"),
    			Description: pulumi.String("Example Variable Group Description"),
    			AllowAccess: pulumi.Bool(true),
    			KeyVault: &azuredevops.VariableGroupKeyVaultArgs{
    				Name:              pulumi.String("example-kv"),
    				ServiceEndpointId: exampleServiceEndpointAzureRM.ID(),
    			},
    			Variables: azuredevops.VariableGroupVariableArray{
    				&azuredevops.VariableGroupVariableArgs{
    					Name: pulumi.String("key1"),
    				},
    				&azuredevops.VariableGroupVariableArgs{
    					Name: pulumi.String("key2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
            WorkItemTemplate = "Agile",
            VersionControl = "Git",
            Visibility = "private",
            Description = "Managed by Terraform",
        });
    
        var exampleServiceEndpointAzureRM = new AzureDevOps.ServiceEndpointAzureRM("example", new()
        {
            ProjectId = example.Id,
            ServiceEndpointName = "Example AzureRM",
            Description = "Managed by Terraform",
            Credentials = new AzureDevOps.Inputs.ServiceEndpointAzureRMCredentialsArgs
            {
                Serviceprincipalid = "00000000-0000-0000-0000-000000000000",
                Serviceprincipalkey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            },
            AzurermSpnTenantid = "00000000-0000-0000-0000-000000000000",
            AzurermSubscriptionId = "00000000-0000-0000-0000-000000000000",
            AzurermSubscriptionName = "Example Subscription Name",
        });
    
        var exampleVariableGroup = new AzureDevOps.VariableGroup("example", new()
        {
            ProjectId = example.Id,
            Name = "Example Variable Group",
            Description = "Example Variable Group Description",
            AllowAccess = true,
            KeyVault = new AzureDevOps.Inputs.VariableGroupKeyVaultArgs
            {
                Name = "example-kv",
                ServiceEndpointId = exampleServiceEndpointAzureRM.Id,
            },
            Variables = new[]
            {
                new AzureDevOps.Inputs.VariableGroupVariableArgs
                {
                    Name = "key1",
                },
                new AzureDevOps.Inputs.VariableGroupVariableArgs
                {
                    Name = "key2",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.ServiceEndpointAzureRM;
    import com.pulumi.azuredevops.ServiceEndpointAzureRMArgs;
    import com.pulumi.azuredevops.inputs.ServiceEndpointAzureRMCredentialsArgs;
    import com.pulumi.azuredevops.VariableGroup;
    import com.pulumi.azuredevops.VariableGroupArgs;
    import com.pulumi.azuredevops.inputs.VariableGroupKeyVaultArgs;
    import com.pulumi.azuredevops.inputs.VariableGroupVariableArgs;
    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 example = new Project("example", ProjectArgs.builder()        
                .name("Example Project")
                .workItemTemplate("Agile")
                .versionControl("Git")
                .visibility("private")
                .description("Managed by Terraform")
                .build());
    
            var exampleServiceEndpointAzureRM = new ServiceEndpointAzureRM("exampleServiceEndpointAzureRM", ServiceEndpointAzureRMArgs.builder()        
                .projectId(example.id())
                .serviceEndpointName("Example AzureRM")
                .description("Managed by Terraform")
                .credentials(ServiceEndpointAzureRMCredentialsArgs.builder()
                    .serviceprincipalid("00000000-0000-0000-0000-000000000000")
                    .serviceprincipalkey("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
                    .build())
                .azurermSpnTenantid("00000000-0000-0000-0000-000000000000")
                .azurermSubscriptionId("00000000-0000-0000-0000-000000000000")
                .azurermSubscriptionName("Example Subscription Name")
                .build());
    
            var exampleVariableGroup = new VariableGroup("exampleVariableGroup", VariableGroupArgs.builder()        
                .projectId(example.id())
                .name("Example Variable Group")
                .description("Example Variable Group Description")
                .allowAccess(true)
                .keyVault(VariableGroupKeyVaultArgs.builder()
                    .name("example-kv")
                    .serviceEndpointId(exampleServiceEndpointAzureRM.id())
                    .build())
                .variables(            
                    VariableGroupVariableArgs.builder()
                        .name("key1")
                        .build(),
                    VariableGroupVariableArgs.builder()
                        .name("key2")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
          workItemTemplate: Agile
          versionControl: Git
          visibility: private
          description: Managed by Terraform
      exampleServiceEndpointAzureRM:
        type: azuredevops:ServiceEndpointAzureRM
        name: example
        properties:
          projectId: ${example.id}
          serviceEndpointName: Example AzureRM
          description: Managed by Terraform
          credentials:
            serviceprincipalid: 00000000-0000-0000-0000-000000000000
            serviceprincipalkey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          azurermSpnTenantid: 00000000-0000-0000-0000-000000000000
          azurermSubscriptionId: 00000000-0000-0000-0000-000000000000
          azurermSubscriptionName: Example Subscription Name
      exampleVariableGroup:
        type: azuredevops:VariableGroup
        name: example
        properties:
          projectId: ${example.id}
          name: Example Variable Group
          description: Example Variable Group Description
          allowAccess: true
          keyVault:
            name: example-kv
            serviceEndpointId: ${exampleServiceEndpointAzureRM.id}
          variables:
            - name: key1
            - name: key2
    

    PAT Permissions Required

    • Variable Groups: Read, Create, & Manage
    • Build: Read & execute
    • Project and Team: Read
    • Token Administration: Read & manage
    • Tokens: Read & manage
    • Work Items: Read

    Create VariableGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VariableGroup(name: string, args: VariableGroupArgs, opts?: CustomResourceOptions);
    @overload
    def VariableGroup(resource_name: str,
                      args: VariableGroupArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def VariableGroup(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      project_id: Optional[str] = None,
                      variables: Optional[Sequence[VariableGroupVariableArgs]] = None,
                      allow_access: Optional[bool] = None,
                      description: Optional[str] = None,
                      key_vault: Optional[VariableGroupKeyVaultArgs] = None,
                      name: Optional[str] = None)
    func NewVariableGroup(ctx *Context, name string, args VariableGroupArgs, opts ...ResourceOption) (*VariableGroup, error)
    public VariableGroup(string name, VariableGroupArgs args, CustomResourceOptions? opts = null)
    public VariableGroup(String name, VariableGroupArgs args)
    public VariableGroup(String name, VariableGroupArgs args, CustomResourceOptions options)
    
    type: azuredevops:VariableGroup
    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 VariableGroupArgs
    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 VariableGroupArgs
    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 VariableGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VariableGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VariableGroupArgs
    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 variableGroupResource = new AzureDevOps.VariableGroup("variableGroupResource", new()
    {
        ProjectId = "string",
        Variables = new[]
        {
            new AzureDevOps.Inputs.VariableGroupVariableArgs
            {
                Name = "string",
                ContentType = "string",
                Enabled = false,
                Expires = "string",
                IsSecret = false,
                SecretValue = "string",
                Value = "string",
            },
        },
        AllowAccess = false,
        Description = "string",
        KeyVault = new AzureDevOps.Inputs.VariableGroupKeyVaultArgs
        {
            Name = "string",
            ServiceEndpointId = "string",
            SearchDepth = 0,
        },
        Name = "string",
    });
    
    example, err := azuredevops.NewVariableGroup(ctx, "variableGroupResource", &azuredevops.VariableGroupArgs{
    	ProjectId: pulumi.String("string"),
    	Variables: azuredevops.VariableGroupVariableArray{
    		&azuredevops.VariableGroupVariableArgs{
    			Name:        pulumi.String("string"),
    			ContentType: pulumi.String("string"),
    			Enabled:     pulumi.Bool(false),
    			Expires:     pulumi.String("string"),
    			IsSecret:    pulumi.Bool(false),
    			SecretValue: pulumi.String("string"),
    			Value:       pulumi.String("string"),
    		},
    	},
    	AllowAccess: pulumi.Bool(false),
    	Description: pulumi.String("string"),
    	KeyVault: &azuredevops.VariableGroupKeyVaultArgs{
    		Name:              pulumi.String("string"),
    		ServiceEndpointId: pulumi.String("string"),
    		SearchDepth:       pulumi.Int(0),
    	},
    	Name: pulumi.String("string"),
    })
    
    var variableGroupResource = new VariableGroup("variableGroupResource", VariableGroupArgs.builder()
        .projectId("string")
        .variables(VariableGroupVariableArgs.builder()
            .name("string")
            .contentType("string")
            .enabled(false)
            .expires("string")
            .isSecret(false)
            .secretValue("string")
            .value("string")
            .build())
        .allowAccess(false)
        .description("string")
        .keyVault(VariableGroupKeyVaultArgs.builder()
            .name("string")
            .serviceEndpointId("string")
            .searchDepth(0)
            .build())
        .name("string")
        .build());
    
    variable_group_resource = azuredevops.VariableGroup("variableGroupResource",
        project_id="string",
        variables=[azuredevops.VariableGroupVariableArgs(
            name="string",
            content_type="string",
            enabled=False,
            expires="string",
            is_secret=False,
            secret_value="string",
            value="string",
        )],
        allow_access=False,
        description="string",
        key_vault=azuredevops.VariableGroupKeyVaultArgs(
            name="string",
            service_endpoint_id="string",
            search_depth=0,
        ),
        name="string")
    
    const variableGroupResource = new azuredevops.VariableGroup("variableGroupResource", {
        projectId: "string",
        variables: [{
            name: "string",
            contentType: "string",
            enabled: false,
            expires: "string",
            isSecret: false,
            secretValue: "string",
            value: "string",
        }],
        allowAccess: false,
        description: "string",
        keyVault: {
            name: "string",
            serviceEndpointId: "string",
            searchDepth: 0,
        },
        name: "string",
    });
    
    type: azuredevops:VariableGroup
    properties:
        allowAccess: false
        description: string
        keyVault:
            name: string
            searchDepth: 0
            serviceEndpointId: string
        name: string
        projectId: string
        variables:
            - contentType: string
              enabled: false
              expires: string
              isSecret: false
              name: string
              secretValue: string
              value: string
    

    VariableGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VariableGroup resource accepts the following input properties:

    ProjectId string
    The ID of the project.
    Variables List<Pulumi.AzureDevOps.Inputs.VariableGroupVariable>
    One or more variable blocks as documented below.
    AllowAccess bool
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    Description string
    The description of the Variable Group.
    KeyVault Pulumi.AzureDevOps.Inputs.VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    Name string
    The name of the Variable Group.
    ProjectId string
    The ID of the project.
    Variables []VariableGroupVariableArgs
    One or more variable blocks as documented below.
    AllowAccess bool
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    Description string
    The description of the Variable Group.
    KeyVault VariableGroupKeyVaultArgs
    A list of key_vault blocks as documented below.
    Name string
    The name of the Variable Group.
    projectId String
    The ID of the project.
    variables List<VariableGroupVariable>
    One or more variable blocks as documented below.
    allowAccess Boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description String
    The description of the Variable Group.
    keyVault VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    name String
    The name of the Variable Group.
    projectId string
    The ID of the project.
    variables VariableGroupVariable[]
    One or more variable blocks as documented below.
    allowAccess boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description string
    The description of the Variable Group.
    keyVault VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    name string
    The name of the Variable Group.
    project_id str
    The ID of the project.
    variables Sequence[VariableGroupVariableArgs]
    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.
    key_vault VariableGroupKeyVaultArgs
    A list of key_vault blocks as documented below.
    name str
    The name of the Variable Group.
    projectId String
    The ID of the project.
    variables List<Property Map>
    One or more variable blocks as documented below.
    allowAccess Boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description String
    The description of the Variable Group.
    keyVault Property Map
    A list of key_vault blocks as documented below.
    name String
    The name of the Variable Group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VariableGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VariableGroup Resource

    Get an existing VariableGroup 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?: VariableGroupState, opts?: CustomResourceOptions): VariableGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_access: Optional[bool] = None,
            description: Optional[str] = None,
            key_vault: Optional[VariableGroupKeyVaultArgs] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            variables: Optional[Sequence[VariableGroupVariableArgs]] = None) -> VariableGroup
    func GetVariableGroup(ctx *Context, name string, id IDInput, state *VariableGroupState, opts ...ResourceOption) (*VariableGroup, error)
    public static VariableGroup Get(string name, Input<string> id, VariableGroupState? state, CustomResourceOptions? opts = null)
    public static VariableGroup get(String name, Output<String> id, VariableGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AllowAccess bool
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    Description string
    The description of the Variable Group.
    KeyVault Pulumi.AzureDevOps.Inputs.VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    Name string
    The name of the Variable Group.
    ProjectId string
    The ID of the project.
    Variables List<Pulumi.AzureDevOps.Inputs.VariableGroupVariable>
    One or more variable blocks as documented below.
    AllowAccess bool
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    Description string
    The description of the Variable Group.
    KeyVault VariableGroupKeyVaultArgs
    A list of key_vault blocks as documented below.
    Name string
    The name of the Variable Group.
    ProjectId string
    The ID of the project.
    Variables []VariableGroupVariableArgs
    One or more variable blocks as documented below.
    allowAccess Boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description String
    The description of the Variable Group.
    keyVault VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    name String
    The name of the Variable Group.
    projectId String
    The ID of the project.
    variables List<VariableGroupVariable>
    One or more variable blocks as documented below.
    allowAccess boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description string
    The description of the Variable Group.
    keyVault VariableGroupKeyVault
    A list of key_vault blocks as documented below.
    name string
    The name of the Variable Group.
    projectId string
    The ID of the project.
    variables VariableGroupVariable[]
    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.
    key_vault VariableGroupKeyVaultArgs
    A list of key_vault blocks as documented below.
    name str
    The name of the Variable Group.
    project_id str
    The ID of the project.
    variables Sequence[VariableGroupVariableArgs]
    One or more variable blocks as documented below.
    allowAccess Boolean
    Boolean that indicate if this variable group is shared by all pipelines of this project.
    description String
    The description of the Variable Group.
    keyVault Property Map
    A list of key_vault blocks as documented below.
    name String
    The name of the Variable Group.
    projectId String
    The ID of the project.
    variables List<Property Map>
    One or more variable blocks as documented below.

    Supporting Types

    VariableGroupKeyVault, VariableGroupKeyVaultArgs

    Name string
    The name of the Azure key vault to link secrets from as variables.
    ServiceEndpointId string
    The id of the Azure subscription endpoint to access the key vault.
    SearchDepth int
    Set the Azure Key Vault Secret search depth. Defaults to 20.
    Name string
    The name of the Azure key vault to link secrets from as variables.
    ServiceEndpointId string
    The id of the Azure subscription endpoint to access the key vault.
    SearchDepth int
    Set the Azure Key Vault Secret search depth. Defaults to 20.
    name String
    The name of the Azure key vault to link secrets from as variables.
    serviceEndpointId String
    The id of the Azure subscription endpoint to access the key vault.
    searchDepth Integer
    Set the Azure Key Vault Secret search depth. Defaults to 20.
    name string
    The name of the Azure key vault to link secrets from as variables.
    serviceEndpointId string
    The id of the Azure subscription endpoint to access the key vault.
    searchDepth number
    Set the Azure Key Vault Secret search depth. Defaults to 20.
    name str
    The name of the Azure key vault to link secrets from as variables.
    service_endpoint_id str
    The id of the Azure subscription endpoint to access the key vault.
    search_depth int
    Set the Azure Key Vault Secret search depth. Defaults to 20.
    name String
    The name of the Azure key vault to link secrets from as variables.
    serviceEndpointId String
    The id of the Azure subscription endpoint to access the key vault.
    searchDepth Number
    Set the Azure Key Vault Secret search depth. Defaults to 20.

    VariableGroupVariable, VariableGroupVariableArgs

    Name string
    The key value used for the variable. Must be unique within the Variable Group.
    ContentType string
    Enabled bool
    Expires string
    IsSecret bool
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    SecretValue string
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    Value string
    The value of the variable. If omitted, it will default to empty string.
    Name string
    The key value used for the variable. Must be unique within the Variable Group.
    ContentType string
    Enabled bool
    Expires string
    IsSecret bool
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    SecretValue string
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    Value string
    The value of the variable. If omitted, it will default to empty string.
    name String
    The key value used for the variable. Must be unique within the Variable Group.
    contentType String
    enabled Boolean
    expires String
    isSecret Boolean
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    secretValue String
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    value String
    The value of the variable. If omitted, it will default to empty string.
    name string
    The key value used for the variable. Must be unique within the Variable Group.
    contentType string
    enabled boolean
    expires string
    isSecret boolean
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    secretValue string
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    value string
    The value of the variable. If omitted, it will default to empty string.
    name str
    The key value used for the variable. Must be unique within the Variable Group.
    content_type str
    enabled bool
    expires str
    is_secret bool
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    secret_value str
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    value str
    The value of the variable. If omitted, it will default to empty string.
    name String
    The key value used for the variable. Must be unique within the Variable Group.
    contentType String
    enabled Boolean
    expires String
    isSecret Boolean
    A boolean flag describing if the variable value is sensitive. Defaults to false.
    secretValue String
    The secret value of the variable. If omitted, it will default to empty string. Used when is_secret set to true.
    value String
    The value of the variable. If omitted, it will default to empty string.

    Import

    Variable groups containing secret values cannot be imported.

    Azure DevOps Variable groups can be imported using the project name/variable group ID or by the project Guid/variable group ID, e.g.

    $ pulumi import azuredevops:index/variableGroup:VariableGroup example "Example Project/10"
    

    or

    $ pulumi import azuredevops:index/variableGroup:VariableGroup example 00000000-0000-0000-0000-000000000000/0
    

    Note that for secret variables, the import command retrieve blank value in the tfstate.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.1.1 published on Monday, May 20, 2024 by Pulumi