microsoft / terraform-provider-azuredevops

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

[proposed enhancement] Add Service Endpoints for the Terraform Extension from Microsoft DevLabs #675

Open caveman8fb opened 1 year ago

caveman8fb commented 1 year ago

Community Note

Description

Allow for the creation of AWSServiceEndpoint and GoogleCloudServiceEndpoint service endpoints when the Microsoft DevLabs ADO Terraform extension has been installed in Azure Devops.

New or Affected Resource(s)

New:

Potential Terraform Configuration

resource "azuredevops_serviceendpoint_gcp" "example" {
  project_id            = azuredevops_project.example.id
  token_uri             = "https://oauth2.example.com/token"
  client_email          = "gcp-sa-example@example.iam.gserviceaccount.com"
  private_key           = google_service_account.example.private_key
  service_endpoint_name = "Example GCP Terraform extension"
  description           = "Managed by Terraform"
}

References

https://github.com/microsoft/azure-pipelines-terraform

xuzhang3 commented 1 year ago

@caveman8fb AWS service endpoint has been supported: azuredevops_serviceendpoint_aws

Every connection have a specific name, users need to install the extension if it not installed by default. Is this the extension to support: https://marketplace.visualstudio.com/items?itemName=nexso.azure-devops-google-cloud-tools?

caveman8fb commented 1 year ago

Hoping to get the endpoints for Terraform GCP and Terraform AWS added. i.e. create Service Connections for Terraform using Terraform. Both are available from the linked ADO extension, https://github.com/microsoft/azure-pipelines-terraform.
Primarily concerned with Terraform for GCP as shown in example.

bbrother1 commented 1 year ago

@xuzhang3 The AWS and GCP Service Endpoints are not the same. GCP has a different set of requirements and is not available with this provider currently.

xuzhang3 commented 1 year ago

@caveman8fb @bbrother1 thanks for your feedback. Found the extension: https://marketplace.visualstudio.com/items?itemName=ms-devlabs.custom-terraform-tasks

konturn commented 1 year ago

Following the recommended format in @caveman8fb's initial comment, I've authored a PR which adds the GCP service endpoint resource.

jwoffindin commented 1 year ago

I've authored a PR adding support for managing the AWS service endpoint provided by the Terraform Extension from Microsoft DevLabs.

@xuzhang3 - really appreciate your hard work and effort on this project, it's been incredibly useful. Thanks 👍