Skip to content

Commit

Permalink
added import support
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Nov 13, 2024
1 parent 8b77638 commit 4e8894d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ resource "spectrocloud_role" "custom_role" {
}
```

```
### Importing existing role state & config
```hcl
# import existing user example
import {
to = spectrocloud_role.test_role
id = "{roleUID}"
}
# To generate TF configuration.
terraform plan -generate-config-out=test_role.tf
# To import State file
terraform import spectrocloud_role.test_role {roleUID}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
16 changes: 16 additions & 0 deletions templates/resources/role.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,21 @@ resource "spectrocloud_role" "custom_role" {
}
```

```
### Importing existing role state & config

```hcl
# import existing user example
import {
to = spectrocloud_role.test_role
id = "{roleUID}"
}

# To generate TF configuration.
terraform plan -generate-config-out=test_role.tf

# To import State file
terraform import spectrocloud_role.test_role {roleUID}
```

{{ .SchemaMarkdown | trimspace }}

0 comments on commit 4e8894d

Please sign in to comment.