Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 2.71 KB

README.md

File metadata and controls

85 lines (60 loc) · 2.71 KB

aws_s3

Create S3 Bucket in AWS

Usage

Before executing you must configure the environment variables:

Linux:

$ export AWS_ACCESS_KEY_ID="XXXXXXXXXXXX"
$ export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Windows:

set AWS_ACCESS_KEY_ID="XXXXXXXXXXXX"
set AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

To run this example you need to execute:

$ terraform init
$ terraform plan
$ terraform apply 

If you want to change the variables, you need to execute:

$ terraform init
$ terraform plan
$ terraform apply -var="region=us-east-2" -var="acl=private" -var="bucket=buckettestflugel" -var="tags_name=Flugel" -var="tags_owner=InfraTeam"

Note that this example may create resources which cost money. Run terraform destroy when you don't need these resources.

Examples:

Requirements

Name Version
terraform >= 0.12.6
aws >= 3.0

Providers

Name Version
aws >= 3.0

Inputs

Name Description Type Default Required
region (Optional) Region of the AWS provider. string "us-east-2" no
acl (Optional) The canned ACL to apply. Defaults to 'private'. Conflicts with grant string "private" no
bucket (Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. string "buckettestflugel" no
tags_name (Optional) A mapping of tags (Name) to assign to the bucket. string "Flugel" no
tags_owner (Optional) A mapping of tags (Owner) to assign to the bucket. string "InfraTeam" no

Outputs

Name Description
_s3_bucket_arn The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.
_s3_bucket_id The name of the bucket.
_s3_bucket_tags The tags of the bucket.

Authors

Module managed by Ronald Saenz.

License

GNU General Public Licensed. See LICENSE for full details.