Skip to content
Generate Terraform import IDs from TF files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
generate_tf_ids_aws_route53.py

README.md

Generate Terraform import IDs from TF files.

This repo helps to import "existing" infrastructure to Terraform tfstate.

Some resources have simple structure so they are easy to import like:

terraform import aws_s3_bucket.bucket bucket-name

And some have a bit complex structure but all data are within the TF files like:

terraform import aws_route53_record.myrecord Z4KAPRWWNC7JR_dev.example.com_NS_dev

Also some rely on external data that are not saved in TF files like:

# The zone ID comes from AWS API.
terraform import aws_route53_zone.myzone Z1D633PJN98FT9

So I wrote some scripts to generate the IDs to make it easy to generate the IDs and import them.

You can’t perform that action at this time.