-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws.tf
62 lines (51 loc) · 1.43 KB
/
aws.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
52
53
54
55
56
57
58
59
60
61
62
provider "aws" {
version = "~> 2.55"
region = "eu-west-1"
}
resource "aws_s3_bucket" "videos-sandbox" {
bucket = "covital-video-sandbox"
acl = "public-read"
tags = {
Name = "covital video sandbox bucket"
Environment = "sandbox"
Owner = "covital backend engineering"
ManagedBy = "covital-infra terraform repo"
}
}
resource "aws_s3_bucket" "videos-staging" {
bucket = "covital-video-staging"
acl = "public-read-write"
tags = {
Name = "covital video staging bucket"
Environment = "staging"
Owner = "covital backend engineering"
ManagedBy = "covital-infra terraform repo"
}
}
##### TERRAFORM STATE TRACKING #########
resource "aws_s3_bucket" "terraform-state" {
bucket = "covital-terraform-state"
acl = "private"
tags = {
Name = "covital terraform state bucket"
Environment = "sandbox"
Owner = "covital backend engineering"
ManagedBy = "covital-infra terraform repo"
}
}
# create a dynamodb table for locking the state file
resource "aws_dynamodb_table" "dynamodb-terraform-state-lock" {
name = "terraform-state-lock-dynamo"
hash_key = "LockID"
read_capacity = 20
write_capacity = 20
attribute {
name = "LockID"
type = "S"
}
tags = {
Name = "DynamoDB Terraform State Lock Table"
Owner = "covital backend engineering"
ManagedBy = "covital-infra terraform repo"
}
}