generate: Add support for import configuration examples with the id attribute#495
Merged
austinvalle merged 8 commits intomainfrom Jun 30, 2025
Merged
generate: Add support for import configuration examples with the id attribute#495austinvalle merged 8 commits intomainfrom
import configuration examples with the id attribute#495austinvalle merged 8 commits intomainfrom
Conversation
import configuration examples with the id attribute
austinvalle
commented
Jun 17, 2025
austinvalle
commented
Jun 17, 2025
| | `.ExampleFile` | string | Path to the file with the terraform configuration example | | ||
| | `.ProviderName` | string | Canonical provider name (ex. `terraform-provider-random`) | | ||
| | `.ProviderShortName` | string | Short version of the rendered provider name (ex. `random`) | | ||
| | Field | Type | Description | |
Member
Author
There was a problem hiding this comment.
This diff is much cleaner if you hide whitespace in the GitHub UI PR settings 😄
austinvalle
commented
Jun 17, 2025
austinvalle
commented
Jun 17, 2025
SBGoods
previously approved these changes
Jun 18, 2025
Contributor
SBGoods
left a comment
There was a problem hiding this comment.
The change looks good to me overall, just left a comment about the file naming
1 task
9caf681 to
c203513
Compare
SBGoods
approved these changes
Jun 30, 2025
109a6c1 to
efd23ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #472
Some of the acceptance tests I updated used the scaffolding repo, which doesn't have import shell examples in the repo, so I added those here: hashicorp/terraform-provider-scaffolding-framework#306
We probably should add some import configs as well once we release this 👍🏻
Description
This PR adds support for defining an example import TF configuration file in the same location as the existing
import.shfile:examples/resources/<resource name>/import-by-string-id.tfI'm intentionally choosing the
idsuffix following import because identity should probably be it's own config file (import-by-identity.tffor example). Since it has a different TF version requirement and can live next to the other import methods.Rollback Plan
Changes to Security Controls
No