{"id":20160640,"url":"https://github.com/aplyca/terraform-aws-s3","last_synced_at":"2025-07-23T19:03:38.274Z","repository":{"id":53715641,"uuid":"142350241","full_name":"Aplyca/terraform-aws-s3","owner":"Aplyca","description":"Create S3 bucket optimized for web site hosting","archived":false,"fork":false,"pushed_at":"2022-05-13T01:30:14.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T00:12:32.445Z","etag":null,"topics":["aws","aws-s3","cloud","hosting","infrastructure-as-code","terraform","terraform-modules"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aplyca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T20:25:37.000Z","updated_at":"2021-03-18T14:34:50.000Z","dependencies_parsed_at":"2022-09-11T10:40:49.032Z","dependency_job_id":null,"html_url":"https://github.com/Aplyca/terraform-aws-s3","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Aplyca/terraform-aws-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aplyca%2Fterraform-aws-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aplyca%2Fterraform-aws-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aplyca%2Fterraform-aws-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aplyca%2Fterraform-aws-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aplyca","download_url":"https://codeload.github.com/Aplyca/terraform-aws-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aplyca%2Fterraform-aws-s3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266737568,"owners_count":23976389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","cloud","hosting","infrastructure-as-code","terraform","terraform-modules"],"created_at":"2024-11-14T00:15:03.245Z","updated_at":"2025-07-23T19:03:38.252Z","avatar_url":"https://github.com/Aplyca.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS S3 module\n=========================\n\n\u003e Create a AWS S3 buckets optimized for static web hosting\n\n\n## Create a New Public Bucket\n\n``` yaml\nmodule \"public_static_bucket\" {\n  source  = \"Aplyca/s3/aws\"\n  version = \"0.1.3\"\n\n  name   = \"\u003cYour custom Bucket Name\u003e\"\n  acl = \"public-read\"\n  read_roles = [\"\u003crole_name_1\u003e\", \"\u003crole_name_1\u003e]  Resources with these roles can read the bucket\n  write_roles = [\"\u003crole_name_3\u003e\"] Resources with these roles can write\n  website = [{\n    index_document = \"index.html\"\n    error_document = \"index.html\"\n  }]\n\n  logging = [\n    {\n      target_bucket = \"logging-bucket-name\"\n      target_prefix = \"log/\"\n    }\n  ]\n\n  cors_allowed_origins = [\"*\"]\n  cors_allowed_headers = [\"*\"]\n  cors_allowed_methods = [\"GET\"]\n  cors_expose_headers  = [\"ETag\"]\n  cors_max_age_seconds = \"0\"\n\n  tags {\n    App = \"App Name Public Resources\"\n    Environment = \"Development\"\n  }\n}\n```\n\n## Create non public Bucket\n\n\n``` yaml\nmodule \"nonpublic_files_bucket\" {\n  source  = \"Aplyca/s3/aws\"\n  version = \"0.1.3\"\n\n  name   = \"\u003cYour custom Bucket Name\u003e\"\n  read_roles = [\"\u003crole_name_1\u003e\"]  Resources with this role can read the bucket\n  description = \"APP Files Bucket\"\n  tags {\n    App = \"APP Name Non Public Resources\"\n  }\n}\n```\n\n## Add bucket replication\n\n\n``` yaml\n  replication_role = aws_iam_role.replication.arn\n  replication_rules = [\n    {\n      id = \"${local.name}-qa-replication\"\n      status = \"Enabled\"\n      #prefix = \"foo\"\n      destination-bucket = var.app[\"arn-bucket-rep-dest\"]\n      destination-storage_class = \"STANDARD\"\n    }\n  ]      \n```\n\n\n## How to reference the bucket\n\u003e\n\u003e Examples using the *nonpublic_files_bucket* sample:\n\u003e - Example By Name:\n\u003e any_var_bucket_name = \"${module.nonpublic_files_bucket.name}\"\n\u003e - Example By ARN:\n\u003e any_var_bucket_arn = \"${module.nonpublic_files_bucket.arn}\"\n\u003e - Example By Domain:\n\u003e any_var_bucket_domain = \"${module.nonpublic_files_bucket.domain}\"\n\n\n## Resources\n\n\nThis is the list of resources that the module may create. The module can create zero or more of each of these resources depending on the count value. The count value is determined at runtime. The goal of this page is to present the types of resources that may be created.\n\nThis list contains all the resources this plus any submodules may create. When using this module, it may create less resources if you use a submodule.\n\nThis module defines 7 resources.\n\n- aws_iam_policy.read\n- aws_iam_policy.write\n- aws_iam_role_policy_attachment.read\n- aws_iam_role_policy_attachment.write\n- aws_s3_bucket.this\n- aws_s3_bucket_policy.access_identity\n- aws_s3_bucket_policy.public\n\n## Optional Inputs\n\nThese variables have default values and don't have to be set to use this module. You may set these variables to override their default values. This module has no required variables.\n- access_identity\n- access_identity_arn\n- acl\n- bucket_domain_format\n- cors_allowed_headers\n- cors_allowed_methods\n- cors_allowed_origins\n- cors_expose_headers\n- cors_max_age_seconds\n- description\n- logging\n- name\n- read_permissions\n- read_roles\n- tags\n- website\n- write_permissions\n- write_roles\n- versioning_enabled\n\nFor more reference please check in the Terraform Module Registry: https://registry.terraform.io/modules/Aplyca/s3/aws/0.1.3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplyca%2Fterraform-aws-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faplyca%2Fterraform-aws-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplyca%2Fterraform-aws-s3/lists"}