{
  "version": 4,
  "terraform_version": "0.13.5",
  "serial": 72,
  "lineage": "baf13f49-a91e-4ef3-40f8-b010f53cf030",
  "outputs": {
    "s3_bucket": {
      "value": "prod-onmyojideckbuilder-origin",
      "type": "string"
    },
    "s3_bucket_domain_name": {
      "value": "prod-onmyojideckbuilder-origin.s3-website.eu-west-1.amazonaws.com",
      "type": "string"
    }
  },
  "resources": [
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "data",
      "type": "aws_iam_policy_document",
      "name": "origin",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "id": "637012258",
            "json": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"S3GetObjectForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::${bucket_name}${origin_path}*\",\n      \"Principal\": {\n        \"AWS\": \"${cloudfront_origin_access_identity_iam_arn}\"\n      }\n    },\n    {\n      \"Sid\": \"S3ListBucketForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:ListBucket\",\n      \"Resource\": \"arn:aws:s3:::${bucket_name}\",\n      \"Principal\": {\n        \"AWS\": \"${cloudfront_origin_access_identity_iam_arn}\"\n      }\n    },\n    {\n      \"Sid\": \"PublicRead\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}",
            "override_json": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\":\"PublicRead\",\n      \"Effect\":\"Allow\",\n      \"Principal\":\"*\",\n      \"Action\":[\"s3:GetObject\"],\n      \"Resource\":\"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\"\n    }\n  ]\n}\n",
            "policy_id": null,
            "source_json": null,
            "statement": [
              {
                "actions": [
                  "s3:GetObject"
                ],
                "condition": [],
                "effect": "Allow",
                "not_actions": [],
                "not_principals": [],
                "not_resources": [],
                "principals": [
                  {
                    "identifiers": [
                      "${cloudfront_origin_access_identity_iam_arn}"
                    ],
                    "type": "AWS"
                  }
                ],
                "resources": [
                  "arn:aws:s3:::${bucket_name}${origin_path}*"
                ],
                "sid": "S3GetObjectForCloudFront"
              },
              {
                "actions": [
                  "s3:ListBucket"
                ],
                "condition": [],
                "effect": "Allow",
                "not_actions": [],
                "not_principals": [],
                "not_resources": [],
                "principals": [
                  {
                    "identifiers": [
                      "${cloudfront_origin_access_identity_iam_arn}"
                    ],
                    "type": "AWS"
                  }
                ],
                "resources": [
                  "arn:aws:s3:::${bucket_name}"
                ],
                "sid": "S3ListBucketForCloudFront"
              }
            ],
            "version": "2012-10-17"
          }
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "data",
      "type": "aws_iam_policy_document",
      "name": "origin_website",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "id": "2989024212",
            "json": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"S3GetObjectForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::${bucket_name}${origin_path}*\",\n      \"Principal\": {\n        \"AWS\": \"*\"\n      }\n    },\n    {\n      \"Sid\": \"PublicRead\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}",
            "override_json": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\":\"PublicRead\",\n      \"Effect\":\"Allow\",\n      \"Principal\":\"*\",\n      \"Action\":[\"s3:GetObject\"],\n      \"Resource\":\"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\"\n    }\n  ]\n}\n",
            "policy_id": null,
            "source_json": null,
            "statement": [
              {
                "actions": [
                  "s3:GetObject"
                ],
                "condition": [],
                "effect": "Allow",
                "not_actions": [],
                "not_principals": [],
                "not_resources": [],
                "principals": [
                  {
                    "identifiers": [
                      "*"
                    ],
                    "type": "AWS"
                  }
                ],
                "resources": [
                  "arn:aws:s3:::${bucket_name}${origin_path}*"
                ],
                "sid": "S3GetObjectForCloudFront"
              }
            ],
            "version": "2012-10-17"
          }
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "data",
      "type": "aws_s3_bucket",
      "name": "selected",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "arn": "arn:aws:s3:::prod-onmyojideckbuilder-origin",
            "bucket": "prod-onmyojideckbuilder-origin",
            "bucket_domain_name": "prod-onmyojideckbuilder-origin.s3.amazonaws.com",
            "bucket_regional_domain_name": "prod-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
            "hosted_zone_id": "Z1BKCTXD74EZPE",
            "id": "prod-onmyojideckbuilder-origin",
            "region": "eu-west-1",
            "website_domain": "s3-website-eu-west-1.amazonaws.com",
            "website_endpoint": "prod-onmyojideckbuilder-origin.s3-website-eu-west-1.amazonaws.com"
          }
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "data",
      "type": "template_file",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/template\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "filename": null,
            "id": "d2728ff6ec7bcb2e66ffe5cd0e8a610cec902d51af8660f5da737b296b07277c",
            "rendered": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"S3GetObjectForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": {\n        \"AWS\": \"*\"\n      }\n    },\n    {\n      \"Sid\": \"PublicRead\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}",
            "template": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"S3GetObjectForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::${bucket_name}${origin_path}*\",\n      \"Principal\": {\n        \"AWS\": \"*\"\n      }\n    },\n    {\n      \"Sid\": \"PublicRead\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}",
            "vars": {
              "bucket_name": "prod-onmyojideckbuilder-origin",
              "cloudfront_origin_access_identity_iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1T3NXW4C57SNI",
              "origin_path": "/"
            }
          }
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "managed",
      "type": "aws_cloudfront_distribution",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "schema_version": 1,
          "attributes": {
            "active_trusted_signers": {
              "enabled": "false",
              "items.#": "0"
            },
            "aliases": [
              "onmyojideckbuilder.com"
            ],
            "arn": "arn:aws:cloudfront::745437999005:distribution/E5L0TBPLNYZX7",
            "cache_behavior": [],
            "caller_reference": "terraform-20210319041540786500000002",
            "comment": "Managed by Terraform",
            "custom_error_response": [],
            "default_cache_behavior": [
              {
                "allowed_methods": [
                  "DELETE",
                  "GET",
                  "HEAD",
                  "OPTIONS",
                  "PATCH",
                  "POST",
                  "PUT"
                ],
                "cached_methods": [
                  "GET",
                  "HEAD"
                ],
                "compress": true,
                "default_ttl": 60,
                "field_level_encryption_id": "",
                "forwarded_values": [
                  {
                    "cookies": [
                      {
                        "forward": "none",
                        "whitelisted_names": null
                      }
                    ],
                    "headers": [
                      "Access-Control-Request-Headers",
                      "Access-Control-Request-Method",
                      "Origin"
                    ],
                    "query_string": false,
                    "query_string_cache_keys": null
                  }
                ],
                "lambda_function_association": [],
                "max_ttl": 31536000,
                "min_ttl": 0,
                "smooth_streaming": false,
                "target_origin_id": "prod-onmyojideckbuilder",
                "trusted_signers": [],
                "viewer_protocol_policy": "redirect-to-https"
              }
            ],
            "default_root_object": "index.html",
            "domain_name": "daws4um51qzk4.cloudfront.net",
            "enabled": true,
            "etag": "EJ2IXAOH2KIVR",
            "hosted_zone_id": "Z2FDTNDATAQYW2",
            "http_version": "http2",
            "id": "E5L0TBPLNYZX7",
            "in_progress_validation_batches": 0,
            "is_ipv6_enabled": true,
            "last_modified_time": "2021-03-19 04:15:43.087 +0000 UTC",
            "logging_config": [
              {
                "bucket": "prod-onmyojideckbuilder-logs.s3.amazonaws.com",
                "include_cookies": false,
                "prefix": ""
              }
            ],
            "ordered_cache_behavior": [],
            "origin": [
              {
                "custom_header": [],
                "custom_origin_config": [
                  {
                    "http_port": 80,
                    "https_port": 443,
                    "origin_keepalive_timeout": 5,
                    "origin_protocol_policy": "http-only",
                    "origin_read_timeout": 30,
                    "origin_ssl_protocols": [
                      "TLSv1",
                      "TLSv1.1",
                      "TLSv1.2"
                    ]
                  }
                ],
                "domain_name": "prod-onmyojideckbuilder-origin.s3-website.eu-west-1.amazonaws.com",
                "origin_id": "prod-onmyojideckbuilder",
                "origin_path": "",
                "s3_origin_config": []
              }
            ],
            "origin_group": [],
            "price_class": "PriceClass_100",
            "restrictions": [
              {
                "geo_restriction": [
                  {
                    "locations": null,
                    "restriction_type": "none"
                  }
                ]
              }
            ],
            "retain_on_delete": false,
            "status": "Deployed",
            "tags": {
              "Description": "website to build and share onmyoji decks",
              "Name": "prod-onmyojideckbuilder",
              "Project": "onmyoji-deck-builder",
              "Stage": "prod"
            },
            "viewer_certificate": [
              {
                "acm_certificate_arn": "arn:aws:acm:us-east-1:745437999005:certificate/11502ff4-7851-426f-92ac-27db7c44825f",
                "cloudfront_default_certificate": false,
                "iam_certificate_id": "",
                "minimum_protocol_version": "TLSv1",
                "ssl_support_method": "sni-only"
              }
            ],
            "wait_for_deployment": true,
            "web_acl_id": ""
          },
          "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
          "dependencies": [
            "module.cloudfront_s3_cdn.aws_cloudfront_origin_access_identity.default",
            "module.cloudfront_s3_cdn.aws_s3_bucket.origin",
            "module.cloudfront_s3_cdn.data.aws_s3_bucket.selected",
            "module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
          ]
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "managed",
      "type": "aws_cloudfront_origin_access_identity",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "caller_reference": "terraform-20210319041535137100000001",
            "cloudfront_access_identity_path": "origin-access-identity/cloudfront/E1T3NXW4C57SNI",
            "comment": "prod-onmyojideckbuilder",
            "etag": "E68AOIVG56N5A",
            "iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1T3NXW4C57SNI",
            "id": "E1T3NXW4C57SNI",
            "s3_canonical_user_id": "682642153922ad412e294e6f379b5ae0ae60c161e20e0fd5dc47d5fb1051d3282ab7d7edd050d78e448363fcde4e0a31"
          },
          "private": "bnVsbA=="
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "managed",
      "type": "aws_s3_bucket",
      "name": "origin",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "acceleration_status": "",
            "acl": "private",
            "arn": "arn:aws:s3:::prod-onmyojideckbuilder-origin",
            "bucket": "prod-onmyojideckbuilder-origin",
            "bucket_domain_name": "prod-onmyojideckbuilder-origin.s3.amazonaws.com",
            "bucket_prefix": null,
            "bucket_regional_domain_name": "prod-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
            "cors_rule": [
              {
                "allowed_headers": [
                  "*"
                ],
                "allowed_methods": [
                  "GET",
                  "HEAD",
                  "PUT",
                  "POST"
                ],
                "allowed_origins": [
                  "*.onmyojideckbuilder.com"
                ],
                "expose_headers": [
                  "ETag"
                ],
                "max_age_seconds": 3600
              },
              {
                "allowed_headers": [
                  "*"
                ],
                "allowed_methods": [
                  "GET",
                  "HEAD",
                  "PUT",
                  "POST"
                ],
                "allowed_origins": [
                  "onmyojideckbuilder.com"
                ],
                "expose_headers": [
                  "ETag"
                ],
                "max_age_seconds": 3600
              }
            ],
            "force_destroy": true,
            "grant": [],
            "hosted_zone_id": "Z1BKCTXD74EZPE",
            "id": "prod-onmyojideckbuilder-origin",
            "lifecycle_rule": [],
            "logging": [],
            "object_lock_configuration": [],
            "policy": null,
            "region": "eu-west-1",
            "replication_configuration": [],
            "request_payer": "BucketOwner",
            "server_side_encryption_configuration": [
              {
                "rule": [
                  {
                    "apply_server_side_encryption_by_default": [
                      {
                        "kms_master_key_id": "",
                        "sse_algorithm": "AES256"
                      }
                    ]
                  }
                ]
              }
            ],
            "tags": {
              "Attributes": "origin",
              "Description": "website to build and share onmyoji decks",
              "Name": "prod-onmyojideckbuilder-origin",
              "Project": "onmyoji-deck-builder",
              "Stage": "prod"
            },
            "versioning": [
              {
                "enabled": true,
                "mfa_delete": false
              }
            ],
            "website": [
              {
                "error_document": "index.html",
                "index_document": "index.html",
                "redirect_all_requests_to": "",
                "routing_rules": ""
              }
            ],
            "website_domain": "s3-website-eu-west-1.amazonaws.com",
            "website_endpoint": "prod-onmyojideckbuilder-origin.s3-website-eu-west-1.amazonaws.com"
          },
          "private": "bnVsbA=="
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn",
      "mode": "managed",
      "type": "aws_s3_bucket_policy",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "bucket": "prod-onmyojideckbuilder-origin",
            "id": "prod-onmyojideckbuilder-origin",
            "policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"S3GetObjectForCloudFront\",\n      \"Effect\": \"Allow\",\n      \"Action\": \"s3:GetObject\",\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": {\n        \"AWS\": \"*\"\n      }\n    },\n    {\n      \"Sid\": \"PublicRead\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}"
          },
          "private": "bnVsbA==",
          "dependencies": [
            "module.cloudfront_s3_cdn.aws_cloudfront_origin_access_identity.default",
            "module.cloudfront_s3_cdn.aws_s3_bucket.origin",
            "module.cloudfront_s3_cdn.data.aws_iam_policy_document.origin",
            "module.cloudfront_s3_cdn.data.aws_iam_policy_document.origin_website",
            "module.cloudfront_s3_cdn.data.template_file.default"
          ]
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn.module.dns",
      "mode": "data",
      "type": "aws_route53_zone",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "caller_reference": "481ca519-c2ac-4885-b585-8283334987f7",
            "comment": "",
            "id": "Z0511918V1SF3MCG22JU",
            "linked_service_description": null,
            "linked_service_principal": null,
            "name": "onmyojideckbuilder.com.",
            "name_servers": [
              "ns-1501.awsdns-59.org",
              "ns-1652.awsdns-14.co.uk",
              "ns-176.awsdns-22.com",
              "ns-530.awsdns-02.net"
            ],
            "private_zone": false,
            "resource_record_set_count": 3,
            "tags": {},
            "vpc_id": null,
            "zone_id": "Z0511918V1SF3MCG22JU"
          }
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn.module.dns",
      "mode": "managed",
      "type": "aws_route53_record",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": []
    },
    {
      "module": "module.cloudfront_s3_cdn.module.dns",
      "mode": "managed",
      "type": "aws_route53_record",
      "name": "ipv6",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": []
    },
    {
      "module": "module.cloudfront_s3_cdn.module.logs",
      "mode": "managed",
      "type": "aws_s3_bucket",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "acceleration_status": "",
            "acl": "log-delivery-write",
            "arn": "arn:aws:s3:::prod-onmyojideckbuilder-logs",
            "bucket": "prod-onmyojideckbuilder-logs",
            "bucket_domain_name": "prod-onmyojideckbuilder-logs.s3.amazonaws.com",
            "bucket_prefix": null,
            "bucket_regional_domain_name": "prod-onmyojideckbuilder-logs.s3.eu-west-1.amazonaws.com",
            "cors_rule": [],
            "force_destroy": true,
            "grant": [],
            "hosted_zone_id": "Z1BKCTXD74EZPE",
            "id": "prod-onmyojideckbuilder-logs",
            "lifecycle_rule": [
              {
                "abort_incomplete_multipart_upload_days": 5,
                "enabled": true,
                "expiration": [
                  {
                    "date": "",
                    "days": 90,
                    "expired_object_delete_marker": false
                  }
                ],
                "id": "prod-onmyojideckbuilder-logs",
                "noncurrent_version_expiration": [
                  {
                    "days": 90
                  }
                ],
                "noncurrent_version_transition": [
                  {
                    "days": 30,
                    "storage_class": "GLACIER"
                  }
                ],
                "prefix": "",
                "tags": null,
                "transition": [
                  {
                    "date": "",
                    "days": 30,
                    "storage_class": "STANDARD_IA"
                  },
                  {
                    "date": "",
                    "days": 60,
                    "storage_class": "GLACIER"
                  }
                ]
              }
            ],
            "logging": [],
            "object_lock_configuration": [],
            "policy": "",
            "region": "eu-west-1",
            "replication_configuration": [],
            "request_payer": "BucketOwner",
            "server_side_encryption_configuration": [
              {
                "rule": [
                  {
                    "apply_server_side_encryption_by_default": [
                      {
                        "kms_master_key_id": "",
                        "sse_algorithm": "AES256"
                      }
                    ]
                  }
                ]
              }
            ],
            "tags": {
              "Attributes": "logs",
              "Description": "website to build and share onmyoji decks",
              "Name": "prod-onmyojideckbuilder-logs",
              "Project": "onmyoji-deck-builder",
              "Stage": "prod"
            },
            "versioning": [
              {
                "enabled": false,
                "mfa_delete": false
              }
            ],
            "website": [],
            "website_domain": null,
            "website_endpoint": null
          },
          "private": "bnVsbA=="
        }
      ]
    },
    {
      "module": "module.cloudfront_s3_cdn.module.logs",
      "mode": "managed",
      "type": "aws_s3_bucket_public_access_block",
      "name": "default",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "index_key": 0,
          "schema_version": 0,
          "attributes": {
            "block_public_acls": true,
            "block_public_policy": true,
            "bucket": "prod-onmyojideckbuilder-logs",
            "id": "prod-onmyojideckbuilder-logs",
            "ignore_public_acls": true,
            "restrict_public_buckets": true
          },
          "private": "bnVsbA==",
          "dependencies": [
            "module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
          ]
        }
      ]
    }
  ]
}
