Skip to content

Commit

Permalink
added import example
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Apr 3, 2024
1 parent 8a0a43f commit 6895203
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/resources/cluster_gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ resource "spectrocloud_cluster_gke" "cluster" {
```

## Import

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import)
to import the resource spectrocloud_cluster_gke by using its `id` with the Palette `context` separated by a colon. For example:

```terraform
import {
to = spectrocloud_cluster_gke.example
id = "example_id:context"
}
```

Using `terraform import`, import the cluster using the `id` colon separated with `context`. For example:

```console
% terraform import spectrocloud_cluster_gke.example example_id:project
```

Refer to the [Import section](/docs#import) to learn more.

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
19 changes: 19 additions & 0 deletions templates/resources/cluster_gke.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,24 @@ resource "spectrocloud_cluster_gke" "cluster" {

```

## Import

In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import)
to import the resource {{ .Name }} by using its `id` with the Palette `context` separated by a colon. For example:

```terraform
import {
to = {{ .Name }}.example
id = "example_id:context"
}
```

Using `terraform import`, import the cluster using the `id` colon separated with `context`. For example:

```console
% terraform import {{ .Name }}.example example_id:project
```

Refer to the [Import section](/docs#import) to learn more.

{{ .SchemaMarkdown | trimspace }}

0 comments on commit 6895203

Please sign in to comment.