Closed ewbankkit closed 1 month ago
This will help for more than just for composite identifiers. I came here while running into issues importing awscc_chatbot_slack_channel_configuration
, as the documentation said to use resource ID
. Turns out it was resource ARN I needed to use, but that wasn't obvious. This may be due to me being used to documentation explicitly saying arn
, name
, or id
. But in those cases, the AWS Console also shows id
.
If the documentation instead of saying resource ID
said properties/Arn
(whatever the primaryIdentifier
is), it may make this clearer.
Community Note
Description
Resources can be imported using the resource's primary identifier. Usually the format of this identifier is "obvious" but there are some resources whose primary identifier is a composite key. When the documentation for the resource is generated we should do a better job of calling out the ID's format: https://github.com/hashicorp/terraform-provider-awscc/blob/c5f88170f21cad8e2b91ec4a5f1ac70b60d69718/internal/provider/generators/import-examples/main.go#L83
Relates https://github.com/hashicorp/terraform-provider-awscc/issues/688.