Use this data source to access information about an existing AzureRM service Endpoint.
data "azuredevops_project" "sample" {
name = "Sample Project"
}
data "azuredevops_serviceendpoint_azurerm" "serviceendpoint" {
project_id = data.azuredevops_project.sample.id
service_endpoint_id = "00000000-0000-0000-0000-000000000000"
}
output "service_endpoint_name" {
value = data.azuredevops_serviceendpoint_azurerm.serviceendpoint.service_endpoint_name
}
data "azuredevops_project" "sample" {
name = "Sample Project"
}
data "azuredevops_serviceendpoint_azurerm" "serviceendpoint" {
project_id = data.azuredevops_project.sample.id
service_endpoint_name = "Example-Service-Endpoint"
}
output "service_endpoint_id" {
value = data.azuredevops_serviceendpoint_azurerm.serviceendpoint.id
}
The following arguments are supported:
project_id
- (Required) The ID of the project.
service_endpoint_id
- (Optional) the ID of the Service Endpoint.
service_endpoint_name
- (Optional) the Name of the Service Endpoint.
In addition to the Arguments list above - the following Attributes are exported:
authorization
- Specifies the Authorization Scheme Map.azurerm_management_group_id
- Specified the Management Group ID of the Service Endpoint is target, if available.azurerm_management_group_name
- Specified the Management Group Name of the Service Endpoint target, if available.azurerm_subscription_id
- Specifies the Subscription ID of the Service Endpoint target, if available.azurerm_subscription_name
- Specifies the Subscription Name of the Service Endpoint target, if available.resource_group
- Specifies the Resource Group of the Service Endpoint target, if available.azurerm_spn_tenantid
- Specifies the Tenant ID of the Azure targets.description
- Specifies the description of the Service Endpoint.environment
- The Cloud Environment. Possible values are AzureCloud
and AzureChinaCloud
.service_endpoint_authentication_scheme
- Specifies the authentication scheme of azurerm endpoint, either WorkloadIdentityFederation
, ManagedServiceIdentity
or ServicePrincipal
. workload_identity_federation_issuer
- The issuer if service_endpoint_authentication_scheme
is set to WorkloadIdentityFederation
. This looks like https://vstoken.dev.azure.com/f66a4bc2-08ad-4ec0-a25e-e769d6b3b294
, where the GUID is the Organization ID of your Azure DevOps Organisation.workload_identity_federation_subject
- The subject if service_endpoint_authentication_scheme
is set to WorkloadIdentityFederation
. This looks like sc://my-organisation/my-project/my-service-connection-name
.