Skip to content

Commit

Permalink
feat: Make import work for workspace_vcs (#64)
Browse files Browse the repository at this point in the history
Additional changes:

1. Rename the examples for resource and data source so that doc
   generated includes examples
2. Add import example for workspace_vcs
  • Loading branch information
stanleyz authored Aug 23, 2024
1 parent 1de9d39 commit f00bbc5
Show file tree
Hide file tree
Showing 38 changed files with 326 additions and 56 deletions.
8 changes: 7 additions & 1 deletion docs/data-sources/organization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization Data Source - terraform-provider-terrakube"
page_title: "terrakube_organization Data Source - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,13 @@ description: |-



## Example Usage

```terraform
data "terrakube_organization" "org" {
name = "simple"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 12 additions & 1 deletion docs/data-sources/organization_tag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization_tag Data Source - terraform-provider-terrakube"
page_title: "terrakube_organization_tag Data Source - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,18 @@ description: |-



## Example Usage

```terraform
data "terrakube_organization" "org" {
name = "simple"
}
data "terrakube_organization_tag" "tag" {
organization_id = data.terraform_organization.org.id
name = "test"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 12 additions & 1 deletion docs/data-sources/organization_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization_template Data Source - terraform-provider-terrakube"
page_title: "terrakube_organization_template Data Source - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,18 @@ description: |-



## Example Usage

```terraform
data "terrakube_organization" "org" {
name = "simple"
}
data "terrakube_organization_template" "template" {
name = "sample"
organization_id = data.terrakube_organization.org.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 12 additions & 1 deletion docs/data-sources/ssh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_ssh Data Source - terraform-provider-terrakube"
page_title: "terrakube_ssh Data Source - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,18 @@ description: |-



## Example Usage

```terraform
data "terrakube_organization" "org" {
name = "simple"
}
data "terrakube_ssh" "ssh" {
name = "sample"
organization_id = data.terrakube_organization.org.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 12 additions & 1 deletion docs/data-sources/vcs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_vcs Data Source - terraform-provider-terrakube"
page_title: "terrakube_vcs Data Source - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,18 @@ description: |-



## Example Usage

```terraform
data "terrakube_organization" "org" {
name = "simple"
}
data "terrakube_vcs" "vcs" {
name = "sample"
organization_id = data.terrakube_organization.org.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
32 changes: 30 additions & 2 deletions docs/resources/module.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_module Resource - terraform-provider-terrakube"
page_title: "terrakube_module Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,35 @@ description: |-




## Example Usage

```terraform
resource "terrakube_module" "module" {
name = "vpc"
organization_id = data.terrakube_organization.org.id
description = "cloudposse module"
provider_name = "aws"
source = "https://github.com/terraform-aws-modules/terraform-aws-vpc.git"
}
resource "terrakube_module" "module" {
name = "vpc_private"
organization_id = data.terrakube_ssh.ssh.organization_id
description = "cloudposse module"
provider_name = "aws"
source = "https://github.com/terraform-aws-modules/terraform-aws-vpc.git"
vcs_id = data.terrakube_vcs.vcs.id
}
resource "terrakube_module" "module" {
name = "vpc_private_ssh"
organization_id = data.terrakube_ssh.ssh.organization_id
description = "cloudposse module"
provider_name = "aws"
source = "https://github.com/terraform-aws-modules/terraform-aws-vpc.git"
ssh_id = data.terrakube_ssh.ssh.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 9 additions & 1 deletion docs/resources/organization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization Resource - terraform-provider-terrakube"
page_title: "terrakube_organization Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,15 @@ description: |-



## Example Usage

```terraform
resource "terrakube_organization" "organization" {
name = "sample-organization"
description = "sample organization description"
executionModule = "remote"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
9 changes: 8 additions & 1 deletion docs/resources/organization_tag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization_tag Resource - terraform-provider-terrakube"
page_title: "terrakube_organization_tag Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,14 @@ description: |-



## Example Usage

```terraform
resource "terrakube_organization_tag" "example" {
name = "example"
organization_id = terraform.workspace.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
17 changes: 16 additions & 1 deletion docs/resources/organization_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization_template Resource - terraform-provider-terrakube"
page_title: "terrakube_organization_template Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,22 @@ description: |-



## Example Usage

```terraform
resource "terrakube_organization_template" "example" {
name = "example"
organization_id = terrakube_organization.example.id
description = "Example organization template"
version = "1.0.0"
content = <<EOF
flow:
- type: "terraformPlan"
name: "Plan"
step: 100
EOF
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
26 changes: 24 additions & 2 deletions docs/resources/organization_variable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_organization_variable Resource - terraform-provider-terrakube"
page_title: "terrakube_organization_variable Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,29 @@ description: |-




## Example Usage

```terraform
resource "terrakube_organization_variable" "sample1" {
organization_id = data.terrakube_organization.org.id
key = "sample-env-var"
value = "sample-var2"
description = "sample env var2213241243"
category = "ENV"
sensitive = false
hcl = false
}
resource "terrakube_organization_variable" "sample2" {
organization_id = data.terrakube_organization.org.id
key = "sample-terra-var"
value = "sample-terraform234"
description = "sample env var222212341234"
category = "TERRAFORM"
sensitive = false
hcl = false
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
14 changes: 13 additions & 1 deletion docs/resources/team.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_team Resource - terraform-provider-terrakube"
page_title: "terrakube_team Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,19 @@ description: |-



## Example Usage

```terraform
resource "terrakube_team" "team" {
name = "TERRAKUBE_SUPER_ADMIN"
organization_id = data.terrakube_organization.org.id
manage_workspace = false
manage_module = false
manage_provider = true
manage_vcs = true
manage_template = true
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
12 changes: 11 additions & 1 deletion docs/resources/team_token.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_team_token Resource - terraform-provider-terrakube"
page_title: "terrakube_team_token Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
resource "terrakube_team_token" "token1" {
description = "test"
team_name = "AZURE_DEVELOPERS"
days = 1
hours = 1
minutes = 1
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
15 changes: 14 additions & 1 deletion docs/resources/vcs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "terrakube_vcs Resource - terraform-provider-terrakube"
page_title: "terrakube_vcs Resource - terrakube"
subcategory: ""
description: |-
Expand All @@ -10,7 +10,20 @@ description: |-



## Example Usage

```terraform
resource "terrakube_vcs" "vcs" {
organization_id = data.terrakube_organization.org.id
name = "Github"
description = "test github connection"
vcs_type = "GITHUB"
client_id = "Iv1.1b9b7b1b1b1b1b1b"
client_secret = "hellotest"
endpoint = "https://github.com"
api_url = "https://api.github.com"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
Loading

0 comments on commit f00bbc5

Please sign in to comment.