Please excuse me if this is a dim question but I a...
# azure
r
Please excuse me if this is a dim question but I am new to Pulumi (and probably missing something). I have a working Azure DevOps pipeline running on a project in GitHub. I have managed to create a few basic resources in Azure etc. I’m now trying to use the Pulumi.AzureDevOps library to manipulate the VariableGroup within my DevOps project. The end game is to extract values from the VariableGroup so that I can using them but for the moment have been trying to run the default code found at this link: https://www.pulumi.com/registry/packages/azuredevops/api-docs/variablegroup/#example-usage. If I do a straightforward Copy/paste on the default code and run it I get an error on the pipeline: azuredevopsindexProject project error: the personal access token is required azuredevopsindexProject project 1 error Makes sense as I have not provided any access to DevOps but its not obvious to me how I would do this! To create Resources within Azure I passed a ServicePrincipal into the Pulumi@1 task using a variable (azureSubscription) and assume I should be doing something similar? Thanks for any assistance! PS I am ultimately looking to use: public static VariableGroup Get(string name, Input<string> id, VariableGroupState? state, CustomResourceOptions? opts = null) So if anybody had a working code example that would make life easier!
b
@refined-guitar-81055 information about how to set your access token can be found here: https://www.pulumi.com/registry/packages/azuredevops/installation-configuration/#configuring-credentials
r
Thanks - That looks like the missing link!
s
Variable groups are injected in the pipeline by azure devops as environment variable, i would recommend using an approach with consuming env vars rather than tightly coupling to azure devops.