dtan4 / terraforming

Export existing AWS resources to Terraform style (tf, tfstate) / No longer actively maintained
http://terraforming.dtan4.net/
MIT License
4.3k stars 658 forks source link

feat: Filtering imported security groups by IDs #410

Open mumoshu opened 6 years ago

mumoshu commented 6 years ago

terraforming sg now accepts one or more security groups via --group-ids sg-12345 sg-234456. This limits the tf output to include only the two security groups.

Similarly, terraform sg --tfstate --group-ids sg-12345 limits the tfstate output to include only the security group.

An expected use-case to this flag is to gradually migrate hundreds of your security groups under the control of terraform, without worrying about the huge tf/tfstate diff on initial import.

Run terraforming help sg to see the description of the flag:

 bundle exec bin/terraforming help sg
Usage:
  terraforming sg

Options:
  [--group-ids=one two three]                    # Filter exported security groups by IDs
  [--merge=MERGE]                                # tfstate file to merge
  [--overwrite], [--no-overwrite]                # Overwrite existing tfstate
  [--tfstate], [--no-tfstate]                    # Generate tfstate
  [--profile=PROFILE]                            # AWS credentials profile
  [--region=REGION]                              # AWS region
  [--assume=ASSUME]                              # Role ARN to assume
  [--use-bundled-cert], [--no-use-bundled-cert]  # Use the bundled CA certificate from AWS SDK

Security Group
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f3200ef4d82afa05df7d83b96ccfc7e0d1af9ef3 on mumoshu:sg-filtering-by-ids into c1d467becef5645e14ff822860f3fc2a9868c066 on dtan4:master.