Skip to content

Document the ID field for importing #1274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/resources/project_role_template_binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following arguments are supported:

The following attributes are exported:

* `id` - (Computed) The ID of the resource (string)
* `id` - (Computed) The ID of the resource, e.g. `p-def34-blabla` (string)

## Timeouts

Expand All @@ -57,3 +57,7 @@ Project Role Template Bindings can be imported using the Rancher Project Role Te
$ terraform import rancher2_project_role_template_binding.foo <project_role_template_binding_id>
```

Retrieve the ID from the `projectroletemplatebindings` API URL: look at `id` field of the object with `baseType": "projectRoleTemplateBinding"` and matching name and project ID. The URL is provided by the error message you get if you attempt import with an incorrect ID, for example:
```
Error: Bad response statusCode [404]. Status [404 Not Found]. Body: [message=failed to find resource by id, baseType=error, code=NotFound] from [https://<domain>/v3/projectroletemplatebindings]
```