{ "version": 4, "terraform_version": "0.13.5", "serial": 14, "lineage": "baf13f49-a91e-4ef3-40f8-b010f53cf030", "outputs": { "s3_bucket": { "value": "prod-onmyojideckbuilder-origin", "type": "string" }, "s3_bucket_domain_name": { "value": "prod-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com", "type": "string" } }, "resources": [ { "mode": "data", "type": "archive_file", "name": "lambda_main", "provider": "provider[\"registry.terraform.io/hashicorp/archive\"]", "instances": [ { "schema_version": 0, "attributes": { "excludes": null, "id": "320d4868dd37d1674e98bd790b8a54b006838d04", "output_base64sha256": "5EVmwQDkgGfYMpMXNaWHUz3cmb/dSssoWl8mM8o3aMs=", "output_md5": "611fc9e8b494e4b399217f632b8e35ed", "output_path": "./lambda/main.js.zip", "output_sha": "320d4868dd37d1674e98bd790b8a54b006838d04", "output_size": 601, "source": [], "source_content": null, "source_content_filename": null, "source_dir": null, "source_file": "./lambda/main.js", "type": "zip" } } ] }, { "mode": "managed", "type": "aws_iam_policy", "name": "lambda_logging", "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { "schema_version": 0, "attributes": { "arn": "arn:aws:iam::745437999005:policy/prod-onmyojideckbuilder-lambda_logging", "description": "", "id": "arn:aws:iam::745437999005:policy/prod-onmyojideckbuilder-lambda_logging", "name": "prod-onmyojideckbuilder-lambda_logging", "name_prefix": null, "path": "/", "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\"\n ],\n \"Resource\": \"arn:aws:logs:*:*:*\",\n \"Effect\": \"Allow\"\n }\n ]\n}\n" }, "private": "bnVsbA==" } ] }, { "mode": "managed", "type": "aws_iam_role", "name": "lambda_role", "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { "schema_version": 0, "attributes": { "arn": "arn:aws:iam::745437999005:role/prod-onmyojideckbuilder-lambda", "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"lambda.amazonaws.com\",\"edgelambda.amazonaws.com\"]},\"Action\":\"sts:AssumeRole\"}]}", "create_date": "2021-03-18T00:54:31Z", "description": "", "force_detach_policies": false, "id": "prod-onmyojideckbuilder-lambda", "max_session_duration": 3600, "name": "prod-onmyojideckbuilder-lambda", "name_prefix": null, "path": "/", "permissions_boundary": null, "tags": { "Description": "website to build and share onmyoji decks", "Project": "onmyoji-deck-builder" }, "unique_id": "AROA23D4RF6OTBMEPSDVE" }, "private": "bnVsbA==" } ] }, { "mode": "managed", "type": "aws_iam_role_policy_attachment", "name": "lambda_logging", "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { "schema_version": 0, "attributes": { "id": "prod-onmyojideckbuilder-lambda-20210318005433729100000002", "policy_arn": "arn:aws:iam::745437999005:policy/prod-onmyojideckbuilder-lambda_logging", "role": "prod-onmyojideckbuilder-lambda" }, "private": "bnVsbA==", "dependencies": [ "aws_iam_policy.lambda_logging", "aws_iam_role.lambda_role" ] } ] }, { "mode": "managed", "type": "aws_lambda_function", "name": "directory_indexes", "provider": "provider[\"registry.terraform.io/hashicorp/aws\"].us_east_1", "instances": [ { "schema_version": 0, "attributes": { "arn": "arn:aws:lambda:us-east-1:745437999005:function:prod-onmyojideckbuilder-directory_indexes", "dead_letter_config": [], "description": "", "environment": [], "file_system_config": [], "filename": "./lambda/main.js.zip", "function_name": "prod-onmyojideckbuilder-directory_indexes", "handler": "main.handler", "id": "prod-onmyojideckbuilder-directory_indexes", "invoke_arn": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:745437999005:function:prod-onmyojideckbuilder-directory_indexes/invocations", "kms_key_arn": "", "last_modified": "2021-03-18T00:54:40.108+0000", "layers": null, "memory_size": 128, "publish": true, "qualified_arn": "arn:aws:lambda:us-east-1:745437999005:function:prod-onmyojideckbuilder-directory_indexes:1", "reserved_concurrent_executions": -1, "role": "arn:aws:iam::745437999005:role/prod-onmyojideckbuilder-lambda", "runtime": "nodejs12.x", "s3_bucket": null, "s3_key": null, "s3_object_version": null, "source_code_hash": "5EVmwQDkgGfYMpMXNaWHUz3cmb/dSssoWl8mM8o3aMs=", "source_code_size": 601, "tags": { "Description": "website to build and share onmyoji decks", "Project": "onmyoji-deck-builder" }, "timeout": 3, "timeouts": null, "tracing_config": [ { "mode": "PassThrough" } ], "version": "1", "vpc_config": [] }, "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDB9fQ==", "dependencies": [ "aws_iam_policy.lambda_logging", "aws_iam_role.lambda_role", "aws_iam_role_policy_attachment.lambda_logging", "data.archive_file.lambda_main" ] } ] }, { "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": null, "website_endpoint": null } } ] }, { "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": "fe3f480e1db2aede6d6d5ec8f112356a914f3fe62dc64248e9a9ee28c0b51963", "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\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7\"\n }\n },\n {\n \"Sid\": \"S3ListBucketForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:ListBucket\",\n \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7\"\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\": \"${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}", "vars": { "bucket_name": "prod-onmyojideckbuilder-origin", "cloudfront_origin_access_identity_iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7", "origin_path": "/" } } } ] }, { "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-20210318005431202400000001", "cloudfront_access_identity_path": "origin-access-identity/cloudfront/E2UDO80PGVO0I7", "comment": "prod-onmyojideckbuilder", "etag": "E1TCA4Q1CA5VJS", "iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7", "id": "E2UDO80PGVO0I7", "s3_canonical_user_id": "0cfcad41a6b0276d057a0ebf19d20c199a1506b2fff651979fa92da43f68347b1f60e881f157f22b76dde44b55009f31" }, "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": [], "website_domain": null, "website_endpoint": null }, "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\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7\"\n }\n },\n {\n \"Sid\": \"S3ListBucketForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:ListBucket\",\n \"Resource\": \"arn:aws:s3:::prod-onmyojideckbuilder-origin\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2UDO80PGVO0I7\"\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.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" ] } ] } ] }