forked from benlaplanche/iac-tfplan-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3.tf
51 lines (44 loc) · 873 Bytes
/
s3.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# terraform {
# required_providers {
# aws = {
# source = "hashicorp/aws"
# version = "~> 3.0"
# }
# }
# }
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.26.0"
}
random = {
source = "hashicorp/random"
version = "3.0.1"
}
}
required_version = "~> 0.14"
backend "remote" {
organization = "benlaplanche"
workspaces {
name = "gh-actions-demo"
}
}
}
# Configure the AWS Provider
provider "aws" {
region = "us-east-1"
# shared_credentials_file = ".aws/credentials"
}
variable "s3_acl" {
type = string
default = "public-read-write"
}
resource "aws_s3_bucket" "pictures-of-snyky-dogs" {
bucket = "pictures-of-snyky-dogs"
acl = var.s3_acl
tags = {
Name = "Pictures of Snyky Dogs"
Environment = "Production"
}
}