Skip to content

Commit

Permalink
Merge branch 'main' into CCM-12214
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-nagarajan committed Apr 28, 2023
2 parents 77c99da + f289e83 commit 524467c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/520.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
platform_connector_terraform_cloud - Improved Documentation
```
5 changes: 4 additions & 1 deletion docs/data-sources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ data "harness_platform_connector_terraform_cloud" "example" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional
### Required

- `identifier` (String) Unique identifier of the resource.

### Optional

- `name` (String) Name of the resource.
- `org_id` (String) Unique identifier of the organization.
- `project_id` (String) Unique identifier of the project.
Expand Down
10 changes: 9 additions & 1 deletion docs/resources/platform_connector_terraform_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
description = "description of terraform cloud connector"
tags = ["foo:bar"]
delegate_selectors = ["harness-delegate"]
url = "https://app.terraform.io/"
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
Expand All @@ -37,6 +38,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
delegate_selectors = ["harness-delegate"]
tags = ["foo:bar"]
execute_on_delegate = false
url = "https://app.terraform.io/"
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
Expand Down Expand Up @@ -86,6 +88,12 @@ Required:
Import is supported using the following syntax:

```shell
# Import using the Terraform Cloud provider connector ID.
# Import account level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <connector_id>

# Import org level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <ord_id>/<connector_id>

# Import project level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <org_id>/<project_id>/<connector_id>
```
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Import using the Terraform Cloud provider connector ID.
# Import account level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <connector_id>

# Import org level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <ord_id>/<connector_id>

# Import project level Terraform Cloud provider connector
terraform import harness_platform_connector_terraform_cloud.example <org_id>/<project_id>/<connector_id>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
description = "description of terraform cloud connector"
tags = ["foo:bar"]
delegate_selectors = ["harness-delegate"]
url = "https://app.terraform.io/"
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
Expand All @@ -22,6 +23,7 @@ resource "harness_platform_connector_terraform_cloud" "terraform_cloud" {
delegate_selectors = ["harness-delegate"]
tags = ["foo:bar"]
execute_on_delegate = false
url = "https://app.terraform.io/"
credentials {
api_token {
api_token_ref = "account.TEST_terraform_cloud_api_token"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func DatasourceConnectorTerraformCloud() *schema.Resource {
},
}

helpers.SetMultiLevelDatasourceSchema(resource.Schema)
helpers.SetMultiLevelDatasourceSchemaIdentifierRequired(resource.Schema)

return resource
}

0 comments on commit 524467c

Please sign in to comment.