-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import: add support for
import
blocks
In Terraform 1.5+, there is now the option to import resources using a HCL block alongside your resources code[1]. This commit updates the `import` command to support that conditional generation if the `—modern-import-block` flag is used. CLI compatible output ``` terraform import cloudflare_ruleset.terraform_managed_resource_c311c194ead8414c985c44eb4710d435 zone/0d555506aec9767e661a2e19e6d4e711/c311c194ead8414c985c44eb4710d435 terraform import cloudflare_ruleset.terraform_managed_resource_64a2203f3c0246bebc2f39b886d54982 zone/0d555506aec9767e661a2e19e6d4e711/64a2203f3c0246bebc2f39b886d54982 ``` HCL block import output ``` import { to = cloudflare_ruleset.terraform_managed_resource_c311c194ead8414c985c44eb4710d435 id = "zone/0d555506aec9767e661a2e19e6d4e711/c311c194ead8414c985c44eb4710d435" } import { to = cloudflare_ruleset.terraform_managed_resource_64a2203f3c0246bebc2f39b886d54982 id = "zone/0d555506aec9767e661a2e19e6d4e711/64a2203f3c0246bebc2f39b886d54982" } ``` [1]: https://developer.hashicorp.com/terraform/language/import
- Loading branch information
1 parent
b9c3de5
commit f2d7beb
Showing
2 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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