Skip to content

Terraform Import Wizard

Interactive tool to generate balcony terraform import-configurations.

Example Recording: ec2 SecurityGroups

About balcony terraform import-configurations

Balcony can generate import blocks for terraform resources if it knows how to do so.

We can let balcony know how to generate import blocks by creating a .yaml file, that looks like this:

Example terraform import-configuration .yaml file
import_configurations:
  - service: ec2
    resource_node: Instances
    operation_name: DescribeInstances
    to_resource_type: aws_instance
    jmespath_query: "[].Reservations[].Instances[]"
    to_resource_name_jinja2_template: "{{ tag_Name or InstanceId }}"
    id_generator_jinja2_template: "{{ InstanceId }}"

Related docs: About Terraform Import Configurations


About the Wizard

balcony terraform-wizard is an interactive command that helps you generate the import-configurations yaml files.

It asks you questions about the resource you want to import. And validates your answers with confirmation.

This makes it very easy to try and find out the correct configuration for your resource.

Act of Development might require some reading

Please read the related docs before using this feature:

And check out example configurations: Github: balcony/custom_tf_import_configs/*.yaml

Get started

Show help page
balcony terraform-wizard
Show documentation for a specific resource
balcony terraform-wizard iam Role -ls
Start the wizard for a specific resource
balcony terraform-wizard iam Role