coinbase/terraform-landscape

CloudFront plans still hard to read

elblivion opened this issue · 2 comments

Hi, thanks for an pretty nifty tool! It's really helped our workflow.

We do a lot of aws_cloudfront_distribution, which by nature of having multiple nested attributes makes for very hard reading (see below, in which we are only adding the lambda_function_association attributes).

I'd love to work on something to improve this in landscape, if you could point me to where best to make such changes.

Thanks!

 default_cache_behavior.1505291189.allowed_methods.#:                                                    "3" => "0"
    default_cache_behavior.1505291189.allowed_methods.0:                                                    "HEAD" => ""
    default_cache_behavior.1505291189.allowed_methods.1:                                                    "GET" => ""
    default_cache_behavior.1505291189.allowed_methods.2:                                                    "OPTIONS" => ""
    default_cache_behavior.1505291189.cached_methods.#:                                                     "3" => "0"
    default_cache_behavior.1505291189.cached_methods.0:                                                     "HEAD" => ""
    default_cache_behavior.1505291189.cached_methods.1:                                                     "GET" => ""
    default_cache_behavior.1505291189.cached_methods.2:                                                     "OPTIONS" => ""
    default_cache_behavior.1505291189.compress:                                                             "true" => "false"
    default_cache_behavior.1505291189.default_ttl:                                                          "86400" => "0"
    default_cache_behavior.1505291189.forwarded_values.#:                                                   "1" => "0"
    default_cache_behavior.1505291189.forwarded_values.2555876073.cookies.#:                                "1" => "0"
    default_cache_behavior.1505291189.forwarded_values.2555876073.cookies.2625240281.forward:               "none" => ""
    default_cache_behavior.1505291189.forwarded_values.2555876073.query_string:                             "true" => "false"
    default_cache_behavior.1505291189.max_ttl:                                                              "31536000" => "0"
    default_cache_behavior.1505291189.target_origin_id:                                                     "Custom" => ""
    default_cache_behavior.1505291189.viewer_protocol_policy:                                               "allow-all" => ""
    default_cache_behavior.1723246047.allowed_methods.#:                                                    "0" => "3"
    default_cache_behavior.1723246047.allowed_methods.0:                                                    "" => "GET"
    default_cache_behavior.1723246047.allowed_methods.1:                                                    "" => "HEAD"
    default_cache_behavior.1723246047.allowed_methods.2:                                                    "" => "OPTIONS"
    default_cache_behavior.1723246047.cached_methods.#:                                                     "0" => "3"
    default_cache_behavior.1723246047.cached_methods.0:                                                     "" => "GET"
    default_cache_behavior.1723246047.cached_methods.1:                                                     "" => "HEAD"
    default_cache_behavior.1723246047.cached_methods.2:                                                     "" => "OPTIONS"
    default_cache_behavior.1723246047.compress:                                                             "" => "true"
    default_cache_behavior.1723246047.default_ttl:                                                          "" => "86400"
    default_cache_behavior.1723246047.forwarded_values.#:                                                   "0" => "1"
    default_cache_behavior.1723246047.forwarded_values.1554703779.cookies.#:                                "0" => "1"
    default_cache_behavior.1723246047.forwarded_values.1554703779.cookies.184929039.forward:                "" => "whitelist"
    default_cache_behavior.1723246047.forwarded_values.1554703779.cookies.184929039.whitelisted_names.#:    "0" => "1"
    default_cache_behavior.1723246047.forwarded_values.1554703779.cookies.184929039.whitelisted_names.0:    "" => "Region"
    default_cache_behavior.1723246047.forwarded_values.1554703779.query_string:                             "" => "true"
    default_cache_behavior.1723246047.lambda_function_association.#:                                        "0" => "2"
    default_cache_behavior.1723246047.lambda_function_association.1324497559.event_type:                    "" => "origin-request"
    default_cache_behavior.1723246047.lambda_function_association.1324497559.include_body:                  "" => "false"
    default_cache_behavior.1723246047.lambda_function_association.1324497559.lambda_arn:                    "" => "<redacted>"
    default_cache_behavior.1723246047.lambda_function_association.571756849.event_type:                     "" => "origin-response"
    default_cache_behavior.1723246047.lambda_function_association.571756849.include_body:                   "" => "false"
    default_cache_behavior.1723246047.lambda_function_association.571756849.lambda_arn:                     "" => "<redacted>"
    default_cache_behavior.1723246047.max_ttl:                                                              "" => "31536000"
    default_cache_behavior.1723246047.min_ttl:                                                              "" => "0"
    default_cache_behavior.1723246047.target_origin_id:                                                     "" => "Custom"
    default_cache_behavior.1723246047.viewer_protocol_policy:      
sds commented

Hey @elblivion, this request is very similar to #60.

We're very open to someone implementing a solution where you can define plugins to reformat output for certain resources.

sds commented

Tracking in #108.