layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_serviceendpoint_argocd |
Manages a ArgoCD server endpoint within Azure DevOps organization. |
Manages a ArgoCD service endpoint within Azure DevOps. Using this service endpoint requires you to first install Argo CD Extension.
resource "azuredevops_project" "example" {
name = "Example Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
}
resource "azuredevops_serviceendpoint_argocd" "example" {
project_id = azuredevops_project.example.id
service_endpoint_name = "Example ArgoCD"
description = "Managed by Terraform"
url = "https://argocd.my.com"
authentication_token {
token = "0000000000000000000000000000000000000000"
}
}
Alternatively a username and password may be used.
resource "azuredevops_project" "example" {
name = "Example Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
description = "Managed by Terraform"
}
resource "azuredevops_serviceendpoint_argocd" "example" {
project_id = azuredevops_project.example.id
service_endpoint_name = "Example ArgoCD"
description = "Managed by Terraform"
url = "https://argocd.my.com"
authentication_basic {
username = "username"
password = "password"
}
}
The following arguments are supported:
-
project_id
- (Required) The ID of the project. -
service_endpoint_name
- (Required) The Service Endpoint name. -
url
- (Required) URL of the ArgoCD server to connect with.
-
description
- (Optional) The Service Endpoint description. -
authentication_token
- (Optional) Anauthentication_token
block for the ArgoCD as documented below. -
authentication_basic
- (Optional) Anauthentication_basic
block for the ArgoCD as documented below.
~> NOTE: authentication_basic
and authentication_token
conflict with each other, only one is required.
A authentication_token
block supports the following:
token
- (Required) Authentication Token generated through ArgoCD.
A authentication_basic
block supports the following:
-
username
- (Required) The Username of the ArgoCD. -
password
- (Required) The Password of the ArgoCD.
The following attributes are exported:
id
- The ID of the service endpoint.project_id
- The ID of the project.service_endpoint_name
- The Service Endpoint name.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 2 minutes) Used when creating the Argo CD Service Endpoint.read
- (Defaults to 1 minute) Used when retrieving the Argo CD Service Endpoint.update
- (Defaults to 2 minutes) Used when updating the Argo CD Service Endpoint.delete
- (Defaults to 2 minutes) Used when deleting the Argo CD Service Endpoint.
Azure DevOps Argo CD Service Endpoint can be imported using the projectID/serviceEndpointID, e.g.
terraform import azuredevops_serviceendpoint_argocd.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000