Skip to content

Commit

Permalink
add import block example
Browse files Browse the repository at this point in the history
  • Loading branch information
paulxll committed Mar 6, 2025
1 parent a0bd26a commit 56cfdb4
Show file tree
Hide file tree
Showing 24 changed files with 274 additions and 4 deletions.
11 changes: 11 additions & 0 deletions docs/resources/bigquery_datamart_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,17 @@ Optional:

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_bigquery_datamart_definition (Resource). For example:

```terraform
import {
id = 1
to = trocco_bigquery_datamart_definition.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_bigquery_datamart_definition.example <id>
```
Expand Down
11 changes: 11 additions & 0 deletions docs/resources/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,17 @@ resource "trocco_connection" "postgresql" {

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_connection (Resource). For example:

```terraform
import {
id = 1
to = trocco_connection.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_connection.example <connection_type>,<id>
```
Expand Down
11 changes: 11 additions & 0 deletions docs/resources/job_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2457,6 +2457,17 @@ Optional:

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_job_definition (Resource). For example:

```terraform
import {
id = 1
to = trocco_job_definition.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_job_definition.example <job_definition_id>
```
Expand Down
15 changes: 14 additions & 1 deletion docs/resources/label.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "trocco_label Resource - trocco"
subcategory: ""
description: |-
Expand Down Expand Up @@ -36,10 +35,24 @@ resource "trocco_label" "example" {

- `id` (Number) The ID of the label.



## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_label (Resource). For example:

```terraform
import {
id = 1
to = trocco_label.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_label.example <label_id>
```

11 changes: 11 additions & 0 deletions docs/resources/pipeline_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,17 @@ Required:

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_pipeline_definition (Resource). For example:

```terraform
import {
id = 1
to = trocco_pipeline_definition.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_pipeline_definition.example <id>
```
Expand Down
16 changes: 15 additions & 1 deletion docs/resources/resource_group.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "trocco_resource_group Resource - trocco"
subcategory: ""
description: |-
Expand Down Expand Up @@ -53,10 +52,25 @@ Required:
- `role` (String) The role of the team. Valid values are `administrator`, `editor`, `operator`, `viewer`.
- `team_id` (Number) The team ID of the role.




## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_resource_group (Resource). For example:

```terraform
import {
id = 1
to = trocco_resource_group.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_resource.import_resource_group <resource_group_id>
```

16 changes: 15 additions & 1 deletion docs/resources/team.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "trocco_team Resource - trocco"
subcategory: ""
description: |-
Expand Down Expand Up @@ -53,10 +52,25 @@ Required:
- `role` (String) The role of the team member. Valid values are `team_admin` or `team_member`.
- `user_id` (Number) The user ID of the team member.




## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_team (Resource). For example:

```terraform
import {
id = 1
to = trocco_team.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_team.import_team <team_id>
```

15 changes: 14 additions & 1 deletion docs/resources/user.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "trocco_user Resource - trocco"
subcategory: ""
description: |-
Expand Down Expand Up @@ -40,10 +39,24 @@ resource "trocco_user" "example" {

- `id` (Number) The ID of the user.



## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import trocco_user (Resource). For example:

```terraform
import {
id = 1
to = trocco_user.example
}
```

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

```shell
terraform import trocco_user.example <user_id>
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_bigquery_datamart_definition.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_connection/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_connection.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_job_definition/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_job_definition.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_label/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_label.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_pipeline_definition/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_pipeline_definition.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_resource_group/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_resource_group.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_team/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_team.example
}
4 changes: 4 additions & 0 deletions examples/resources/trocco_user/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = 1
to = trocco_user.example
}
6 changes: 6 additions & 0 deletions templates/resources/bigquery_datamart_definition.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,11 @@ description: |-

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_bigquery_datamart_definition/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_bigquery_datamart_definition/import.sh"}}

6 changes: 6 additions & 0 deletions templates/resources/connection.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ description: |-

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_connection/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_connection/import.sh"}}

6 changes: 6 additions & 0 deletions templates/resources/job_definition.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,11 @@ Minimum configuration

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_job_definition/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_job_definition/import.sh"}}

29 changes: 29 additions & 0 deletions templates/resources/label.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderShortName}}"
subcategory: ""
description: |-
{{.Description}}
---

# {{.Name}} ({{.Type}})

{{.Description}}

## Example Usage

{{codefile "terraform" "examples/resources/trocco_label/resource.tf"}}

{{.SchemaMarkdown}}

## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_label/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_label/import.sh"}}

6 changes: 6 additions & 0 deletions templates/resources/pipeline_definition.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,11 @@ description: |-

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_pipeline_definition/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_pipeline_definition/import.sh"}}

29 changes: 29 additions & 0 deletions templates/resources/resource_group.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderShortName}}"
subcategory: ""
description: |-
{{.Description}}
---

# {{.Name}} ({{.Type}})

{{.Description}}

## Example Usage

{{codefile "terraform" "examples/resources/trocco_resource_group/resource.tf"}}

{{.SchemaMarkdown}}

## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_resource_group/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_resource_group/import.sh"}}

29 changes: 29 additions & 0 deletions templates/resources/team.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderShortName}}"
subcategory: ""
description: |-
{{.Description}}
---

# {{.Name}} ({{.Type}})

{{.Description}}

## Example Usage

{{codefile "terraform" "examples/resources/trocco_team/resource.tf"}}

{{.SchemaMarkdown}}

## Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{.Name}} ({{.Type}}). For example:

{{codefile "terraform" "examples/resources/trocco_team/import.tf"}}

Using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import):

{{codefile "shell" "examples/resources/trocco_team/import.sh"}}

Loading

0 comments on commit 56cfdb4

Please sign in to comment.