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

CloudFrontDistribution resource #433

Closed szemek closed 2 years ago

szemek commented 5 years ago

This pull request is more like a good start than complete implementation of CloudFrontDistribution resource. I'm adding this resource under cfd subcommand.

I appreciate any feedback on that.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 99.582% when pulling 7934260ec7d56f36059212abd29d9b513635cfef on szemek:cloud_front_distribution into 1ba96b958123087dc1454e284ce34cc9c00b69a0 on dtan4:master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 99.582% when pulling 7934260ec7d56f36059212abd29d9b513635cfef on szemek:cloud_front_distribution into 1ba96b958123087dc1454e284ce34cc9c00b69a0 on dtan4:master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 99.582% when pulling 7934260ec7d56f36059212abd29d9b513635cfef on szemek:cloud_front_distribution into 1ba96b958123087dc1454e284ce34cc9c00b69a0 on dtan4:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f0c46436201542c590874583fb68bdf9a16c51a6 on szemek:cloud_front_distribution into 518879dfe36542b8bb1fbd37281ba4a862a920e4 on dtan4:master.

ehershey commented 5 years ago

FWIW I used this successfully to tee up some cloudfront distribution tf configs from existing resources. It worked pretty well overall. I noticed a while later that it had ignored custom error responses on the resources I was basing new distributions on.

Sveder commented 5 years ago

Also tried it out and same experience as @ehershey - worked but without custom error responses.

lsamuels-fearless commented 5 years ago

When I recently used this branch to pull my cloudfront distributions states the resulting terraform state file was invalid because the boolean values in the attributes blocks did not have quotes around them. Relevant attributes: enabled is_ipv6_enabled

jamesarosen commented 5 years ago

It might be nice to sort by id, which is what the S3 importer does:

<% distributions.sort_by(&:id).each do |distribution| %>
rzabarazesh commented 4 years ago

Nice work! I also used this to export a distribution. It missed the custom origin_path for my s3 bucket. other than that, everything seems to be fine.

alysiawu commented 3 years ago

I wonder when this PR can be merged and released? this feature will be pretty helpful to have 👍