diff --git a/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_artifactory_v2_test.go b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_artifactory_v2_test.go new file mode 100644 index 000000000..2ec550e02 --- /dev/null +++ b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_artifactory_v2_test.go @@ -0,0 +1,55 @@ +//go:build (all || data_sources || data_serviceendpoint_jfrog_artifactory_v2) && (!exclude_data_sources || !exclude_data_serviceendpoint_jfrog_artifactory_v2) +// +build all data_sources data_serviceendpoint_jfrog_artifactory_v2 +// +build !exclude_data_sources !exclude_data_serviceendpoint_jfrog_artifactory_v2 + +package acceptancetests + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests/testutils" +) + +func TestAccServiceEndpointJfrogArtifactoryV2_dataSource(t *testing.T) { + name := testutils.GenerateResourceName() + + tfNode := "data.azuredevops_serviceendpoint_jfrog_artifactory_v2.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testutils.PreCheck(t, nil) }, + Providers: testutils.GetProviders(), + Steps: []resource.TestStep{ + { + Config: hclServiceEndpointJfrogArtifactoryV2DataSource(name), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(tfNode, "service_endpoint_name", name), + resource.TestCheckResourceAttrSet(tfNode, "service_endpoint_name"), + ), + }, + }, + }) +} + +func hclServiceEndpointJfrogArtifactoryV2DataSource(name string) string { + return fmt.Sprintf(` +resource "azuredevops_project" "test" { + name = "%[1]s" + visibility = "private" + version_control = "Git" + work_item_template = "Agile" +} + +resource "azuredevops_serviceendpoint_jfrog_artifactory_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = "%[1]s" + token = "0000000000000000000000000000000000000000" + description = "Managed by Terraform" +} + +data "azuredevops_serviceendpoint_jfrog_artifactory_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = azuredevops_serviceendpoint_jfrog_artifactory_v2.test.service_endpoint_name +} +`, name) +} diff --git a/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_distribution_v2_test.go b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_distribution_v2_test.go new file mode 100644 index 000000000..744d108a6 --- /dev/null +++ b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_distribution_v2_test.go @@ -0,0 +1,55 @@ +//go:build (all || data_sources || data_serviceendpoint_jfrog_distribution_v2) && (!exclude_data_sources || !exclude_data_serviceendpoint_jfrog_distribution_v2) +// +build all data_sources data_serviceendpoint_jfrog_distribution_v2 +// +build !exclude_data_sources !exclude_data_serviceendpoint_jfrog_distribution_v2 + +package acceptancetests + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests/testutils" +) + +func TestAccServiceEndpointJfrogDistributionV2_dataSource(t *testing.T) { + name := testutils.GenerateResourceName() + + tfNode := "data.azuredevops_serviceendpoint_jfrog_distribution_v2.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testutils.PreCheck(t, nil) }, + Providers: testutils.GetProviders(), + Steps: []resource.TestStep{ + { + Config: hclServiceEndpointJfrogDistributionV2DataSource(name), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(tfNode, "service_endpoint_name", name), + resource.TestCheckResourceAttrSet(tfNode, "service_endpoint_name"), + ), + }, + }, + }) +} + +func hclServiceEndpointJfrogDistributionV2DataSource(name string) string { + return fmt.Sprintf(` +resource "azuredevops_project" "test" { + name = "%[1]s" + visibility = "private" + version_control = "Git" + work_item_template = "Agile" +} + +resource "azuredevops_serviceendpoint_jfrog_distribution_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = "%[1]s" + token = "0000000000000000000000000000000000000000" + description = "Managed by Terraform" +} + +data "azuredevops_serviceendpoint_jfrog_distribution_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = azuredevops_serviceendpoint_jfrog_distribution_v2.test.service_endpoint_name +} +`, name) +} diff --git a/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_platform_v2_test.go b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_platform_v2_test.go new file mode 100644 index 000000000..79c01f0d2 --- /dev/null +++ b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_platform_v2_test.go @@ -0,0 +1,55 @@ +//go:build (all || data_sources || data_serviceendpoint_jfrog_platform_v2) && (!exclude_data_sources || !exclude_data_serviceendpoint_jfrog_platform_v2) +// +build all data_sources data_serviceendpoint_jfrog_platform_v2 +// +build !exclude_data_sources !exclude_data_serviceendpoint_jfrog_platform_v2 + +package acceptancetests + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests/testutils" +) + +func TestAccServiceEndpointJfrogPlatformV2_dataSource(t *testing.T) { + name := testutils.GenerateResourceName() + + tfNode := "data.azuredevops_serviceendpoint_jfrog_platform_v2.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testutils.PreCheck(t, nil) }, + Providers: testutils.GetProviders(), + Steps: []resource.TestStep{ + { + Config: hclServiceEndpointJfrogPlatformV2DataSource(name), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(tfNode, "service_endpoint_name", name), + resource.TestCheckResourceAttrSet(tfNode, "service_endpoint_name"), + ), + }, + }, + }) +} + +func hclServiceEndpointJfrogPlatformV2DataSource(name string) string { + return fmt.Sprintf(` +resource "azuredevops_project" "test" { + name = "%[1]s" + visibility = "private" + version_control = "Git" + work_item_template = "Agile" +} + +resource "azuredevops_serviceendpoint_jfrog_platform_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = "%[1]s" + token = "0000000000000000000000000000000000000000" + description = "Managed by Terraform" +} + +data "azuredevops_serviceendpoint_jfrog_platform_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = azuredevops_serviceendpoint_jfrog_platform_v2.test.service_endpoint_name +} +`, name) +} diff --git a/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_xray_v2_test.go b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_xray_v2_test.go new file mode 100644 index 000000000..bd76a04ac --- /dev/null +++ b/azuredevops/internal/acceptancetests/data_serviceendpoint_jfrog_xray_v2_test.go @@ -0,0 +1,55 @@ +//go:build (all || data_sources || data_serviceendpoint_jfrog_xray_v2) && (!exclude_data_sources || !exclude_data_serviceendpoint_jfrog_xray_v2) +// +build all data_sources data_serviceendpoint_jfrog_xray_v2 +// +build !exclude_data_sources !exclude_data_serviceendpoint_jfrog_xray_v2 + +package acceptancetests + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests/testutils" +) + +func TestAccServiceEndpointJfrogXrayV2_dataSource(t *testing.T) { + name := testutils.GenerateResourceName() + + tfNode := "data.azuredevops_serviceendpoint_jfrog_xray_v2.test" + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testutils.PreCheck(t, nil) }, + Providers: testutils.GetProviders(), + Steps: []resource.TestStep{ + { + Config: hclServiceEndpointJfrogXrayV2DataSource(name), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(tfNode, "service_endpoint_name", name), + resource.TestCheckResourceAttrSet(tfNode, "service_endpoint_name"), + ), + }, + }, + }) +} + +func hclServiceEndpointJfrogXrayV2DataSource(name string) string { + return fmt.Sprintf(` +resource "azuredevops_project" "test" { + name = "%[1]s" + visibility = "private" + version_control = "Git" + work_item_template = "Agile" +} + +resource "azuredevops_serviceendpoint_jfrog_xray_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = "%[1]s" + token = "0000000000000000000000000000000000000000" + description = "Managed by Terraform" +} + +data "azuredevops_serviceendpoint_jfrog_xray_v2" "test" { + project_id = azuredevops_project.test.id + service_endpoint_name = azuredevops_serviceendpoint_jfrog_xray_v2.test.service_endpoint_name +} +`, name) +} diff --git a/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go new file mode 100644 index 000000000..0751788a1 --- /dev/null +++ b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_artifactory_v2.go @@ -0,0 +1,56 @@ +package serviceendpoint + +import ( + "fmt" + "maps" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/client" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils/validate" +) + +// DataSourceServiceEndpointJFrogArtifactoryV2 schema and implementation for JFrog Artifactory service endpoint resource +func DataSourceServiceEndpointJFrogArtifactoryV2() *schema.Resource { + r := &schema.Resource{ + Read: DataSourceServiceEndpointJFrogArtifactoryV2Read, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: dataSourceGenBaseSchema(), + } + + maps.Copy(r.Schema, map[string]*schema.Schema{ + "url": { + Type: schema.TypeString, + Computed: true, + }, + }, + }) + + return r +} + +func DataSourceServiceEndpointJFrogArtifactoryV2Read(d *schema.ResourceData, m interface{}) error { + clients := m.(*client.AggregatedClient) + getArgs, err := serviceEndpointGetArgs(d) + if err != nil { + return err + } + + serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(clients.Ctx, *getArgs) + if err != nil { + if utils.ResponseWasNotFound(err) { + d.SetId("") + return nil + } + return fmt.Errorf(" looking up service endpoint given ID (%v) and project ID (%v): %v", getArgs.EndpointId, getArgs.Project, err) + } + + if err = checkServiceConnection(serviceEndpoint); err != nil { + return err + } + d.Set("url", serviceEndpoint.Url) + return nil +} diff --git a/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_distribution_v2.go b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_distribution_v2.go new file mode 100644 index 000000000..7f7c6e41c --- /dev/null +++ b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_distribution_v2.go @@ -0,0 +1,54 @@ +package serviceendpoint + +import ( + "fmt" + "maps" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/client" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils/validate" +) + +// DataSourceServiceEndpointJFrogDistributionV2 schema and implementation for JFrog Distribution service endpoint resource +func DataSourceServiceEndpointJFrogDistributionV2() *schema.Resource { + r := &schema.Resource{ + Read: DataSourceServiceEndpointJFrogDistributionV2Read, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: dataSourceGenBaseSchema(), + } + maps.Copy(r.Schema, map[string]*schema.Schema{ + "url": { + Type: schema.TypeString, + Computed: true, + }, + }) + + return r +} + +func DataSourceServiceEndpointJFrogDistributionV2Read(d *schema.ResourceData, m interface{}) error { + clients := m.(*client.AggregatedClient) + getArgs, err := serviceEndpointGetArgs(d) + if err != nil { + return err + } + + serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(clients.Ctx, *getArgs) + if err != nil { + if utils.ResponseWasNotFound(err) { + d.SetId("") + return nil + } + return fmt.Errorf(" looking up service endpoint given ID (%v) and project ID (%v): %v", getArgs.EndpointId, getArgs.Project, err) + } + + if err = checkServiceConnection(serviceEndpoint); err != nil { + return err + } + d.Set("url", serviceEndpoint.Url) + return nil +} diff --git a/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_platform_v2.go b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_platform_v2.go new file mode 100644 index 000000000..e9f2079eb --- /dev/null +++ b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_platform_v2.go @@ -0,0 +1,55 @@ +package serviceendpoint + +import ( + "fmt" + "maps" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/client" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils/validate" +) + +// DataSourceServiceEndpointJFrogPlatformV2 schema and implementation for JFrog Platform service endpoint resource +func DataSourceServiceEndpointJFrogPlatformV2() *schema.Resource { + r := &schema.Resource{ + Read: DataSourceServiceEndpointJFrogPlatformV2Read, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: dataSourceGenBaseSchema(), + } + + maps.Copy(r.Schema, map[string]*schema.Schema{ + "url": { + Type: schema.TypeString, + Computed: true, + }, + }) + + return r +} + +func DataSourceServiceEndpointJFrogPlatformV2Read(d *schema.ResourceData, m interface{}) error { + clients := m.(*client.AggregatedClient) + getArgs, err := serviceEndpointGetArgs(d) + if err != nil { + return err + } + + serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(clients.Ctx, *getArgs) + if err != nil { + if utils.ResponseWasNotFound(err) { + d.SetId("") + return nil + } + return fmt.Errorf(" looking up service endpoint given ID (%v) and project ID (%v): %v", getArgs.EndpointId, getArgs.Project, err) + } + + if err = checkServiceConnection(serviceEndpoint); err != nil { + return err + } + d.Set("url", serviceEndpoint.Url) + return nil +} diff --git a/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_xray_v2.go b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_xray_v2.go new file mode 100644 index 000000000..bd3d5055e --- /dev/null +++ b/azuredevops/internal/service/serviceendpoint/data_serviceendpoint_jfrog_xray_v2.go @@ -0,0 +1,55 @@ +package serviceendpoint + +import ( + "fmt" + "maps" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/client" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils" + "github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/utils/validate" +) + +// DataSourceServiceEndpointJFrogXRayV2 schema and implementation for JFrog XRay service endpoint resource +func DataSourceServiceEndpointJFrogXRayV2() *schema.Resource { + r := &schema.Resource{ + Read: DataSourceServiceEndpointJFrogXRayV2Read, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(1 * time.Minute), + }, + Schema: dataSourceGenBaseSchema(), + } + + maps.Copy(r.Schema, map[string]*schema.Schema{ + "url": { + Type: schema.TypeString, + Computed: true, + }, + }) + + return r +} + +func DataSourceServiceEndpointJFrogXRayV2Read(d *schema.ResourceData, m interface{}) error { + clients := m.(*client.AggregatedClient) + getArgs, err := serviceEndpointGetArgs(d) + if err != nil { + return err + } + + serviceEndpoint, err := clients.ServiceEndpointClient.GetServiceEndpointDetails(clients.Ctx, *getArgs) + if err != nil { + if utils.ResponseWasNotFound(err) { + d.SetId("") + return nil + } + return fmt.Errorf(" looking up service endpoint given ID (%v) and project ID (%v): %v", getArgs.EndpointId, getArgs.Project, err) + } + + if err = checkServiceConnection(serviceEndpoint); err != nil { + return err + } + d.Set("url", serviceEndpoint.Url) + return nil +} diff --git a/website/azuredevops.erb b/website/azuredevops.erb index 1f5969a53..b40c2d116 100644 --- a/website/azuredevops.erb +++ b/website/azuredevops.erb @@ -94,6 +94,18 @@
  • azuredevops_serviceendpoint_azurecr
  • +
  • + azuredevops_serviceendpoint_jfrog_artifactory_v2 +
  • +
  • + azuredevops_serviceendpoint_jfrog_distribution_v2 +
  • +
  • + azuredevops_serviceendpoint_jfrog_platform_v2 +
  • +
  • + azuredevops_serviceendpoint_jfrog_xray_v2 +
  • azuredevops_serviceendpoint_sonarcloud
  • diff --git a/website/docs/d/serviceendpoint_jfrog_artifactory_v2.html.markdown b/website/docs/d/serviceendpoint_jfrog_artifactory_v2.html.markdown new file mode 100644 index 000000000..ca12fb23c --- /dev/null +++ b/website/docs/d/serviceendpoint_jfrog_artifactory_v2.html.markdown @@ -0,0 +1,46 @@ +--- +layout: "azuredevops" +page_title: "AzureDevops: azuredevops_serviceendpoint_jfrog_artifactory_v2" +description: |- + Gets information about an existing JFrog Artifactory V2 Service Endpoint. +--- + +# Data Source : azuredevops_serviceendpoint_jfrog_artifactory_v2 + +Use this data source to access information about an existing JFrog Artifactory V2 Service Endpoint. + +## Example Usage + +```hcl +data "azuredevops_project" "example" { + name = "Example Project" +} + +data "azuredevops_serviceendpoint_jfrog_artifactory_v2" "example" { + project_id = data.azuredevops_project.example.id + service_endpoint_name = "Example JFrog Artifactory V2" +} + +output "service_endpoint_id" { + value = data.azuredevops_serviceendpoint_jfrog_artifactory_v2.example.id +} +``` + +## Arguments Reference + +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. + +~> **NOTE:** One of either `service_endpoint_id` or `service_endpoint_name` must be specified. + +## Attributes Reference + +In addition to the Arguments list above - the following Attributes are exported: + +* `url` - The URL of the Artifactory server to connect with. +* `description` - Specifies the description of the Service Endpoint. diff --git a/website/docs/d/serviceendpoint_jfrog_distribution_v2.markdown b/website/docs/d/serviceendpoint_jfrog_distribution_v2.markdown new file mode 100644 index 000000000..86b7c795b --- /dev/null +++ b/website/docs/d/serviceendpoint_jfrog_distribution_v2.markdown @@ -0,0 +1,46 @@ +--- +layout: "azuredevops" +page_title: "AzureDevops: azuredevops_serviceendpoint_jfrog_distribution_v2" +description: |- + Gets information about an existing JFrog Distribution V2 Service Endpoint. +--- + +# Data Source : azuredevops_serviceendpoint_jfrog_distribution_v2 + +Use this data source to access information about an existing JFrog Distribution V2 Service Endpoint. + +## Example Usage + +```hcl +data "azuredevops_project" "example" { + name = "Example Project" +} + +data "azuredevops_serviceendpoint_jfrog_distribution_v2" "example" { + project_id = data.azuredevops_project.example.id + service_endpoint_name = "Example JFrog Distribution V2" +} + +output "service_endpoint_id" { + value = data.azuredevops_serviceendpoint_jfrog_distribution_v2.example.id +} +``` + +## Arguments Reference + +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. + +~> **NOTE:** One of either `service_endpoint_id` or `service_endpoint_name` must be specified. + +## Attributes Reference + +In addition to the Arguments list above - the following Attributes are exported: + +* `url` - The URL of the Artifactory server to connect with. +* `description` - Specifies the description of the Service Endpoint. diff --git a/website/docs/d/serviceendpoint_jfrog_platform_v2.markdown b/website/docs/d/serviceendpoint_jfrog_platform_v2.markdown new file mode 100644 index 000000000..ef6923d7e --- /dev/null +++ b/website/docs/d/serviceendpoint_jfrog_platform_v2.markdown @@ -0,0 +1,46 @@ +--- +layout: "azuredevops" +page_title: "AzureDevops: azuredevops_serviceendpoint_jfrog_platform_v2" +description: |- + Gets information about an existing JFrog Platform V2 Service Endpoint. +--- + +# Data Source : azuredevops_serviceendpoint_jfrog_platform_v2 + +Use this data source to access information about an existing JFrog Platform V2 Service Endpoint. + +## Example Usage + +```hcl +data "azuredevops_project" "example" { + name = "Example Project" +} + +data "azuredevops_serviceendpoint_jfrog_platform_v2" "example" { + project_id = data.azuredevops_project.example.id + service_endpoint_name = "Example JFrog Platform V2" +} + +output "service_endpoint_id" { + value = data.azuredevops_serviceendpoint_jfrog_platform_v2.example.id +} +``` + +## Arguments Reference + +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. + +~> **NOTE:** One of either `service_endpoint_id` or `service_endpoint_name` must be specified. + +## Attributes Reference + +In addition to the Arguments list above - the following Attributes are exported: + +* `url` - The URL of the Artifactory server to connect with. +* `description` - Specifies the description of the Service Endpoint. diff --git a/website/docs/d/serviceendpoint_jfrog_xray_v2.html.markdown b/website/docs/d/serviceendpoint_jfrog_xray_v2.html.markdown new file mode 100644 index 000000000..c3b9ec9fc --- /dev/null +++ b/website/docs/d/serviceendpoint_jfrog_xray_v2.html.markdown @@ -0,0 +1,46 @@ +--- +layout: "azuredevops" +page_title: "AzureDevops: azuredevops_serviceendpoint_jfrog_xray_v2" +description: |- + Gets information about an existing JFrog XRay V2 Service Endpoint. +--- + +# Data Source : azuredevops_serviceendpoint_jfrog_xray_v2 + +Use this data source to access information about an existing JFrog XRay V2 Service Endpoint. + +## Example Usage + +```hcl +data "azuredevops_project" "example" { + name = "Example Project" +} + +data "azuredevops_serviceendpoint_jfrog_xray_v2" "example" { + project_id = data.azuredevops_project.example.id + service_endpoint_name = "Example JFrog XRay V2" +} + +output "service_endpoint_id" { + value = data.azuredevops_serviceendpoint_jfrog_xray_v2.example.id +} +``` + +## Arguments Reference + +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. + +~> **NOTE:** One of either `service_endpoint_id` or `service_endpoint_name` must be specified. + +## Attributes Reference + +In addition to the Arguments list above - the following Attributes are exported: + +* `url` - The URL of the Artifactory server to connect with. +* `description` - Specifies the description of the Service Endpoint.