Professional Documents
Culture Documents
com)
azuredevops_serviceendpoint_azurerm
Manages Manual or Automatic AzureRM service endpoint within Azure DevOps.
Before to create a service end point in Azure DevOps, you need to create a Service Principal in your Azure
subscription.
For detailed steps to create a service principal with Azure cli see the documentation
(https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-
latest)
Example Usage
Argument Reference
resource_group - (Optional) The resource group used for scope of automatic service endpoint.
Attributes Reference
Azure DevOps Service REST API 5.1 - Service End points (https://docs.microsoft.com/en-
us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-5.1)
(https://www.hashicorp.com)
azuredevops_serviceendpoint_bitbucket
Manages a Bitbucket service endpoint within Azure DevOps.
Example Usage
Argument Reference
Attributes Reference
Import
Azure DevOps Service Endpoint Bitbucket can be imported using the projectID/serviceEndpointID, e.g.
azuredevops_serviceendpoint_dockerhub
Manages a Docker Hub service endpoint within Azure DevOps.
Example Usage
docker_username = "sample"
docker_email = "email@example.com"
docker_password = "12345"
Argument Reference
Relevant Links
azuredevops_serviceendpoint_dockerhub
Manages a Docker Registry service endpoint within Azure DevOps.
Example Usage
docker_username = "sample"
docker_email = "email@example.com"
docker_password = "12345"
registry_type = "DockerHub"
}
Argument Reference
service_endpoint_name - (Required) The name you will use to refer to this service connection in task inputs.
description - (Optional) The name you will use to refer to this service connection in task inputs.
docker_registry - (Optional) The URL of the Docker registry. (Default: " https://index.docker.io/v1/"
(https://index.docker.io/v1/%22))
docker_username - (Optional) The identifier of the Docker account user.
docker_password - (Optional) The password for the account user identified above.
Attributes Reference
Relevant Links
azuredevops_serviceendpoint_github
Manages a GitHub service endpoint within Azure DevOps.
Example Usage
auth_personal {
personal_access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
auth_oauth {
oauth_configuration_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
description = ""
}
Argument Reference
auth_oauth - (Optional) An auth_oauth block as documented below. Allows connecting using an Oauth
token.
NOTE: Github Apps can not be created or updated via terraform. You must install and configure the app on Github
and then import it. You must also set the description to "" explicitly."
oauth_configuration_id - (Required) NOTE: Github OAuth flow can not be performed via terraform. You
must create this on Azure DevOps and then import it. The OAuth Configuration ID.
Attributes Reference
Relevant Links
Import
Azure DevOps Service Endpoint GitHub can be imported using the serviceendpoint id, e.g.
azuredevops_serviceendpoint_kubernetes
Manages a Kubernetes service endpoint within Azure DevOps.
Example Usage
data "azuredevops_project" "p" {
project_name = "contoso"
}
azure_subscription {
subscription_id = "001ac454-bb17-475a-8648-82c4234545be"
subscription_name = "Microsoft Azure DEMO"
tenant_id = "8c46c3eb-ca1f-4a0b-8dfa-7c3baaf69d45"
resourcegroup_id = "sample-rg"
namespace = "default"
cluster_name = "sample-aks"
}
}
kubeconfig {
kube_config = <<EOT
apiVersion: v1
clusters:
- cluster:
certificate-authority: fake-ca-file
server: https://1.2.3.4
name: development
contexts:
- context:
cluster: development
namespace: frontend
user: developer
name: dev-frontend
current-context: dev-frontend
kind: Config
preferences: {}
users:
- name: developer
user:
client-certificate: fake-cert-file
client-key: fake-key-file
EOT
accept_untrusted_certs = true
accept_untrusted_certs = true
cluster_context = "dev-frontend"
}
}
service_account {
token = "bXktYXBw[...]K8bPxc2uQ=="
ca_cert = "Mzk1MjgkdmRnN0pi[...]mHHRUH14gw4Q=="
}
}
Argument Reference
The following arguments are supported:
Attributes Reference
The following attributes are exported:
id - The ID of the service endpoint.
project_id - The project ID or project name.
service_endpoint_name - The Service Endpoint name.
Relevant Links
Azure DevOps Service REST API 5.1 - Endpoints (https://docs.microsoft.com/en-
us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-5.1)
(https://www.hashicorp.com)
azuredevops_user_entitlement
Manages a user entitlement within Azure DevOps.
Example Usage
Argument Reference
principal_name - (Optional) The principal name is the PrincipalName of a graph member from the source
provider. Usually, e-mail address.
origin_id - (Optional) The unique identifier from the system of origin. Typically a sid, object id or Guid. e.g.
Used for member of other tenant on Azure Active Directory.
origin - (Optional) The type of source provider for the origin identifier.
licensing_source - (Optional) The source of the licensing (e.g. Account. MSDN etc.) Valid values: account
(Default), auto , msdn , none , profile , trail
NOTE: A user can only be referenced by it's principal_name or by the combination of origin_id and
origin .
Attributes Reference
descriptor - The descriptor is the primary way to reference the graph subject while the system is running.
This field will uniquely identify the user graph subject.
Relevant Links
Azure DevOps Service REST API 5.1 - User Entitlements - Add (https://docs.microsoft.com/en-
us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements/add?view=azure-
devops-rest-5.1)
Import
The resources allows the import via the UUID of a user entitlement or by using the principal name of a user owning
an entitlement.
azuredevops_variable_group
Manages variable groups within Azure DevOps.
Example Usage
variable {
name = "key"
value = "value"
}
variable {
name = "Account Password"
value = "p@ssword123"
is_secret = true
}
}
Argument Reference
allow_access - (Required) Boolean that indicate if this variable group is shared by all pipelines of this project.
name - (Required) The key value used for the variable. Must be unique within the Variable Group.
value - (Optional) The value of the variable. If omitted, it will default to empty string.
secret_value - (Optional) The secret value of the variable. If omitted, it will default to empty string. Used
when is_secret set to true .
is_secret - (Optional) A boolean flag describing if the variable value is sensitive. Defaults to false .
Attributes Reference
Relevant Links
Import
Azure DevOps Variable groups can be imported using the project name/variable group Id or by the project
Guid/variable group Id, e.g.
Note that for secret variables, the import command retrieve blank value in the tfstate.