updating tf deployment

This commit is contained in:
2021-03-21 03:36:10 +00:00
parent 56c20da7ac
commit 7322be7381
3 changed files with 707 additions and 856 deletions

View File

@@ -1,157 +1,757 @@
{
"version": 4,
"terraform_version": "0.13.5",
"serial": 31,
"serial": 49,
"lineage": "9232bec8-e306-d87e-d0ff-5f5901d34c76",
"outputs": {},
"outputs": {
"cf_arn": {
"value": "arn:aws:cloudfront::745437999005:distribution/E26NAB6HJPHQMZ",
"type": "string"
},
"cf_domain_name": {
"value": "d1dkwcezyo6np1.cloudfront.net",
"type": "string"
},
"cf_etag": {
"value": "ECAIV649D3TA1",
"type": "string"
},
"cf_hosted_zone_id": {
"value": "Z2FDTNDATAQYW2",
"type": "string"
},
"cf_id": {
"value": "E26NAB6HJPHQMZ",
"type": "string"
},
"cf_status": {
"value": "Deployed",
"type": "string"
},
"s3_bucket": {
"value": "dev-onmyojideckbuilder-origin",
"type": "string"
},
"s3_bucket_domain_name": {
"value": "dev-onmyojideckbuilder-origin.s3-website.eu-west-1.amazonaws.com",
"type": "string"
}
},
"resources": [
{
"module": "module.cloudfront_s3_cdn",
"mode": "data",
"type": "archive_file",
"name": "lambda_main",
"provider": "provider[\"registry.terraform.io/hashicorp/archive\"]",
"type": "aws_iam_policy_document",
"name": "origin",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"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"
"id": "1888516152",
"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:::dev-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:::dev-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"
}
}
]
},
{
"mode": "managed",
"type": "aws_iam_policy",
"name": "lambda_logging",
"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": {
"arn": "arn:aws:iam::745437999005:policy/dev-onmyojideckbuilder-lambda_logging",
"description": "",
"id": "arn:aws:iam::745437999005:policy/dev-onmyojideckbuilder-lambda_logging",
"name": "dev-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=="
"id": "1923286579",
"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:::dev-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:::dev-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"
}
}
]
},
{
"mode": "managed",
"type": "aws_iam_role",
"name": "lambda_role",
"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:iam::745437999005:role/dev-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-19T03:02:49Z",
"description": "",
"force_detach_policies": false,
"id": "dev-onmyojideckbuilder-lambda",
"max_session_duration": 3600,
"name": "dev-onmyojideckbuilder-lambda",
"name_prefix": null,
"path": "/",
"permissions_boundary": null,
"arn": "arn:aws:s3:::dev-onmyojideckbuilder-origin",
"bucket": "dev-onmyojideckbuilder-origin",
"bucket_domain_name": "dev-onmyojideckbuilder-origin.s3.amazonaws.com",
"bucket_regional_domain_name": "dev-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-onmyojideckbuilder-origin",
"region": "eu-west-1",
"website_domain": "s3-website-eu-west-1.amazonaws.com",
"website_endpoint": "dev-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": "8de579f1267cb043b75ce0d0ec7c7438cfe63eb53e5f5526712c645342ab2104",
"rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"S3GetObjectForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:GetObject\",\n \"Resource\": \"arn:aws:s3:::dev-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:::dev-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:::dev-onmyojideckbuilder-origin/*\",\n \"Principal\": \"*\"\n }\n ]\n}",
"vars": {
"bucket_name": "dev-onmyojideckbuilder-origin",
"cloudfront_origin_access_identity_iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1N6NEL2NFYLEC",
"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": [
"dev.onmyojideckbuilder.com"
],
"arn": "arn:aws:cloudfront::745437999005:distribution/E26NAB6HJPHQMZ",
"cache_behavior": [],
"caller_reference": "terraform-20210319043915752700000002",
"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": "dev-onmyojideckbuilder",
"trusted_signers": [],
"viewer_protocol_policy": "redirect-to-https"
}
],
"default_root_object": "index.html",
"domain_name": "d1dkwcezyo6np1.cloudfront.net",
"enabled": true,
"etag": "ECAIV649D3TA1",
"hosted_zone_id": "Z2FDTNDATAQYW2",
"http_version": "http2",
"id": "E26NAB6HJPHQMZ",
"in_progress_validation_batches": 0,
"is_ipv6_enabled": true,
"last_modified_time": "2021-03-19 04:39:18.131 +0000 UTC",
"logging_config": [
{
"bucket": "dev-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": "dev-onmyojideckbuilder-origin.s3-website.eu-west-1.amazonaws.com",
"origin_id": "dev-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",
"Project": "onmyoji-deck-builder"
"Name": "dev-onmyojideckbuilder",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"unique_id": "AROA23D4RF6O5CZILWBI3"
"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": "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": "dev-onmyojideckbuilder-lambda-20210319030251359100000002",
"policy_arn": "arn:aws:iam::745437999005:policy/dev-onmyojideckbuilder-lambda_logging",
"role": "dev-onmyojideckbuilder-lambda"
},
"private": "bnVsbA==",
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
"dependencies": [
"aws_iam_policy.lambda_logging",
"aws_iam_role.lambda_role"
"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_lambda_function",
"name": "directory_indexes",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"].us_east_1",
"type": "aws_cloudfront_origin_access_identity",
"name": "default",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"index_key": 0,
"schema_version": 0,
"attributes": {
"arn": "arn:aws:lambda:us-east-1:745437999005:function:dev-onmyojideckbuilder-directory_indexes",
"dead_letter_config": [],
"description": "",
"environment": [],
"file_system_config": [],
"filename": "./lambda/main.js.zip",
"function_name": "dev-onmyojideckbuilder-directory_indexes",
"handler": "main.handler",
"id": "dev-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:dev-onmyojideckbuilder-directory_indexes/invocations",
"kms_key_arn": "",
"last_modified": "2021-03-19T03:02:57.785+0000",
"layers": [],
"memory_size": 128,
"publish": true,
"qualified_arn": "arn:aws:lambda:us-east-1:745437999005:function:dev-onmyojideckbuilder-directory_indexes:1",
"reserved_concurrent_executions": -1,
"role": "arn:aws:iam::745437999005:role/dev-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": [
"caller_reference": "terraform-20210319043839499500000001",
"cloudfront_access_identity_path": "origin-access-identity/cloudfront/E1N6NEL2NFYLEC",
"comment": "dev-onmyojideckbuilder",
"etag": "E1DPF7M9GL23MB",
"iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1N6NEL2NFYLEC",
"id": "E1N6NEL2NFYLEC",
"s3_canonical_user_id": "501de5fa8b08f19123f2333f616fcfe27d5308a3a2e9bba045758f8d911f3561d3d036204c5b518255cff676cd72a45b"
},
"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:::dev-onmyojideckbuilder-origin",
"bucket": "dev-onmyojideckbuilder-origin",
"bucket_domain_name": "dev-onmyojideckbuilder-origin.s3.amazonaws.com",
"bucket_prefix": null,
"bucket_regional_domain_name": "dev-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
"cors_rule": [
{
"mode": "PassThrough"
"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": [
"dev.onmyojideckbuilder.com"
],
"expose_headers": [
"ETag"
],
"max_age_seconds": 3600
}
],
"version": "1",
"vpc_config": []
"force_destroy": true,
"grant": [],
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-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": "dev-onmyojideckbuilder-origin",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"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": "dev-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": "dev-onmyojideckbuilder-origin",
"id": "dev-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:::dev-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:::dev-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": 5,
"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": [
{
"index_key": 0,
"schema_version": 2,
"attributes": {
"alias": [
{
"evaluate_target_health": false,
"name": "d1dkwcezyo6np1.cloudfront.net",
"zone_id": "Z2FDTNDATAQYW2"
}
],
"allow_overwrite": false,
"failover_routing_policy": [],
"fqdn": "dev.onmyojideckbuilder.com",
"geolocation_routing_policy": [],
"health_check_id": null,
"id": "Z0511918V1SF3MCG22JU_dev.onmyojideckbuilder.com_A",
"latency_routing_policy": [],
"multivalue_answer_routing_policy": null,
"name": "dev.onmyojideckbuilder.com",
"records": null,
"set_identifier": null,
"ttl": null,
"type": "A",
"weighted_routing_policy": [],
"zone_id": "Z0511918V1SF3MCG22JU"
},
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==",
"dependencies": [
"module.cloudfront_s3_cdn.aws_cloudfront_distribution.default",
"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.dns.data.aws_route53_zone.default",
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
]
}
]
},
{
"module": "module.cloudfront_s3_cdn.module.dns",
"mode": "managed",
"type": "aws_route53_record",
"name": "ipv6",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"index_key": 0,
"schema_version": 2,
"attributes": {
"alias": [
{
"evaluate_target_health": false,
"name": "d1dkwcezyo6np1.cloudfront.net",
"zone_id": "Z2FDTNDATAQYW2"
}
],
"allow_overwrite": false,
"failover_routing_policy": [],
"fqdn": "dev.onmyojideckbuilder.com",
"geolocation_routing_policy": [],
"health_check_id": null,
"id": "Z0511918V1SF3MCG22JU_dev.onmyojideckbuilder.com_AAAA",
"latency_routing_policy": [],
"multivalue_answer_routing_policy": null,
"name": "dev.onmyojideckbuilder.com",
"records": null,
"set_identifier": null,
"ttl": null,
"type": "AAAA",
"weighted_routing_policy": [],
"zone_id": "Z0511918V1SF3MCG22JU"
},
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==",
"dependencies": [
"module.cloudfront_s3_cdn.aws_cloudfront_distribution.default",
"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.dns.data.aws_route53_zone.default",
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.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:::dev-onmyojideckbuilder-logs",
"bucket": "dev-onmyojideckbuilder-logs",
"bucket_domain_name": "dev-onmyojideckbuilder-logs.s3.amazonaws.com",
"bucket_prefix": null,
"bucket_regional_domain_name": "dev-onmyojideckbuilder-logs.s3.eu-west-1.amazonaws.com",
"cors_rule": [],
"force_destroy": true,
"grant": [],
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-onmyojideckbuilder-logs",
"lifecycle_rule": [
{
"abort_incomplete_multipart_upload_days": 5,
"enabled": true,
"expiration": [
{
"date": "",
"days": 90,
"expired_object_delete_marker": false
}
],
"id": "dev-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": "dev-onmyojideckbuilder-logs",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"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": "dev-onmyojideckbuilder-logs",
"id": "dev-onmyojideckbuilder-logs",
"ignore_public_acls": true,
"restrict_public_buckets": true
},
"private": "bnVsbA==",
"dependencies": [
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
]
}
]
}
]
}

