https://github.com/turnerlabs/terraform-s3-user
A Terraform module that creates a tagged S3 bucket and an IAM user/key with access to the bucket
https://github.com/turnerlabs/terraform-s3-user
bucket s3 terraform user
Last synced: about 1 year ago
JSON representation
A Terraform module that creates a tagged S3 bucket and an IAM user/key with access to the bucket
- Host: GitHub
- URL: https://github.com/turnerlabs/terraform-s3-user
- Owner: turnerlabs
- License: other
- Created: 2016-11-17T22:47:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-18T17:41:10.000Z (almost 7 years ago)
- Last Synced: 2025-04-09T19:00:50.397Z (over 1 year ago)
- Topics: bucket, s3, terraform, user
- Language: HCL
- Size: 7.81 KB
- Stars: 19
- Watchers: 4
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### terraform-s3-user
A Terraform module that creates a tagged S3 bucket and an IAM user/key with access to the bucket
+**WARNING**: This module outputs the IAM Secret key of the user it creates and it will be part of your project's tfstate file. Please be very careful where you store the tfstate file and especially do not commit the tfstate file as is in your VCS. Consider using a [Terraform remote state backend](https://www.terraform.io/docs/backends/types/index.html) that supports encryption and secure policies.
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| bucket_name | name of the bucket | string | - | yes |
| tag_application | application | string | - | yes |
| tag_contact-email | contact-email | string | - | yes |
| tag_customer | customer | string | - | yes |
| tag_environment | environment | string | - | yes |
| tag_team | team | string | - | yes |
| versioning | enable versioning | string | `false` | no |
| multipart_delete | enable incomplete multipart upload deletion | string | `true` | no |
| multipart_days | incomplete multipart upload deletion days | string | `3` | no |
## Outputs
| Name | Description |
|------|-------------|
| bucket_arn | the arn of the bucket that was created |
| bucket_name | the name of the bucket |
| iam_access_key_id | the access key |
| iam_access_key_secret | the access key secret |
| user_arn | the arn of the user that was created |
| user_name | the name of the service account user that was created |
### usage example
```hcl
provider "aws" {
region = "us-east-1"
profile = "digital-sandbox"
}
module "s3_user" {
source = "github.com/turnerlabs/terraform-s3-user?ref=v2.1"
bucket_name = "my-bucket"
tag_team = "my-team"
tag_contact-email = "my-team@turner.com"
tag_application = "my-app"
tag_environment = "dev"
tag_customer = "my-customer"
}
```
```
terraform init
terraform plan
terraform apply
terraform output -module s3_user
```