mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
added S3 resource
This commit is contained in:
parent
6e6942507e
commit
12868566c1
3 changed files with 23 additions and 0 deletions
15
terraform/aws/new-s3/main.tf
Normal file
15
terraform/aws/new-s3/main.tf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Create a demo S3 bucket
|
||||
resource "aws_s3_bucket" "demo_s3" {
|
||||
bucket = var.demo_s3_name
|
||||
acl = "private"
|
||||
|
||||
# enable versioning on bucket
|
||||
versioning {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = "learning-tools"
|
||||
tools = "terraform"
|
||||
}
|
||||
}
|
||||
3
terraform/aws/new-s3/output.tf
Normal file
3
terraform/aws/new-s3/output.tf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
output "demo_s3_id" {
|
||||
value = "${aws_s3_bucket.demo_s3.id}"
|
||||
}
|
||||
5
terraform/aws/new-s3/variables.tf
Normal file
5
terraform/aws/new-s3/variables.tf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
variable "demo_s3_name" {
|
||||
type = "string"
|
||||
default = "learning-tools-demo-s3"
|
||||
description = "demo S3 bucket for terraform in learning-tools"
|
||||
}
|
||||
Loading…
Reference in a new issue