Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAC-1124: update docs #752

Merged
merged 7 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/data-sources/platform_workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ Read-Only:

Read-Only:

- `repository` (String) Repository is the name of the repository to use
- `repository_branch` (String) Repository Branch in which the code should be accessed
- `repository_commit` (String) Repository Commit/Tag in which the code should be accessed
- `repository_connector` (String) Repository Connector is the reference to the connector to use for this code
- `repository_path` (String) Repository Commit/Tag in which the code should be accessed
- `repository` (String) Repository is the name of the repository to fetch the code from.
- `repository_branch` (String) Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit is set
- `repository_commit` (String) Repository commit is commit or tag to fetch the variables from. This cannot be set if repository branch is set.
- `repository_connector` (String) Repository connector is the reference to the connector used to fetch the variables.
- `repository_path` (String) Repository path is the path in which the variables reside.
17 changes: 8 additions & 9 deletions docs/resources/platform_workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ Resource for managing Workspaces
resource "harness_platform_workspace" "example" {
name = "example"
identifier = "example"
org_id = "org_id"
project_id = "project_id"
org_id = harness_platform_organization.test.id
project_id = harness_platform_project.test.id
provisioner = "terraform"
provisioner_version = "1.5.6"
repository = "https://github.com/org/repo"
repository_branch = "main"
repository_commit = "349d90bb9c90f4a3482981c259080de31609e6f6"
repository_path = "tf/aws/basic"
cost_estimation_enabled = true
provider_connector = "account.connector"
repository_connector = "account.connector"
provider_connector = harness_platform_connector_github.test.id
repository_connector = harness_platform_connector_github.test.id

terraform_variable {
key = "key1"
Expand Down Expand Up @@ -54,13 +53,13 @@ resource "harness_platform_workspace" "example" {
repository = "https://github.com/org/repo"
repository_branch = "main"
repository_path = "tf/gcp/basic"
repository_connector = "account.connector"
repository_connector = harness_platform_connector_github.test.id
}
terraform_variable_file {
repository = "https://github.com/org/repo"
repository_branch = "main"
repository_commit = "349d90bb9c90f4a3482981c259080de31609e6f6"
repository_path = "tf/aws/basic"
repository_connector = "account.connector"
repository_connector = harness_platform_connector_github.test.id
}
}
```
Expand Down Expand Up @@ -135,5 +134,5 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import harness_platform_workspace.example <org_id>/<project_id>/<workspace_id>
terraform import harness_platform_workspace.example <org_id>/<project_id>/<slo_id>
```
2 changes: 1 addition & 1 deletion examples/resources/harness_platform_workspace/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import harness_platform_workspace.example <org_id>/<project_id>/<slo_id>
terraform import harness_platform_workspace.example <org_id>/<project_id>/<workspace_id>
3 changes: 1 addition & 2 deletions examples/resources/harness_platform_workspace/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ resource "harness_platform_workspace" "example" {
provisioner_version = "1.5.6"
repository = "https://github.com/org/repo"
repository_branch = "main"
repository_commit = "349d90bb9c90f4a3482981c259080de31609e6f6"
repository_path = "tf/aws/basic"
cost_estimation_enabled = true
provider_connector = harness_platform_connector_github.test.id
Expand Down Expand Up @@ -43,7 +42,7 @@ resource "harness_platform_workspace" "example" {
}
terraform_variable_file {
repository = "https://github.com/org/repo"
repository_branch = "main"
repository_commit = "349d90bb9c90f4a3482981c259080de31609e6f6"
repository_path = "tf/aws/basic"
repository_connector = harness_platform_connector_github.test.id
}
Expand Down
10 changes: 5 additions & 5 deletions internal/service/platform/workspace/data_source_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,27 +142,27 @@ func DataSourceWorkspace() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"repository": {
Description: "Repository is the name of the repository to use",
Description: "Repository is the name of the repository to fetch the code from.",
Type: schema.TypeString,
Computed: true,
},
"repository_branch": {
Description: " Repository Branch in which the code should be accessed",
Description: "Repository branch is the name of the branch to fetch the variables from. This cannot be set if repository commit is set",
Type: schema.TypeString,
Computed: true,
},
"repository_commit": {
Description: "Repository Commit/Tag in which the code should be accessed",
Description: "Repository commit is commit or tag to fetch the variables from. This cannot be set if repository branch is set.",
Type: schema.TypeString,
Computed: true,
},
"repository_connector": {
Description: "Repository Connector is the reference to the connector to use for this code",
Description: "Repository connector is the reference to the connector used to fetch the variables.",
Type: schema.TypeString,
Computed: true,
},
"repository_path": {
Description: "Repository Commit/Tag in which the code should be accessed",
Description: "Repository path is the path in which the variables reside.",
Type: schema.TypeString,
Computed: true,
},
Expand Down