{"id":13707318,"url":"https://github.com/cloudposse/terraform-aws-s3-bucket","last_synced_at":"2025-05-14T20:04:10.362Z","repository":{"id":37545484,"uuid":"165803358","full_name":"cloudposse/terraform-aws-s3-bucket","owner":"cloudposse","description":"Terraform module that creates an S3 bucket with an optional IAM user for external CI/CD systems","archived":false,"fork":false,"pushed_at":"2025-01-28T02:08:50.000Z","size":4661,"stargazers_count":172,"open_issues_count":12,"forks_count":852,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-03-30T10:04:47.070Z","etag":null,"topics":["artifacts","artifacts-repository","bucket","cicd","circleci","codefresh","hcl2","iam","iam-user","s3","terraform","terraform-module","travis-ci"],"latest_commit_sha":null,"homepage":"https://cloudposse.com/accelerate","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudposse.png","metadata":{"funding":{"github":"cloudposse"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-15T07:14:21.000Z","updated_at":"2025-02-10T23:13:49.000Z","dependencies_parsed_at":"2023-11-15T04:23:07.711Z","dependency_job_id":"f509818f-45a9-4c24-b480-7008d8ae4cf1","html_url":"https://github.com/cloudposse/terraform-aws-s3-bucket","commit_stats":{"total_commits":123,"total_committers":54,"mean_commits":"2.2777777777777777","dds":0.8373983739837398,"last_synced_commit":"9469202fcb351499b38b30e0030ad08a436278af"},"previous_names":[],"tags_count":98,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudposse%2Fterraform-aws-s3-bucket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudposse%2Fterraform-aws-s3-bucket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudposse%2Fterraform-aws-s3-bucket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudposse%2Fterraform-aws-s3-bucket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudposse","download_url":"https://codeload.github.com/cloudposse/terraform-aws-s3-bucket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471518,"owners_count":20944158,"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","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":["artifacts","artifacts-repository","bucket","cicd","circleci","codefresh","hcl2","iam","iam-user","s3","terraform","terraform-module","travis-ci"],"created_at":"2024-08-02T22:01:27.218Z","updated_at":"2025-04-06T11:05:54.090Z","avatar_url":"https://github.com/cloudposse.png","language":"HCL","funding_links":["https://github.com/sponsors/cloudposse"],"categories":["terraform","HCL"],"sub_categories":[],"readme":"\n\n\u003c!-- markdownlint-disable --\u003e\n\u003ca href=\"https://cpco.io/homepage\"\u003e\u003cimg src=\"https://github.com/cloudposse/terraform-aws-s3-bucket/blob/main/.github/banner.png?raw=true\" alt=\"Project Banner\"/\u003e\u003c/a\u003e\u003cbr/\u003e\n    \u003cp align=\"right\"\u003e\n\u003ca href=\"https://github.com/cloudposse/terraform-aws-s3-bucket/actions\"\u003e\u003cimg src=\"https://github.com/cloudposse/terraform-aws-s3-bucket/workflows/test/badge.svg?branch=master\" alt=\"GitHub Action Tests\"/\u003e\u003c/a\u003e\u003ca href=\"https://github.com/cloudposse/terraform-aws-s3-bucket/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/cloudposse/terraform-aws-s3-bucket.svg?style=for-the-badge\" alt=\"Latest Release\"/\u003e\u003c/a\u003e\u003ca href=\"https://github.com/cloudposse/terraform-aws-s3-bucket/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/cloudposse/terraform-aws-s3-bucket.svg?style=for-the-badge\" alt=\"Last Updated\"/\u003e\u003c/a\u003e\u003ca href=\"https://slack.cloudposse.com\"\u003e\u003cimg src=\"https://slack.cloudposse.com/for-the-badge.svg\" alt=\"Slack Community\"/\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c!-- markdownlint-restore --\u003e\n\n\u003c!--\n\n\n\n\n  ** DO NOT EDIT THIS FILE\n  **\n  ** This file was automatically generated by the `cloudposse/build-harness`.\n  ** 1) Make all changes to `README.yaml`\n  ** 2) Run `make init` (you only need to do this once)\n  ** 3) Run`make readme` to rebuild this file.\n  **\n  ** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)\n  **\n\n\n\n\n\n--\u003e\n\nThis module creates an S3 bucket with support for versioning, lifecycles, object locks, replication, encryption, ACL,\nbucket object policies, and static website hosting.\n\nFor backward compatibility, it sets the S3 bucket ACL to `private` and the `s3_object_ownership`\nto `ObjectWriter`. Moving forward, setting `s3_object_ownership` to `BucketOwnerEnforced` is recommended,\nand doing so automatically disables the ACL.\n\nThis module blocks public access to the bucket by default. See `block_public_acls`, `block_public_policy`,\n`ignore_public_acls`, and `restrict_public_buckets` to change the settings. See [AWS documentation](https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)\nfor more details.  \n\nThis module can optionally create an IAM User with access to the S3 bucket. This is inherently insecure in that\nto enable anyone to become the User, access keys must be generated, and anything generated by Terraform is stored\nunencrypted in the Terraform state. See the [Terraform documentation](https://www.terraform.io/docs/state/sensitive-data.html) for more details\n\nThe best way to grant access to the bucket is to grant one or more IAM Roles access to the bucket via `privileged_principal_arns`.\nThis IAM Role can be assumed by EC2 instances via their Instance Profile, or Kubernetes (EKS) services using\n[IRSA](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).\nEntities outside of AWS can assume the Role via [OIDC](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html). \n(See [this example of connecting GitHub](https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/)\nto enable GitHub actions to assume AWS IAM roles, or use [this Cloud Posse component](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/github-oidc-provider)\nif you are already using the Cloud Posse reference architecture.)\n\nIf neither of those approaches work, then as a last resort you can set `user_enabled = true` and\nthis module will provision a basic IAM user with permissions to access the bucket.\nWe do not recommend creating IAM users this way for any other purpose.\n\nIf an IAM user is created, the IAM user name is constructed using [terraform-null-label](https://github.com/cloudposse/terraform-null-label)\nand some input is required. The simplest input is `name`. By default the name will be converted to lower case\nand all non-alphanumeric characters except for hyphen will be removed. See the documentation for `terraform-null-label`\nto learn how to override these defaults if desired.\n\nIf an AWS Access Key is created, it is stored either in SSM Parameter Store or is provided as a module output,\nbut not both. Using SSM Parameter Store is recommended because that will keep the secret from being easily accessible\nvia Terraform remote state lookup, but the key will still be stored unencrypted in the Terraform state in any case.\n\n\n\u003e [!TIP]\n\u003e #### 👽 Use Atmos with Terraform\n\u003e Cloud Posse uses [`atmos`](https://atmos.tools) to easily orchestrate multiple environments using Terraform. \u003cbr/\u003e\n\u003e Works with [Github Actions](https://atmos.tools/integrations/github-actions/), [Atlantis](https://atmos.tools/integrations/atlantis), or [Spacelift](https://atmos.tools/integrations/spacelift).\n\u003e\n\u003e \u003cdetails\u003e\n\u003e \u003csummary\u003e\u003cstrong\u003eWatch demo of using Atmos with Terraform\u003c/strong\u003e\u003c/summary\u003e\n\u003e \u003cimg src=\"https://github.com/cloudposse/atmos/blob/main/docs/demo.gif?raw=true\"/\u003e\u003cbr/\u003e\n\u003e \u003ci\u003eExample of running \u003ca href=\"https://atmos.tools\"\u003e\u003ccode\u003eatmos\u003c/code\u003e\u003c/a\u003e to manage infrastructure from our \u003ca href=\"https://atmos.tools/quick-start/\"\u003eQuick Start\u003c/a\u003e tutorial.\u003c/i\u003e\n\u003e \u003c/detalis\u003e\n\n\n\n\n\n## Usage\n\nUsing [BucketOwnerEnforced](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html#object-ownership-overview)\n\n```hcl\nmodule \"s3_bucket\" {\n  source = \"cloudposse/s3-bucket/aws\"\n  # Cloud Posse recommends pinning every module to a specific version\n  # version = \"x.x.x\"\n  name                     = \"app\"\n  stage                    = \"test\"\n  namespace                = \"eg\"\n\n  s3_object_ownership      = \"BucketOwnerEnforced\"\n  enabled                  = true\n  user_enabled             = false\n  versioning_enabled       = false\n\n  privileged_principal_actions   = [\"s3:GetObject\", \"s3:ListBucket\", \"s3:GetBucketLocation\"]\n  privileged_principal_arns      = [\n    {\n      (local.deployment_iam_role_arn) = [\"\"]\n    },\n    {\n      (local.additional_deployment_iam_role_arn) = [\"prefix1/\", \"prefix2/\"]\n    }\n  ]\n}\n```\n\nConfiguring S3 [storage lifecycle](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html):\n\n```hcl\nlocals {\n  lifecycle_configuration_rules = [{\n    enabled = true # bool\n    id      = \"v2rule\"\n\n    abort_incomplete_multipart_upload_days = 1 # number\n\n    filter_and = null\n    expiration = {\n      days = 120 # integer \u003e 0\n    }\n    noncurrent_version_expiration = {\n      newer_noncurrent_versions = 3  # integer \u003e 0\n      noncurrent_days           = 60 # integer \u003e= 0\n    }\n    transition = [{\n      days          = 30            # integer \u003e= 0\n      storage_class = \"STANDARD_IA\" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.\n      },\n      {\n        days          = 60           # integer \u003e= 0\n        storage_class = \"ONEZONE_IA\" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.\n    }]\n    noncurrent_version_transition = [{\n      newer_noncurrent_versions = 3            # integer \u003e= 0\n      noncurrent_days           = 30           # integer \u003e= 0\n      storage_class             = \"ONEZONE_IA\" # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.\n    }]\n  }]\n}\n```\n\n\nAllowing specific principal ARNs to perform actions on the bucket:\n\n```hcl\nmodule \"s3_bucket\" {\n  source = \"cloudposse/s3-bucket/aws\"\n  # Cloud Posse recommends pinning every module to a specific version\n  # version = \"x.x.x\"\n  s3_object_ownership      = \"BucketOwnerEnforced\"\n  enabled                  = true\n  user_enabled             = true\n  versioning_enabled       = false\n  allowed_bucket_actions   = [\"s3:GetObject\", \"s3:ListBucket\", \"s3:GetBucketLocation\"]\n  name                     = \"app\"\n  stage                    = \"test\"\n  namespace                = \"eg\"\n\n  privileged_principal_arns = [\n  {\n    \"arn:aws:iam::123456789012:role/principal1\" = [\"prefix1/\", \"prefix2/\"]\n  }, {\n    \"arn:aws:iam::123456789012:role/principal2\" = [\"\"]\n  }]\n  privileged_principal_actions = [\n    \"s3:PutObject\", \n    \"s3:PutObjectAcl\", \n    \"s3:GetObject\", \n    \"s3:DeleteObject\", \n    \"s3:ListBucket\", \n    \"s3:ListBucketMultipartUploads\", \n    \"s3:GetBucketLocation\", \n    \"s3:AbortMultipartUpload\"\n  ]\n}\n```\n\n\u003e [!IMPORTANT]\n\u003e In Cloud Posse's examples, we avoid pinning modules to specific versions to prevent discrepancies between the documentation\n\u003e and the latest released versions. However, for your own projects, we strongly advise pinning each module to the exact version\n\u003e you're using. This practice ensures the stability of your infrastructure. Additionally, we recommend implementing a systematic\n\u003e approach for updating versions to avoid unexpected changes.\n\n\n\n\n\n\n\n\n\u003c!-- markdownlint-disable --\u003e\n## Makefile Targets\n```text\nAvailable targets:\n\n  help                                Help screen\n  help/all                            Display help for all targets\n  help/short                          This help short screen\n  lint                                Lint terraform code\n  test/%                              Run Terraform commands in the examples/complete folder; e.g. make test/plan\n\n```\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- markdownlint-disable --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.3.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 4.9.0 |\n| \u003ca name=\"requirement_time\"\u003e\u003c/a\u003e [time](#requirement\\_time) | \u003e= 0.7 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 4.9.0 |\n| \u003ca name=\"provider_time\"\u003e\u003c/a\u003e [time](#provider\\_time) | \u003e= 0.7 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_s3_user\"\u003e\u003c/a\u003e [s3\\_user](#module\\_s3\\_user) | cloudposse/iam-s3-user/aws | 1.2.0 |\n| \u003ca name=\"module_this\"\u003e\u003c/a\u003e [this](#module\\_this) | cloudposse/label/null | 0.25.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_iam_policy.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |\n| [aws_iam_role.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy_attachment.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_s3_bucket.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |\n| [aws_s3_bucket_accelerate_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_accelerate_configuration) | resource |\n| [aws_s3_bucket_acl.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl) | resource |\n| [aws_s3_bucket_cors_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_cors_configuration) | resource |\n| [aws_s3_bucket_lifecycle_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |\n| [aws_s3_bucket_logging.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_logging) | resource |\n| [aws_s3_bucket_notification.bucket_notification](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | resource |\n| [aws_s3_bucket_object_lock_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object_lock_configuration) | resource |\n| [aws_s3_bucket_ownership_controls.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_ownership_controls) | resource |\n| [aws_s3_bucket_policy.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |\n| [aws_s3_bucket_public_access_block.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |\n| [aws_s3_bucket_replication_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_replication_configuration) | resource |\n| [aws_s3_bucket_request_payment_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_request_payment_configuration) | resource |\n| [aws_s3_bucket_server_side_encryption_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |\n| [aws_s3_bucket_versioning.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource |\n| [aws_s3_bucket_website_configuration.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration) | resource |\n| [aws_s3_bucket_website_configuration.redirect](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_website_configuration) | resource |\n| [aws_s3_directory_bucket.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_directory_bucket) | resource |\n| [time_sleep.wait_for_aws_s3_bucket_settings](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |\n| [aws_canonical_user_id.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | data source |\n| [aws_iam_policy_document.aggregated_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_iam_policy_document.bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_iam_policy_document.replication](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_iam_policy_document.replication_sts](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_access_key_enabled\"\u003e\u003c/a\u003e [access\\_key\\_enabled](#input\\_access\\_key\\_enabled) | Set to `true` to create an IAM Access Key for the created IAM user | `bool` | `true` | no |\n| \u003ca name=\"input_acl\"\u003e\u003c/a\u003e [acl](#input\\_acl) | The [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply.\u003cbr/\u003eDeprecated by AWS in favor of bucket policies.\u003cbr/\u003eAutomatically disabled if `s3_object_ownership` is set to \"BucketOwnerEnforced\".\u003cbr/\u003eDefaults to \"private\" for backwards compatibility, but we recommend setting `s3_object_ownership` to \"BucketOwnerEnforced\" instead. | `string` | `\"private\"` | no |\n| \u003ca name=\"input_additional_tag_map\"\u003e\u003c/a\u003e [additional\\_tag\\_map](#input\\_additional\\_tag\\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.\u003cbr/\u003eThis is for some rare cases where resources want additional configuration of tags\u003cbr/\u003eand therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_allow_encrypted_uploads_only\"\u003e\u003c/a\u003e [allow\\_encrypted\\_uploads\\_only](#input\\_allow\\_encrypted\\_uploads\\_only) | Set to `true` to prevent uploads of unencrypted objects to S3 bucket | `bool` | `false` | no |\n| \u003ca name=\"input_allow_ssl_requests_only\"\u003e\u003c/a\u003e [allow\\_ssl\\_requests\\_only](#input\\_allow\\_ssl\\_requests\\_only) | Set to `true` to require requests to use Secure Socket Layer (HTTPS/SSL). This will explicitly deny access to HTTP requests | `bool` | `false` | no |\n| \u003ca name=\"input_allowed_bucket_actions\"\u003e\u003c/a\u003e [allowed\\_bucket\\_actions](#input\\_allowed\\_bucket\\_actions) | List of actions the user is permitted to perform on the S3 bucket | `list(string)` | \u003cpre\u003e[\u003cbr/\u003e  \"s3:PutObject\",\u003cbr/\u003e  \"s3:PutObjectAcl\",\u003cbr/\u003e  \"s3:GetObject\",\u003cbr/\u003e  \"s3:DeleteObject\",\u003cbr/\u003e  \"s3:ListBucket\",\u003cbr/\u003e  \"s3:ListBucketMultipartUploads\",\u003cbr/\u003e  \"s3:GetBucketLocation\",\u003cbr/\u003e  \"s3:AbortMultipartUpload\"\u003cbr/\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_attributes\"\u003e\u003c/a\u003e [attributes](#input\\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,\u003cbr/\u003ein the order they appear in the list. New attributes are appended to the\u003cbr/\u003eend of the list. The elements of the list are joined by the `delimiter`\u003cbr/\u003eand treated as a single ID element. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_availability_zone_id\"\u003e\u003c/a\u003e [availability\\_zone\\_id](#input\\_availability\\_zone\\_id) | The ID of the availability zone. | `string` | `\"\"` | no |\n| \u003ca name=\"input_block_public_acls\"\u003e\u003c/a\u003e [block\\_public\\_acls](#input\\_block\\_public\\_acls) | Set to `false` to disable the blocking of new public access lists on the bucket | `bool` | `true` | no |\n| \u003ca name=\"input_block_public_policy\"\u003e\u003c/a\u003e [block\\_public\\_policy](#input\\_block\\_public\\_policy) | Set to `false` to disable the blocking of new public policies on the bucket | `bool` | `true` | no |\n| \u003ca name=\"input_bucket_key_enabled\"\u003e\u003c/a\u003e [bucket\\_key\\_enabled](#input\\_bucket\\_key\\_enabled) | Set this to true to use Amazon S3 Bucket Keys for SSE-KMS, which may or may not reduce the number of AWS KMS requests.\u003cbr/\u003eFor more information, see: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html | `bool` | `false` | no |\n| \u003ca name=\"input_bucket_name\"\u003e\u003c/a\u003e [bucket\\_name](#input\\_bucket\\_name) | Bucket name. If provided, the bucket will be created with this name instead of generating the name from the context | `string` | `null` | no |\n| \u003ca name=\"input_context\"\u003e\u003c/a\u003e [context](#input\\_context) | Single object for setting entire context at once.\u003cbr/\u003eSee description of individual variables for details.\u003cbr/\u003eLeave string and numeric variables as `null` to use default value.\u003cbr/\u003eIndividual variable settings (non-null) override settings in context object,\u003cbr/\u003eexcept for attributes, tags, and additional\\_tag\\_map, which are merged. | `any` | \u003cpre\u003e{\u003cbr/\u003e  \"additional_tag_map\": {},\u003cbr/\u003e  \"attributes\": [],\u003cbr/\u003e  \"delimiter\": null,\u003cbr/\u003e  \"descriptor_formats\": {},\u003cbr/\u003e  \"enabled\": true,\u003cbr/\u003e  \"environment\": null,\u003cbr/\u003e  \"id_length_limit\": null,\u003cbr/\u003e  \"label_key_case\": null,\u003cbr/\u003e  \"label_order\": [],\u003cbr/\u003e  \"label_value_case\": null,\u003cbr/\u003e  \"labels_as_tags\": [\u003cbr/\u003e    \"unset\"\u003cbr/\u003e  ],\u003cbr/\u003e  \"name\": null,\u003cbr/\u003e  \"namespace\": null,\u003cbr/\u003e  \"regex_replace_chars\": null,\u003cbr/\u003e  \"stage\": null,\u003cbr/\u003e  \"tags\": {},\u003cbr/\u003e  \"tenant\": null\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_cors_configuration\"\u003e\u003c/a\u003e [cors\\_configuration](#input\\_cors\\_configuration) | Specifies the allowed headers, methods, origins and exposed headers when using CORS on this bucket | \u003cpre\u003elist(object({\u003cbr/\u003e    id              = optional(string)\u003cbr/\u003e    allowed_headers = optional(list(string))\u003cbr/\u003e    allowed_methods = optional(list(string))\u003cbr/\u003e    allowed_origins = optional(list(string))\u003cbr/\u003e    expose_headers  = optional(list(string))\u003cbr/\u003e    max_age_seconds = optional(number)\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_create_s3_directory_bucket\"\u003e\u003c/a\u003e [create\\_s3\\_directory\\_bucket](#input\\_create\\_s3\\_directory\\_bucket) | Control the creation of the S3 directory bucket. Set to true to create the bucket, false to skip. | `bool` | `false` | no |\n| \u003ca name=\"input_delimiter\"\u003e\u003c/a\u003e [delimiter](#input\\_delimiter) | Delimiter to be used between ID elements.\u003cbr/\u003eDefaults to `-` (hyphen). Set to `\"\"` to use no delimiter at all. | `string` | `null` | no |\n| \u003ca name=\"input_descriptor_formats\"\u003e\u003c/a\u003e [descriptor\\_formats](#input\\_descriptor\\_formats) | Describe additional descriptors to be output in the `descriptors` output map.\u003cbr/\u003eMap of maps. Keys are names of descriptors. Values are maps of the form\u003cbr/\u003e`{\u003cbr/\u003e   format = string\u003cbr/\u003e   labels = list(string)\u003cbr/\u003e}`\u003cbr/\u003e(Type is `any` so the map values can later be enhanced to provide additional options.)\u003cbr/\u003e`format` is a Terraform format string to be passed to the `format()` function.\u003cbr/\u003e`labels` is a list of labels, in order, to pass to `format()` function.\u003cbr/\u003eLabel values will be normalized before being passed to `format()` so they will be\u003cbr/\u003eidentical to how they appear in `id`.\u003cbr/\u003eDefault is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |\n| \u003ca name=\"input_enabled\"\u003e\u003c/a\u003e [enabled](#input\\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |\n| \u003ca name=\"input_event_notification_details\"\u003e\u003c/a\u003e [event\\_notification\\_details](#input\\_event\\_notification\\_details) | S3 event notification details | \u003cpre\u003eobject({\u003cbr/\u003e    enabled     = bool\u003cbr/\u003e    eventbridge = optional(bool, false)\u003cbr/\u003e    lambda_list = optional(list(object({\u003cbr/\u003e      lambda_function_arn = string\u003cbr/\u003e      events              = optional(list(string), [\"s3:ObjectCreated:*\"])\u003cbr/\u003e      filter_prefix       = optional(string)\u003cbr/\u003e      filter_suffix       = optional(string)\u003cbr/\u003e    })), [])\u003cbr/\u003e\u003cbr/\u003e    queue_list = optional(list(object({\u003cbr/\u003e      queue_arn     = string\u003cbr/\u003e      events        = optional(list(string), [\"s3:ObjectCreated:*\"])\u003cbr/\u003e      filter_prefix = optional(string)\u003cbr/\u003e      filter_suffix = optional(string)\u003cbr/\u003e    })), [])\u003cbr/\u003e\u003cbr/\u003e    topic_list = optional(list(object({\u003cbr/\u003e      topic_arn     = string\u003cbr/\u003e      events        = optional(list(string), [\"s3:ObjectCreated:*\"])\u003cbr/\u003e      filter_prefix = optional(string)\u003cbr/\u003e      filter_suffix = optional(string)\u003cbr/\u003e    })), [])\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"enabled\": false\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_expected_bucket_owner\"\u003e\u003c/a\u003e [expected\\_bucket\\_owner](#input\\_expected\\_bucket\\_owner) | Account ID of the expected bucket owner. \u003cbr/\u003eMore information: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-owner-condition.html | `string` | `null` | no |\n| \u003ca name=\"input_force_destroy\"\u003e\u003c/a\u003e [force\\_destroy](#input\\_force\\_destroy) | When `true`, permits a non-empty S3 bucket to be deleted by first deleting all objects in the bucket.\u003cbr/\u003eTHESE OBJECTS ARE NOT RECOVERABLE even if they were versioned and stored in Glacier. | `bool` | `false` | no |\n| \u003ca name=\"input_grants\"\u003e\u003c/a\u003e [grants](#input\\_grants) | A list of policy grants for the bucket, taking a list of permissions.\u003cbr/\u003eConflicts with `acl`. Set `acl` to `null` to use this.\u003cbr/\u003eDeprecated by AWS in favor of bucket policies.\u003cbr/\u003eAutomatically disabled if `s3_object_ownership` is set to \"BucketOwnerEnforced\". | \u003cpre\u003elist(object({\u003cbr/\u003e    id          = string\u003cbr/\u003e    type        = string\u003cbr/\u003e    permissions = list(string)\u003cbr/\u003e    uri         = string\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_id_length_limit\"\u003e\u003c/a\u003e [id\\_length\\_limit](#input\\_id\\_length\\_limit) | Limit `id` to this many characters (minimum 6).\u003cbr/\u003eSet to `0` for unlimited length.\u003cbr/\u003eSet to `null` for keep the existing setting, which defaults to `0`.\u003cbr/\u003eDoes not affect `id_full`. | `number` | `null` | no |\n| \u003ca name=\"input_ignore_public_acls\"\u003e\u003c/a\u003e [ignore\\_public\\_acls](#input\\_ignore\\_public\\_acls) | Set to `false` to disable the ignoring of public access lists on the bucket | `bool` | `true` | no |\n| \u003ca name=\"input_kms_master_key_arn\"\u003e\u003c/a\u003e [kms\\_master\\_key\\_arn](#input\\_kms\\_master\\_key\\_arn) | The AWS KMS master key ARN used for the `SSE-KMS` encryption. This can only be used when you set the value of `sse_algorithm` as `aws:kms`. The default aws/s3 AWS KMS master key is used if this element is absent while the `sse_algorithm` is `aws:kms` | `string` | `\"\"` | no |\n| \u003ca name=\"input_label_key_case\"\u003e\u003c/a\u003e [label\\_key\\_case](#input\\_label\\_key\\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.\u003cbr/\u003eDoes not affect keys of tags passed in via the `tags` input.\u003cbr/\u003ePossible values: `lower`, `title`, `upper`.\u003cbr/\u003eDefault value: `title`. | `string` | `null` | no |\n| \u003ca name=\"input_label_order\"\u003e\u003c/a\u003e [label\\_order](#input\\_label\\_order) | The order in which the labels (ID elements) appear in the `id`.\u003cbr/\u003eDefaults to [\"namespace\", \"environment\", \"stage\", \"name\", \"attributes\"].\u003cbr/\u003eYou can omit any of the 6 labels (\"tenant\" is the 6th), but at least one must be present. | `list(string)` | `null` | no |\n| \u003ca name=\"input_label_value_case\"\u003e\u003c/a\u003e [label\\_value\\_case](#input\\_label\\_value\\_case) | Controls the letter case of ID elements (labels) as included in `id`,\u003cbr/\u003eset as tag values, and output by this module individually.\u003cbr/\u003eDoes not affect values of tags passed in via the `tags` input.\u003cbr/\u003ePossible values: `lower`, `title`, `upper` and `none` (no transformation).\u003cbr/\u003eSet this to `title` and set `delimiter` to `\"\"` to yield Pascal Case IDs.\u003cbr/\u003eDefault value: `lower`. | `string` | `null` | no |\n| \u003ca name=\"input_labels_as_tags\"\u003e\u003c/a\u003e [labels\\_as\\_tags](#input\\_labels\\_as\\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.\u003cbr/\u003eDefault is to include all labels.\u003cbr/\u003eTags with empty values will not be included in the `tags` output.\u003cbr/\u003eSet to `[]` to suppress all generated tags.\u003cbr/\u003e**Notes:**\u003cbr/\u003e  The value of the `name` tag, if included, will be the `id`, not the `name`.\u003cbr/\u003e  Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be\u003cbr/\u003e  changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | \u003cpre\u003e[\u003cbr/\u003e  \"default\"\u003cbr/\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_lifecycle_configuration_rules\"\u003e\u003c/a\u003e [lifecycle\\_configuration\\_rules](#input\\_lifecycle\\_configuration\\_rules) | A list of lifecycle V2 rules | \u003cpre\u003elist(object({\u003cbr/\u003e    enabled = optional(bool, true)\u003cbr/\u003e    id      = string\u003cbr/\u003e\u003cbr/\u003e    abort_incomplete_multipart_upload_days = optional(number)\u003cbr/\u003e\u003cbr/\u003e    # `filter_and` is the `and` configuration block inside the `filter` configuration.\u003cbr/\u003e    # This is the only place you should specify a prefix.\u003cbr/\u003e    filter_and = optional(object({\u003cbr/\u003e      object_size_greater_than = optional(number) # integer \u003e= 0\u003cbr/\u003e      object_size_less_than    = optional(number) # integer \u003e= 1\u003cbr/\u003e      prefix                   = optional(string)\u003cbr/\u003e      tags                     = optional(map(string), {})\u003cbr/\u003e    }))\u003cbr/\u003e    expiration = optional(object({\u003cbr/\u003e      date                         = optional(string) # string, RFC3339 time format, GMT\u003cbr/\u003e      days                         = optional(number) # integer \u003e 0\u003cbr/\u003e      expired_object_delete_marker = optional(bool)\u003cbr/\u003e    }))\u003cbr/\u003e    noncurrent_version_expiration = optional(object({\u003cbr/\u003e      newer_noncurrent_versions = optional(number) # integer \u003e 0\u003cbr/\u003e      noncurrent_days           = optional(number) # integer \u003e= 0\u003cbr/\u003e    }))\u003cbr/\u003e    transition = optional(list(object({\u003cbr/\u003e      date          = optional(string) # string, RFC3339 time format, GMT\u003cbr/\u003e      days          = optional(number) # integer \u003e 0\u003cbr/\u003e      storage_class = optional(string)\u003cbr/\u003e      # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.\u003cbr/\u003e    })), [])\u003cbr/\u003e\u003cbr/\u003e    noncurrent_version_transition = optional(list(object({\u003cbr/\u003e      newer_noncurrent_versions = optional(number) # integer \u003e= 0\u003cbr/\u003e      noncurrent_days           = optional(number) # integer \u003e= 0\u003cbr/\u003e      storage_class             = optional(string)\u003cbr/\u003e      # string/enum, one of GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR.\u003cbr/\u003e    })), [])\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_lifecycle_rule_ids\"\u003e\u003c/a\u003e [lifecycle\\_rule\\_ids](#input\\_lifecycle\\_rule\\_ids) | DEPRECATED (use `lifecycle_configuration_rules`): A list of IDs to assign to corresponding `lifecycle_rules` | `list(string)` | `[]` | no |\n| \u003ca name=\"input_lifecycle_rules\"\u003e\u003c/a\u003e [lifecycle\\_rules](#input\\_lifecycle\\_rules) | DEPRECATED (`use lifecycle_configuration_rules`): A list of lifecycle rules | \u003cpre\u003elist(object({\u003cbr/\u003e    prefix  = string\u003cbr/\u003e    enabled = bool\u003cbr/\u003e    tags    = map(string)\u003cbr/\u003e\u003cbr/\u003e    enable_glacier_transition            = bool\u003cbr/\u003e    enable_deeparchive_transition        = bool\u003cbr/\u003e    enable_standard_ia_transition        = bool\u003cbr/\u003e    enable_current_object_expiration     = bool\u003cbr/\u003e    enable_noncurrent_version_expiration = bool\u003cbr/\u003e\u003cbr/\u003e    abort_incomplete_multipart_upload_days         = number\u003cbr/\u003e    noncurrent_version_glacier_transition_days     = number\u003cbr/\u003e    noncurrent_version_deeparchive_transition_days = number\u003cbr/\u003e    noncurrent_version_expiration_days             = number\u003cbr/\u003e\u003cbr/\u003e    standard_transition_days    = number\u003cbr/\u003e    glacier_transition_days     = number\u003cbr/\u003e    deeparchive_transition_days = number\u003cbr/\u003e    expiration_days             = number\u003cbr/\u003e  }))\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_logging\"\u003e\u003c/a\u003e [logging](#input\\_logging) | Bucket access logging configuration. Empty list for no logging, list of 1 to enable logging. | \u003cpre\u003elist(object({\u003cbr/\u003e    bucket_name = string\u003cbr/\u003e    prefix      = string\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_minimum_tls_version\"\u003e\u003c/a\u003e [minimum\\_tls\\_version](#input\\_minimum\\_tls\\_version) | Set the minimum TLS version for in-transit traffic | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.\u003cbr/\u003eThis is the only ID element not also included as a `tag`.\u003cbr/\u003eThe \"name\" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |\n| \u003ca name=\"input_namespace\"\u003e\u003c/a\u003e [namespace](#input\\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |\n| \u003ca name=\"input_object_lock_configuration\"\u003e\u003c/a\u003e [object\\_lock\\_configuration](#input\\_object\\_lock\\_configuration) | A configuration for S3 object locking. With S3 Object Lock, you can store objects using a `write once, read many` (WORM) model. Object Lock can help prevent objects from being deleted or overwritten for a fixed amount of time or indefinitely. | \u003cpre\u003eobject({\u003cbr/\u003e    mode  = string # Valid values are GOVERNANCE and COMPLIANCE.\u003cbr/\u003e    days  = number\u003cbr/\u003e    years = number\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_privileged_principal_actions\"\u003e\u003c/a\u003e [privileged\\_principal\\_actions](#input\\_privileged\\_principal\\_actions) | List of actions to permit `privileged_principal_arns` to perform on bucket and bucket prefixes (see `privileged_principal_arns`) | `list(string)` | `[]` | no |\n| \u003ca name=\"input_privileged_principal_arns\"\u003e\u003c/a\u003e [privileged\\_principal\\_arns](#input\\_privileged\\_principal\\_arns) | List of maps. Each map has a key, an IAM Principal ARN, whose associated value is\u003cbr/\u003ea list of S3 path prefixes to grant `privileged_principal_actions` permissions for that principal,\u003cbr/\u003ein addition to the bucket itself, which is automatically included. Prefixes should not begin with '/'. | `list(map(list(string)))` | `[]` | no |\n| \u003ca name=\"input_regex_replace_chars\"\u003e\u003c/a\u003e [regex\\_replace\\_chars](#input\\_regex\\_replace\\_chars) | Terraform regular expression (regex) string.\u003cbr/\u003eCharacters matching the regex will be removed from the ID elements.\u003cbr/\u003eIf not set, `\"/[^a-zA-Z0-9-]/\"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |\n| \u003ca name=\"input_replication_rules\"\u003e\u003c/a\u003e [replication\\_rules](#input\\_replication\\_rules) | DEPRECATED (use `s3_replication_rules`): Specifies the replication rules for S3 bucket replication if enabled. You must also set s3\\_replication\\_enabled to true. | `list(any)` | `null` | no |\n| \u003ca name=\"input_restrict_public_buckets\"\u003e\u003c/a\u003e [restrict\\_public\\_buckets](#input\\_restrict\\_public\\_buckets) | Set to `false` to disable the restricting of making the bucket public | `bool` | `true` | no |\n| \u003ca name=\"input_s3_object_ownership\"\u003e\u003c/a\u003e [s3\\_object\\_ownership](#input\\_s3\\_object\\_ownership) | Specifies the S3 object ownership control.\u003cbr/\u003eValid values are `ObjectWriter`, `BucketOwnerPreferred`, and 'BucketOwnerEnforced'.\u003cbr/\u003eDefaults to \"ObjectWriter\" for backwards compatibility, but we recommend setting \"BucketOwnerEnforced\" instead. | `string` | `\"ObjectWriter\"` | no |\n| \u003ca name=\"input_s3_replica_bucket_arn\"\u003e\u003c/a\u003e [s3\\_replica\\_bucket\\_arn](#input\\_s3\\_replica\\_bucket\\_arn) | A single S3 bucket ARN to use for all replication rules.\u003cbr/\u003eNote: The destination bucket can be specified in the replication rule itself\u003cbr/\u003e(which allows for multiple destinations), in which case it will take precedence over this variable. | `string` | `\"\"` | no |\n| \u003ca name=\"input_s3_replication_enabled\"\u003e\u003c/a\u003e [s3\\_replication\\_enabled](#input\\_s3\\_replication\\_enabled) | Set this to true and specify `s3_replication_rules` to enable replication. `versioning_enabled` must also be `true`. | `bool` | `false` | no |\n| \u003ca name=\"input_s3_replication_permissions_boundary_arn\"\u003e\u003c/a\u003e [s3\\_replication\\_permissions\\_boundary\\_arn](#input\\_s3\\_replication\\_permissions\\_boundary\\_arn) | Permissions boundary ARN for the created IAM replication role. | `string` | `null` | no |\n| \u003ca name=\"input_s3_replication_rules\"\u003e\u003c/a\u003e [s3\\_replication\\_rules](#input\\_s3\\_replication\\_rules) | Specifies the replication rules for S3 bucket replication if enabled. You must also set s3\\_replication\\_enabled to true. | \u003cpre\u003elist(object({\u003cbr/\u003e    id       = optional(string)\u003cbr/\u003e    priority = optional(number)\u003cbr/\u003e    prefix   = optional(string)\u003cbr/\u003e    status   = optional(string, \"Enabled\")\u003cbr/\u003e    # delete_marker_replication { status } had been flattened for convenience\u003cbr/\u003e    delete_marker_replication_status = optional(string, \"Disabled\")\u003cbr/\u003e    # Add the configuration as it appears in the resource, for consistency\u003cbr/\u003e    # this nested version takes precedence if both are provided.\u003cbr/\u003e    delete_marker_replication = optional(object({\u003cbr/\u003e      status = string\u003cbr/\u003e    }))\u003cbr/\u003e\u003cbr/\u003e    # destination_bucket is specified here rather than inside the destination object because before optional\u003cbr/\u003e    # attributes, it made it easier to work with the Terraform type system and create a list of consistent type.\u003cbr/\u003e    # It is preserved for backward compatibility, but the nested version takes priority if both are provided.\u003cbr/\u003e    destination_bucket = optional(string) # destination bucket ARN, overrides s3_replica_bucket_arn\u003cbr/\u003e\u003cbr/\u003e    destination = object({\u003cbr/\u003e      bucket        = optional(string) # destination bucket ARN, overrides s3_replica_bucket_arn\u003cbr/\u003e      storage_class = optional(string, \"STANDARD\")\u003cbr/\u003e      # replica_kms_key_id at this level is for backward compatibility, and is overridden by the one in `encryption_configuration`\u003cbr/\u003e      replica_kms_key_id = optional(string, \"\")\u003cbr/\u003e      encryption_configuration = optional(object({\u003cbr/\u003e        replica_kms_key_id = string\u003cbr/\u003e      }))\u003cbr/\u003e      access_control_translation = optional(object({\u003cbr/\u003e        owner = string\u003cbr/\u003e      }))\u003cbr/\u003e      # account_id is for backward compatibility, overridden by account\u003cbr/\u003e      account_id = optional(string)\u003cbr/\u003e      account    = optional(string)\u003cbr/\u003e      # For convenience, specifying either metrics or replication_time enables both\u003cbr/\u003e      metrics = optional(object({\u003cbr/\u003e        event_threshold = optional(object({\u003cbr/\u003e          minutes = optional(number, 15) # Currently 15 is the only valid number\u003cbr/\u003e        }), { minutes = 15 })\u003cbr/\u003e        status = optional(string, \"Enabled\")\u003cbr/\u003e      }), { status = \"Disabled\" })\u003cbr/\u003e      # To preserve backward compatibility, Replication Time Control (RTC) is automatically enabled\u003cbr/\u003e      # when metrics are enabled. To enable metrics without RTC, you must explicitly configure\u003cbr/\u003e      # replication_time.status = \"Disabled\".\u003cbr/\u003e      replication_time = optional(object({\u003cbr/\u003e        time = optional(object({\u003cbr/\u003e          minutes = optional(number, 15) # Currently 15 is the only valid number\u003cbr/\u003e        }), { minutes = 15 })\u003cbr/\u003e        status = optional(string)\u003cbr/\u003e      }))\u003cbr/\u003e    })\u003cbr/\u003e\u003cbr/\u003e    source_selection_criteria = optional(object({\u003cbr/\u003e      replica_modifications = optional(object({\u003cbr/\u003e        status = string # Either Enabled or Disabled\u003cbr/\u003e      }))\u003cbr/\u003e      sse_kms_encrypted_objects = optional(object({\u003cbr/\u003e        status = optional(string)\u003cbr/\u003e      }))\u003cbr/\u003e    }))\u003cbr/\u003e    # filter.prefix overrides top level prefix\u003cbr/\u003e    filter = optional(object({\u003cbr/\u003e      prefix = optional(string)\u003cbr/\u003e      tags   = optional(map(string), {})\u003cbr/\u003e    }))\u003cbr/\u003e  }))\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_s3_replication_source_roles\"\u003e\u003c/a\u003e [s3\\_replication\\_source\\_roles](#input\\_s3\\_replication\\_source\\_roles) | Cross-account IAM Role ARNs that will be allowed to perform S3 replication to this bucket (for replication within the same AWS account, it's not necessary to adjust the bucket policy). | `list(string)` | `[]` | no |\n| \u003ca name=\"input_s3_request_payment_configuration\"\u003e\u003c/a\u003e [s3\\_request\\_payment\\_configuration](#input\\_s3\\_request\\_payment\\_configuration) | S3 request payment configuration | \u003cpre\u003eobject({\u003cbr/\u003e    enabled               = bool\u003cbr/\u003e    expected_bucket_owner = optional(string)\u003cbr/\u003e    payer                 = string\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"enabled\": false,\u003cbr/\u003e  \"payer\": \"BucketOwner\"\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_source_ip_allow_list\"\u003e\u003c/a\u003e [source\\_ip\\_allow\\_list](#input\\_source\\_ip\\_allow\\_list) | List of IP addresses to allow to perform all actions to the bucket | `list(string)` | `[]` | no |\n| \u003ca name=\"input_source_policy_documents\"\u003e\u003c/a\u003e [source\\_policy\\_documents](#input\\_source\\_policy\\_documents) | List of IAM policy documents (in JSON) that are merged together into the exported document.\u003cbr/\u003eStatements defined in source\\_policy\\_documents must have unique SIDs.\u003cbr/\u003eStatement having SIDs that match policy SIDs generated by this module will override them. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_sse_algorithm\"\u003e\u003c/a\u003e [sse\\_algorithm](#input\\_sse\\_algorithm) | The server-side encryption algorithm to use. Valid values are `AES256` and `aws:kms` | `string` | `\"AES256\"` | no |\n| \u003ca name=\"input_ssm_base_path\"\u003e\u003c/a\u003e [ssm\\_base\\_path](#input\\_ssm\\_base\\_path) | The base path for SSM parameters where created IAM user's access key is stored | `string` | `\"/s3_user/\"` | no |\n| \u003ca name=\"input_stage\"\u003e\u003c/a\u003e [stage](#input\\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |\n| \u003ca name=\"input_store_access_key_in_ssm\"\u003e\u003c/a\u003e [store\\_access\\_key\\_in\\_ssm](#input\\_store\\_access\\_key\\_in\\_ssm) | Set to `true` to store the created IAM user's access key in SSM Parameter Store,\u003cbr/\u003e`false` to store them in Terraform state as outputs.\u003cbr/\u003eSince Terraform state would contain the secrets in plaintext,\u003cbr/\u003euse of SSM Parameter Store is recommended. | `bool` | `false` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).\u003cbr/\u003eNeither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_tenant\"\u003e\u003c/a\u003e [tenant](#input\\_tenant) | ID element \\_(Rarely used, not included by default)\\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |\n| \u003ca name=\"input_transfer_acceleration_enabled\"\u003e\u003c/a\u003e [transfer\\_acceleration\\_enabled](#input\\_transfer\\_acceleration\\_enabled) | Set this to `true` to enable S3 Transfer Acceleration for the bucket.\u003cbr/\u003eNote: When this is set to `false` Terraform does not perform drift detection\u003cbr/\u003eand will not disable Transfer Acceleration if it was enabled outside of Terraform.\u003cbr/\u003eTo disable it via Terraform, you must set this to `true` and then to `false`.\u003cbr/\u003eNote: not all regions support Transfer Acceleration. | `bool` | `false` | no |\n| \u003ca name=\"input_user_enabled\"\u003e\u003c/a\u003e [user\\_enabled](#input\\_user\\_enabled) | Set to `true` to create an IAM user with permission to access the bucket | `bool` | `false` | no |\n| \u003ca name=\"input_user_permissions_boundary_arn\"\u003e\u003c/a\u003e [user\\_permissions\\_boundary\\_arn](#input\\_user\\_permissions\\_boundary\\_arn) | Permission boundary ARN for the IAM user created to access the bucket. | `string` | `null` | no |\n| \u003ca name=\"input_versioning_enabled\"\u003e\u003c/a\u003e [versioning\\_enabled](#input\\_versioning\\_enabled) | A state of versioning. Versioning is a means of keeping multiple variants of an object in the same bucket | `bool` | `true` | no |\n| \u003ca name=\"input_website_configuration\"\u003e\u003c/a\u003e [website\\_configuration](#input\\_website\\_configuration) | Specifies the static website hosting configuration object | \u003cpre\u003elist(object({\u003cbr/\u003e    index_document = string\u003cbr/\u003e    error_document = string\u003cbr/\u003e    routing_rules = list(object({\u003cbr/\u003e      condition = object({\u003cbr/\u003e        http_error_code_returned_equals = string\u003cbr/\u003e        key_prefix_equals               = string\u003cbr/\u003e      })\u003cbr/\u003e      redirect = object({\u003cbr/\u003e        host_name               = string\u003cbr/\u003e        http_redirect_code      = string\u003cbr/\u003e        protocol                = string\u003cbr/\u003e        replace_key_prefix_with = string\u003cbr/\u003e        replace_key_with        = string\u003cbr/\u003e      })\u003cbr/\u003e    }))\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_website_redirect_all_requests_to\"\u003e\u003c/a\u003e [website\\_redirect\\_all\\_requests\\_to](#input\\_website\\_redirect\\_all\\_requests\\_to) | If provided, all website requests will be redirected to the specified host name and protocol | \u003cpre\u003elist(object({\u003cbr/\u003e    host_name = string\u003cbr/\u003e    protocol  = string\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_access_key_id\"\u003e\u003c/a\u003e [access\\_key\\_id](#output\\_access\\_key\\_id) | The access key ID, if `var.user_enabled \u0026\u0026 var.access_key_enabled`.\u003cbr/\u003eWhile sensitive, it does not need to be kept secret, so this is output regardless of `var.store_access_key_in_ssm`. |\n| \u003ca name=\"output_access_key_id_ssm_path\"\u003e\u003c/a\u003e [access\\_key\\_id\\_ssm\\_path](#output\\_access\\_key\\_id\\_ssm\\_path) | The SSM Path under which the S3 User's access key ID is stored |\n| \u003ca name=\"output_bucket_arn\"\u003e\u003c/a\u003e [bucket\\_arn](#output\\_bucket\\_arn) | Bucket ARN |\n| \u003ca name=\"output_bucket_domain_name\"\u003e\u003c/a\u003e [bucket\\_domain\\_name](#output\\_bucket\\_domain\\_name) | FQDN of bucket |\n| \u003ca name=\"output_bucket_id\"\u003e\u003c/a\u003e [bucket\\_id](#output\\_bucket\\_id) | Bucket Name (aka ID) |\n| \u003ca name=\"output_bucket_region\"\u003e\u003c/a\u003e [bucket\\_region](#output\\_bucket\\_region) | Bucket region |\n| \u003ca name=\"output_bucket_regional_domain_name\"\u003e\u003c/a\u003e [bucket\\_regional\\_domain\\_name](#output\\_bucket\\_regional\\_domain\\_name) | The bucket region-specific domain name |\n| \u003ca name=\"output_bucket_website_domain\"\u003e\u003c/a\u003e [bucket\\_website\\_domain](#output\\_bucket\\_website\\_domain) | The bucket website domain, if website is enabled |\n| \u003ca name=\"output_bucket_website_endpoint\"\u003e\u003c/a\u003e [bucket\\_website\\_endpoint](#output\\_bucket\\_website\\_endpoint) | The bucket website endpoint, if website is enabled |\n| \u003ca name=\"output_enabled\"\u003e\u003c/a\u003e [enabled](#output\\_enabled) | Is module enabled |\n| \u003ca name=\"output_replication_role_arn\"\u003e\u003c/a\u003e [replication\\_role\\_arn](#output\\_replication\\_role\\_arn) | The ARN of the replication IAM Role |\n| \u003ca name=\"output_secret_access_key\"\u003e\u003c/a\u003e [secret\\_access\\_key](#output\\_secret\\_access\\_key) | The secret access key will be output if created and not stored in SSM. However, the secret access key, if created,\u003cbr/\u003ewill be written to the Terraform state file unencrypted, regardless of any other settings.\u003cbr/\u003eSee the [Terraform documentation](https://www.terraform.io/docs/state/sensitive-data.html) for more details. |\n| \u003ca name=\"output_secret_access_key_ssm_path\"\u003e\u003c/a\u003e [secret\\_access\\_key\\_ssm\\_path](#output\\_secret\\_access\\_key\\_ssm\\_path) | The SSM Path under which the S3 User's secret access key is stored |\n| \u003ca name=\"output_user_arn\"\u003e\u003c/a\u003e [user\\_arn](#output\\_user\\_arn) | The ARN assigned by AWS for the user |\n| \u003ca name=\"output_user_enabled\"\u003e\u003c/a\u003e [user\\_enabled](#output\\_user\\_enabled) | Is user creation enabled |\n| \u003ca name=\"output_user_name\"\u003e\u003c/a\u003e [user\\_name](#output\\_user\\_name) | Normalized IAM user name |\n| \u003ca name=\"output_user_unique_id\"\u003e\u003c/a\u003e [user\\_unique\\_id](#output\\_user\\_unique\\_id) | The user unique ID assigned by AWS |\n\u003c!-- markdownlint-restore --\u003e\n\n\n## Related Projects\n\nCheck out these related projects.\n\n- [terraform-aws-cloudfront-s3-cdn](https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn) - Terraform module to easily provision CloudFront CDN backed by an S3 origin\n- [terraform-aws-s3-website](https://github.com/cloudposse/terraform-aws-s3-website) - Terraform Module for Creating S3 backed Websites and Route53 DNS\n- [terraform-aws-user-data-s3-backend](https://github.com/cloudposse/terraform-aws-user-data-s3-backend) - Terraform Module to Offload User Data to S3\n- [terraform-aws-s3-logs-athena-query](https://github.com/cloudposse/terraform-aws-s3-logs-athena-query) - A Terraform module that creates an Athena Database and Structure for querying S3 access logs\n- [terraform-aws-lb-s3-bucket](https://github.com/cloudposse/terraform-aws-lb-s3-bucket) - Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs\n- [terraform-aws-s3-log-storage](https://github.com/cloudposse/terraform-aws-s3-log-storage) - Terraform module creates an S3 bucket suitable for receiving logs from other AWS services such as S3, CloudFront, and CloudTrail\n\n\n\u003e [!TIP]\n\u003e #### Use Terraform Reference Architectures for AWS\n\u003e\n\u003e Use Cloud Posse's ready-to-go [terraform architecture blueprints](https://cloudposse.com/reference-architecture/) for AWS to get up and running quickly.\n\u003e\n\u003e ✅ We build it together with your team.\u003cbr/\u003e\n\u003e ✅ Your team owns everything.\u003cbr/\u003e\n\u003e ✅ 100% Open Source and backed by fanatical support.\u003cbr/\u003e\n\u003e\n\u003e \u003ca href=\"https://cpco.io/commercial-support?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=commercial_support\"\u003e\u003cimg alt=\"Request Quote\" src=\"https://img.shields.io/badge/request%20quote-success.svg?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003e \u003cdetails\u003e\u003csummary\u003e📚 \u003cstrong\u003eLearn More\u003c/strong\u003e\u003c/summary\u003e\n\u003e\n\u003e \u003cbr/\u003e\n\u003e\n\u003e Cloud Posse is the leading [**DevOps Accelerator**](https://cpco.io/commercial-support?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=commercial_support) for funded startups and enterprises.\n\u003e\n\u003e *Your team can operate like a pro today.*\n\u003e\n\u003e Ensure that your team succeeds by using Cloud Posse's proven process and turnkey blueprints. Plus, we stick around until you succeed.\n\u003e #### Day-0:  Your Foundation for Success\n\u003e - **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code.\n\u003e - **Deployment Strategy.** Adopt a proven deployment strategy with GitHub Actions, enabling automated, repeatable, and reliable software releases.\n\u003e - **Site Reliability Engineering.** Gain total visibility into your applications and services with Datadog, ensuring high availability and performance.\n\u003e - **Security Baseline.** Establish a secure environment from the start, with built-in governance, accountability, and comprehensive audit logs, safeguarding your operations.\n\u003e - **GitOps.** Empower your team to manage infrastructure changes confidently and efficiently through Pull Requests, leveraging the full power of GitHub Actions.\n\u003e\n\u003e \u003ca href=\"https://cpco.io/commercial-support?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=commercial_support\"\u003e\u003cimg alt=\"Request Quote\" src=\"https://img.shields.io/badge/request%20quote-success.svg?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003e\n\u003e #### Day-2: Your Operational Mastery\n\u003e - **Training.** Equip your team with the knowledge and skills to confidently manage the infrastructure, ensuring long-term success and self-sufficiency.\n\u003e - **Support.** Benefit from a seamless communication over Slack with our experts, ensuring you have the support you need, whenever you need it.\n\u003e - **Troubleshooting.** Access expert assistance to quickly resolve any operational challenges, minimizing downtime and maintaining business continuity.\n\u003e - **Code Reviews.** Enhance your team’s code quality with our expert feedback, fostering continuous improvement and collaboration.\n\u003e - **Bug Fixes.** Rely on our team to troubleshoot and resolve any issues, ensuring your systems run smoothly.\n\u003e - **Migration Assistance.** Accelerate your migration process with our dedicated support, minimizing disruption and speeding up time-to-value.\n\u003e - **Customer Workshops.** Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate.\n\u003e\n\u003e \u003ca href=\"https://cpco.io/commercial-support?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=commercial_support\"\u003e\u003cimg alt=\"Request Quote\" src=\"https://img.shields.io/badge/request%20quote-success.svg?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003e \u003c/details\u003e\n\n## ✨ Contributing\n\nThis project is under active development, and we encourage contributions from our community.\n\n\n\nMany thanks to our outstanding contributors:\n\n\u003ca href=\"https://github.com/cloudposse/terraform-aws-s3-bucket/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=cloudposse/terraform-aws-s3-bucket\u0026max=24\" /\u003e\n\u003c/a\u003e\n\nFor 🐛 bug reports \u0026 feature requests, please use the [issue tracker](https://github.com/cloudposse/terraform-aws-s3-bucket/issues).\n\nIn general, PRs are welcome. We follow the typical \"fork-and-pull\" Git workflow.\n 1. Review our [Code of Conduct](https://github.com/cloudposse/terraform-aws-s3-bucket/?tab=coc-ov-file#code-of-conduct) and [Contributor Guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md).\n 2. **Fork** the repo on GitHub\n 3. **Clone** the project to your own machine\n 4. **Commit** changes to your own branch\n 5. **Push** your work back up to your fork\n 6. Submit a **Pull Request** so that we can review your changes\n\n**NOTE:** Be sure to merge the latest changes from \"upstream\" before making a pull request!\n\n### 🌎 Slack Community\n\nJoin our [Open Source Community](https://cpco.io/slack?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=slack) on Slack. It's **FREE** for everyone! Our \"SweetOps\" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.\n\n### 📰 Newsletter\n\nSign up for [our newsletter](https://cpco.io/newsletter?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=newsletter) and join 3,000+ DevOps engineers, CTOs, and founders who get insider access to the latest DevOps trends, so you can always stay in the know.\nDropped straight into your Inbox every week — and usually a 5-minute read.\n\n### 📆 Office Hours \u003ca href=\"https://cloudposse.com/office-hours?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=office_hours\"\u003e\u003cimg src=\"https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png\" align=\"right\" /\u003e\u003c/a\u003e\n\n[Join us every Wednesday via Zoom](https://cloudposse.com/office-hours?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=office_hours) for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a _live Q\u0026A_ that you can’t find anywhere else.\nIt's **FREE** for everyone!\n## License\n\n\u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePreamble to the Apache License, Version 2.0\u003c/summary\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nComplete license is available in the [`LICENSE`](LICENSE) file.\n\n```text\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\n  https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n```\n\u003c/details\u003e\n\n## Trademarks\n\nAll other trademarks referenced herein are the property of their respective owners.\n\n\n---\nCopyright © 2017-2025 [Cloud Posse, LLC](https://cpco.io/copyright)\n\n\n\u003ca href=\"https://cloudposse.com/readme/footer/link?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cloudposse/terraform-aws-s3-bucket\u0026utm_content=readme_footer_link\"\u003e\u003cimg alt=\"README footer\" src=\"https://cloudposse.com/readme/footer/img\"/\u003e\u003c/a\u003e\n\n\u003cimg alt=\"Beacon\" width=\"0\" src=\"https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-s3-bucket?pixel\u0026cs=github\u0026cm=readme\u0026an=terraform-aws-s3-bucket\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudposse%2Fterraform-aws-s3-bucket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudposse%2Fterraform-aws-s3-bucket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudposse%2Fterraform-aws-s3-bucket/lists"}