Skip to content

Commit 2a353aa

Browse files
committed
Cleanup workflow. Add new backend to house state.
1 parent e03799e commit 2a353aa

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/plan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
22

3-
name: TofuPlan
3+
name: Tofu Plan
44

55
on:
66
workflow_dispatch:
@@ -66,7 +66,7 @@ jobs:
6666
working-directory: ./terraform
6767
run: tofu init
6868

69-
- name: Apply changes
69+
- name: Run tofu plan
7070
env:
7171
TF_LOG: "INFO"
7272
working-directory: ./terraform

terraform/main.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
terraform {
2+
backend "s3" {
3+
bucket = "${var.project_name}-${var.environment}-tfstate"
4+
key = "${var.project_name}.tfstate"
5+
region = var.aws_region
6+
dynamodb_table = "${var.environment}.tfstate"
7+
}
8+
}
9+
module "backend" {
10+
source = "github.com/codeforamerica/tofu-modules-aws-backend?ref=1.1.1"
11+
12+
project = var.project_name
13+
environment = var.environment
14+
}
15+
116
module "logging" {
217
source = "github.com/codeforamerica/tofu-modules-aws-logging?ref=2.1.0"
318

0 commit comments

Comments
 (0)