Skip to content

Commit

Permalink
Merge pull request #32628 from hashicorp/d-update-skaff-for-new-docs-…
Browse files Browse the repository at this point in the history
…import

skaff: Update website template for new import format
  • Loading branch information
YakDriver authored Jul 20, 2023
2 parents 4f8fd2b + edfac9f commit 5cdce9f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Replace ec2 with the service package corresponding to your tests.
For more information on the `-run` flag, see the `go test` documentation at https://tip.golang.org/cmd/go/#hdr-Testing_flags.
-->

```
$ make testacc TESTS=TestAccXXX PKG=ec2
```console
% make testacc TESTS=TestAccXXX PKG=ec2

...
```
13 changes: 11 additions & 2 deletions skaff/resource/websitedoc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,17 @@ This resource exports the following attributes in addition to the arguments abov

## Import

Import {{ .HumanFriendlyService }} {{ .HumanResourceName }} using the `example_id_arg`. For example:
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import {{ .HumanFriendlyService }} {{ .HumanResourceName }} using the `example_id_arg`. For example:

```terraform
import {
to = aws_{{ .ServicePackage }}_{{ .ResourceSnake }}.example
id = "{{ .ResourceSnake }}-id-12345678"
}
```
$ terraform import aws_{{ .ServicePackage }}_{{ .ResourceSnake }}.example rft-8012925589

Using `terraform import`, import {{ .HumanFriendlyService }} {{ .HumanResourceName }} using the `example_id_arg`. For example:

```console
% terraform import aws_{{ .ServicePackage }}_{{ .ResourceSnake }}.example {{ .ResourceSnake }}-id-12345678
```

0 comments on commit 5cdce9f

Please sign in to comment.