View File

@@ -1,69 +1,15 @@
{
"version": 4,
"terraform_version": "0.13.5",
"serial": 17,
"serial": 32,
"lineage": "9232bec8-e306-d87e-d0ff-5f5901d34c76",
"outputs": {
"cf_arn": {
"value": "arn:aws:cloudfront::745437999005:distribution/E26QN6RRQRWYWL",
"type": "string"
},
"cf_domain_name": {
"value": "d2x94vjdgw7i2d.cloudfront.net",
"type": "string"
},
"cf_etag": {
"value": "E17BC20562UZDI",
"type": "string"
},
"cf_hosted_zone_id": {
"value": "Z2FDTNDATAQYW2",
"type": "string"
},
"cf_id": {
"value": "E26QN6RRQRWYWL",
"type": "string"
},
"cf_status": {
"value": "Deployed",
"type": "string"
},
"s3_bucket": {
"value": "dev-onmyojideckbuilder-origin",
"type": "string"
},
"s3_bucket_domain_name": {
"value": "dev-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
"value": "",
"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",
@@ -157,7 +103,7 @@
"invoke_arn": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:745437999005:function:dev-onmyojideckbuilder-directory_indexes/invocations",
"kms_key_arn": "",
"last_modified": "2021-03-19T03:02:57.785+0000",
"layers": null,
"layers": [],
"memory_size": 128,
"publish": true,
"qualified_arn": "arn:aws:lambda:us-east-1:745437999005:function:dev-onmyojideckbuilder-directory_indexes:1",
@@ -182,475 +128,10 @@
],
"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": "1888516152",
"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:::dev-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:::dev-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": "1923286579",
"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:::dev-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:::dev-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:::dev-onmyojideckbuilder-origin",
"bucket": "dev-onmyojideckbuilder-origin",
"bucket_domain_name": "dev-onmyojideckbuilder-origin.s3.amazonaws.com",
"bucket_regional_domain_name": "dev-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-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": "abe7f8da350b4684c009a2f2f592539d4da30df5dbd3ec6d48e40259ca6af1c0",
"rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"S3GetObjectForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:GetObject\",\n \"Resource\": \"arn:aws:s3:::dev-onmyojideckbuilder-origin/*\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU\"\n }\n },\n {\n \"Sid\": \"S3ListBucketForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:ListBucket\",\n \"Resource\": \"arn:aws:s3:::dev-onmyojideckbuilder-origin\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU\"\n }\n },\n {\n \"Sid\": \"PublicRead\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:GetObject\"\n ],\n \"Resource\": \"arn:aws:s3:::dev-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:::dev-onmyojideckbuilder-origin/*\",\n \"Principal\": \"*\"\n }\n ]\n}",
"vars": {
"bucket_name": "dev-onmyojideckbuilder-origin",
"cloudfront_origin_access_identity_iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU",
"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": [
"dev.onmyojideckbuilder.com"
],
"arn": "arn:aws:cloudfront::745437999005:distribution/E26QN6RRQRWYWL",
"cache_behavior": [],
"caller_reference": "terraform-20210319030304382400000003",
"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": [
{
"event_type": "origin-request",
"include_body": false,
"lambda_arn": "arn:aws:lambda:us-east-1:745437999005:function:dev-onmyojideckbuilder-directory_indexes:1"
}
],
"max_ttl": 31536000,
"min_ttl": 0,
"smooth_streaming": false,
"target_origin_id": "dev-onmyojideckbuilder",
"trusted_signers": [],
"viewer_protocol_policy": "redirect-to-https"
}
],
"default_root_object": "index.html",
"domain_name": "d2x94vjdgw7i2d.cloudfront.net",
"enabled": true,
"etag": "E17BC20562UZDI",
"hosted_zone_id": "Z2FDTNDATAQYW2",
"http_version": "http2",
"id": "E26QN6RRQRWYWL",
"in_progress_validation_batches": 0,
"is_ipv6_enabled": true,
"last_modified_time": "2021-03-19 03:03:06.81 +0000 UTC",
"logging_config": [
{
"bucket": "dev-onmyojideckbuilder-logs.s3.amazonaws.com",
"include_cookies": false,
"prefix": ""
}
],
"ordered_cache_behavior": [],
"origin": [
{
"custom_header": [],
"custom_origin_config": [],
"domain_name": "dev-onmyojideckbuilder-origin.s3.eu-west-1.amazonaws.com",
"origin_id": "dev-onmyojideckbuilder",
"origin_path": "",
"s3_origin_config": [
{
"origin_access_identity": "origin-access-identity/cloudfront/E1UEUM41WQK5JU"
}
]
}
],
"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": "dev-onmyojideckbuilder",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"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": [
"aws_iam_policy.lambda_logging",
"aws_iam_role.lambda_role",
"aws_iam_role_policy_attachment.lambda_logging",
"aws_lambda_function.directory_indexes",
"data.archive_file.lambda_main",
"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-20210319030249312700000001",
"cloudfront_access_identity_path": "origin-access-identity/cloudfront/E1UEUM41WQK5JU",
"comment": "dev-onmyojideckbuilder",
"etag": "E2JOLG4NEGN166",
"iam_arn": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU",
"id": "E1UEUM41WQK5JU",
"s3_canonical_user_id": "f4cc20ef906ac3e3520bb2d17bd4b7348eb7aedbcc4e9777821743621a394341f556a81a9a0fe994e2d52b0327d7c815"
},
"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:::dev-onmyojideckbuilder-origin",
"bucket": "dev-onmyojideckbuilder-origin",
"bucket_domain_name": "dev-onmyojideckbuilder-origin.s3.amazonaws.com",
"bucket_prefix": null,
"bucket_regional_domain_name": "dev-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": [
"dev.onmyojideckbuilder.com"
],
"expose_headers": [
"ETag"
],
"max_age_seconds": 3600
}
],
"force_destroy": true,
"grant": [],
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-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": "dev-onmyojideckbuilder-origin",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"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": "dev-onmyojideckbuilder-origin",
"id": "dev-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:::dev-onmyojideckbuilder-origin/*\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU\"\n }\n },\n {\n \"Sid\": \"S3ListBucketForCloudFront\",\n \"Effect\": \"Allow\",\n \"Action\": \"s3:ListBucket\",\n \"Resource\": \"arn:aws:s3:::dev-onmyojideckbuilder-origin\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1UEUM41WQK5JU\"\n }\n },\n {\n \"Sid\": \"PublicRead\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:GetObject\"\n ],\n \"Resource\": \"arn:aws:s3:::dev-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",
@@ -682,236 +163,6 @@
}
}
]
},
{
"module": "module.cloudfront_s3_cdn.module.dns",
"mode": "managed",
"type": "aws_route53_record",
"name": "default",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"index_key": 0,
"schema_version": 2,
"attributes": {
"alias": [
{
"evaluate_target_health": false,
"name": "d2x94vjdgw7i2d.cloudfront.net",
"zone_id": "Z2FDTNDATAQYW2"
}
],
"allow_overwrite": false,
"failover_routing_policy": [],
"fqdn": "dev.onmyojideckbuilder.com",
"geolocation_routing_policy": [],
"health_check_id": null,
"id": "Z0511918V1SF3MCG22JU_dev.onmyojideckbuilder.com_A",
"latency_routing_policy": [],
"multivalue_answer_routing_policy": null,
"name": "dev.onmyojideckbuilder.com",
"records": null,
"set_identifier": null,
"ttl": null,
"type": "A",
"weighted_routing_policy": [],
"zone_id": "Z0511918V1SF3MCG22JU"
},
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==",
"dependencies": [
"aws_iam_policy.lambda_logging",
"aws_iam_role.lambda_role",
"aws_iam_role_policy_attachment.lambda_logging",
"aws_lambda_function.directory_indexes",
"data.archive_file.lambda_main",
"module.cloudfront_s3_cdn.aws_cloudfront_distribution.default",
"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.dns.data.aws_route53_zone.default",
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
]
}
]
},
{
"module": "module.cloudfront_s3_cdn.module.dns",
"mode": "managed",
"type": "aws_route53_record",
"name": "ipv6",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"index_key": 0,
"schema_version": 2,
"attributes": {
"alias": [
{
"evaluate_target_health": false,
"name": "d2x94vjdgw7i2d.cloudfront.net",
"zone_id": "Z2FDTNDATAQYW2"
}
],
"allow_overwrite": false,
"failover_routing_policy": [],
"fqdn": "dev.onmyojideckbuilder.com",
"geolocation_routing_policy": [],
"health_check_id": null,
"id": "Z0511918V1SF3MCG22JU_dev.onmyojideckbuilder.com_AAAA",
"latency_routing_policy": [],
"multivalue_answer_routing_policy": null,
"name": "dev.onmyojideckbuilder.com",
"records": null,
"set_identifier": null,
"ttl": null,
"type": "AAAA",
"weighted_routing_policy": [],
"zone_id": "Z0511918V1SF3MCG22JU"
},
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjIifQ==",
"dependencies": [
"aws_iam_policy.lambda_logging",
"aws_iam_role.lambda_role",
"aws_iam_role_policy_attachment.lambda_logging",
"aws_lambda_function.directory_indexes",
"data.archive_file.lambda_main",
"module.cloudfront_s3_cdn.aws_cloudfront_distribution.default",
"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.dns.data.aws_route53_zone.default",
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.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:::dev-onmyojideckbuilder-logs",
"bucket": "dev-onmyojideckbuilder-logs",
"bucket_domain_name": "dev-onmyojideckbuilder-logs.s3.amazonaws.com",
"bucket_prefix": null,
"bucket_regional_domain_name": "dev-onmyojideckbuilder-logs.s3.eu-west-1.amazonaws.com",
"cors_rule": [],
"force_destroy": true,
"grant": [],
"hosted_zone_id": "Z1BKCTXD74EZPE",
"id": "dev-onmyojideckbuilder-logs",
"lifecycle_rule": [
{
"abort_incomplete_multipart_upload_days": 5,
"enabled": true,
"expiration": [
{
"date": "",
"days": 90,
"expired_object_delete_marker": false
}
],
"id": "dev-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": "dev-onmyojideckbuilder-logs",
"Project": "onmyoji-deck-builder",
"Stage": "dev"
},
"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": "dev-onmyojideckbuilder-logs",
"id": "dev-onmyojideckbuilder-logs",
"ignore_public_acls": true,
"restrict_public_buckets": true
},
"private": "bnVsbA==",
"dependencies": [
"module.cloudfront_s3_cdn.module.logs.aws_s3_bucket.default"
]
}
]
}
]
}