microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
382 stars 273 forks source link

azuredevops_serviceendpoint_azurerm - support for environment #636

Open bnchou opened 2 years ago

bnchou commented 2 years ago

Community Note

Description

azuredevops_serviceendpoint_azurerm doesn't allow to create an azurerm service endpoint for gov cloud, can we have the environment accessible to the provider

New or Affected Resource(s)

Potential Terraform Configuration

resource "azuredevops_serviceendpoint_azurerm" "config" {
  project_id             = var.project.id
  service_endpoint_name = var.service_endpoint_name
  environment         = "AzureUSGovernment"
  description           = "Managed by Terraform"

  credentials {
    serviceprincipalid  = var.service_principal_id
    serviceprincipalkey = var.service_principal_key
  }

  azurerm_spn_tenantid      = data.azurerm_subscription.current.tenant_id
  azurerm_subscription_id   = data.azurerm_subscription.current.subscription_id
  azurerm_subscription_name = data.azurerm_subscription.current.display_name
}

References

miaooss commented 1 month ago

This seems to be fix using azuredevops_serviceendpoint_azurerm