Skip to content

feat(tools): validate terraform resource names before import - #13

Open
wulansari999 wants to merge 8 commits into
123a-bcd:mainfrom
wulansari999:main
Open

feat(tools): validate terraform resource names before import#13
wulansari999 wants to merge 8 commits into
123a-bcd:mainfrom
wulansari999:main

Conversation

@wulansari999

Copy link
Copy Markdown

Fixes #1

Validates Terraform resource names against the documented requirement that hyphenated or invalid identifiers can corrupt state.

Implementation details:

  • Added validate_resource_name to reject hyphens and ensure identifiers conform to standard Terraform constraints.
  • Integrated validation inside import_resource, generate_import_script, and dry-run loops.
  • Invalid targets are logged with clear instructions to use underscores, preventing bad strings from reaching the terraform import binary.

Validation Artifacts Attached:
Includes the generated diagnostic .logd and .json from diagnostic/build-46848704.logd.

Password for decryption: 020ee4de804351bc8f1c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[$40 BOUNTY] [Python] Validate Terraform import resource names

3 participants