Skip to content

Commit

Permalink
[CDS-55825]: docs review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacari-harness committed Apr 26, 2023
1 parent 6673d38 commit 4de0789
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .changelog/511.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```release-note:new-resource
platform_connector_terraform_cloud - Added a Terraform Cloud connector resource in the Harness Terraform provider.
2 changes: 1 addition & 1 deletion docs/data-sources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data "harness_platform_connector_terraform_cloud" "example" {

### Read-Only

- `credentials` (List of Object) Credentials to connect to Terraform Cloud platform. (see [below for nested schema](#nestedatt--credentials))
- `credentials` (List of Object) Credentials to connect to the Terraform Cloud platform. (see [below for nested schema](#nestedatt--credentials))
- `delegate_selectors` (Set of String) Tags to filter delegates for connection.
- `description` (String) Description of the resource.
- `id` (String) The ID of this resource.
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
page_title: "harness_platform_connector_terraform_cloud Resource - terraform-provider-harness"
subcategory: "Next Gen"
description: |-
Resource for creating a TerraformCloud connector.
Resource for creating a Terraform Cloud connector.
---

# harness_platform_connector_terraform_cloud (Resource)

Resource for creating a TerraformCloud connector.
Resource for creating a Terraform Cloud connector.

## Example Usage

```terraform
# Create Terraform Cloud connector using API token as secret
# Create a Terraform Cloud connector by using an API token as a secret.
resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
Expand All @@ -28,7 +28,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
}
}
# Add connectivity mode by providing execute_on_delegate value. Default is to execute on Delegate
# Specify the connectivity mode by setting execute_on_delegate to true or false. The default mode executes on the delegate.
resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
Expand All @@ -50,10 +50,10 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {

### Required

- `credentials` (Block List, Min: 1, Max: 1) Credentials to connect to Terraform Cloud platform. (see [below for nested schema](#nestedblock--credentials))
- `credentials` (Block List, Min: 1, Max: 1) Credentials to connect to the Terraform Cloud platform. (see [below for nested schema](#nestedblock--credentials))
- `identifier` (String) Unique identifier of the resource.
- `name` (String) Name of the resource.
- `url` (String) URL of Terraform Cloud platform.
- `url` (String) URL of the Terraform Cloud platform.

### Optional

Expand All @@ -79,13 +79,13 @@ Required:

Required:

- `api_token_ref` (String) Reference to a secret containing the api token to use for authentication. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
- `api_token_ref` (String) Reference to a secret containing the API token to use for authentication. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.

## Import

Import is supported using the following syntax:

```shell
# Import using terrafrm cloud provider connector id
# Import using the Terraform Cloud provider connector ID.
terraform import harness_platform_connector_terraform_cloud.example <connector_id>
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Import using terrafrm cloud provider connector id
# Import using the Terraform Cloud provider connector ID.
terraform import harness_platform_connector_terraform_cloud.example <connector_id>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create Terraform Cloud connector using API token as secret
# Create a Terraform Cloud connector by using an API token as a secret.

resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
Expand All @@ -13,7 +13,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
}
}

# Add connectivity mode by providing execute_on_delegate value. Default is to execute on Delegate
# Specify the connectivity mode by setting execute_on_delegate to true or false. The default mode executes on the delegate.

resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
identifier = "example_terraform_cloud_connector"
Expand Down
8 changes: 4 additions & 4 deletions internal/service/platform/connector/terraform_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ import (

func ResourceConnectorTerraformCloud() *schema.Resource {
resource := &schema.Resource{
Description: "Resource for creating a TerraformCloud connector.",
Description: "Resource for creating a Terraform Cloud connector.",
ReadContext: resourceConnectorTerraformCloudRead,
CreateContext: resourceConnectorTerraformCloudCreateOrUpdate,
UpdateContext: resourceConnectorTerraformCloudCreateOrUpdate,
DeleteContext: resourceConnectorDelete,
Importer: helpers.MultiLevelResourceImporter,
Schema: map[string]*schema.Schema{
"url": {
Description: "URL of Terraform Cloud platform.",
Description: "URL of the Terraform Cloud platform.",
Type: schema.TypeString,
Required: true,
},
"credentials": {
Description: "Credentials to connect to Terraform Cloud platform.",
Description: "Credentials to connect to the Terraform Cloud platform.",
Type: schema.TypeList,
MaxItems: 1,
Required: true,
Expand All @@ -40,7 +40,7 @@ func ResourceConnectorTerraformCloud() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"api_token_ref": {
Description: "Reference to a secret containing the api token to use for authentication." + secret_ref_text,
Description: "Reference to a secret containing the API token to use for authentication." + secret_ref_text,
Type: schema.TypeString,
Required: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func DatasourceConnectorTerraformCloud() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
},
"credentials": {
Description: "Credentials to connect to Terraform Cloud platform.",
Description: "Credentials to connect to the Terraform Cloud platform.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Expand All @@ -35,7 +35,7 @@ func DatasourceConnectorTerraformCloud() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"api_token_ref": {
Description: "Reference to a secret containing the api token to use for authentication." + secret_ref_text,
Description: "Reference to a secret containing the API token to use for authentication." + secret_ref_text,
Type: schema.TypeString,
Computed: true,
},
Expand Down

0 comments on commit 4de0789

Please sign in to comment.