Skip to content

Commit 675896f

Browse files
committed
keep state in s3
1 parent 67c2205 commit 675896f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

terraform/envs/prod/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
data "aws_caller_identity" "current" {}
2+
locals {
3+
account_id = data.aws_caller_identity.current.account_id
4+
}
5+
16
terraform {
27
required_providers {
38
aws = {
@@ -7,6 +12,12 @@ terraform {
712
}
813

914
required_version = ">= 1.2"
15+
backend "s3" {
16+
bucket = "298118738376-terraform"
17+
key = "infra-core-api"
18+
region = "us-east-1"
19+
use_lockfile = true
20+
}
1021
}
1122

1223
provider "aws" {

terraform/envs/qa/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ terraform {
77
}
88

99
required_version = ">= 1.2"
10+
11+
backend "s3" {
12+
bucket = "427040638965-terraform"
13+
key = "infra-core-api"
14+
region = "us-east-1"
15+
use_lockfile = true
16+
}
1017
}
1118

1219
provider "aws" {

0 commit comments

Comments
 (0)