Skip to content

Commit f5406c0

Browse files
committed
[NDR-108] re-adding db and making action right
1 parent 1f1c445 commit f5406c0

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

.github/workflows/terraform-deploy-feature-to-sandbox.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
environment: ${{ github.event.inputs.environment }}
3030

3131
steps:
32-
# - name: Checkout Base
33-
# uses: actions/checkout@v4
34-
# with:
35-
# ref: main
32+
- name: Checkout Base
33+
uses: actions/checkout@v4
34+
with:
35+
ref: main
3636

3737
- name: Configure AWS Credentials
3838
uses: aws-actions/configure-aws-credentials@v4
@@ -52,25 +52,25 @@ jobs:
5252
terraform_version: 1.11.4
5353
terraform_wrapper: false
5454

55-
# - name: Terraform Init Base
56-
# id: base_init
57-
# run: terraform init -backend-config=backend.conf
58-
# working-directory: ./infrastructure
59-
# shell: bash
60-
# - name: Terraform Set Workspace Base
61-
# id: base_workspace
62-
# run: terraform workspace select -or-create ${{ github.event.inputs.sandboxWorkspace}}
63-
# working-directory: ./infrastructure
64-
# shell: bash
65-
# - name: Terraform Plan Base
66-
# id: base_plan
67-
# run: |
68-
# terraform plan -input=false -no-color -var-file="${{vars.TF_VARS_FILE}}" -out tf-base.plan
69-
# working-directory: ./infrastructure
70-
# shell: bash
71-
# - name: Terraform Apply Base
72-
# run: terraform apply -auto-approve -input=false tf-base.plan
73-
# working-directory: ./infrastructure
55+
- name: Terraform Init Base
56+
id: base_init
57+
run: terraform init -backend-config=backend.conf
58+
working-directory: ./infrastructure
59+
shell: bash
60+
- name: Terraform Set Workspace Base
61+
id: base_workspace
62+
run: terraform workspace select -or-create ${{ github.event.inputs.sandboxWorkspace}}
63+
working-directory: ./infrastructure
64+
shell: bash
65+
- name: Terraform Plan Base
66+
id: base_plan
67+
run: |
68+
terraform plan -input=false -no-color -var-file="${{vars.TF_VARS_FILE}}" -out tf-base.plan
69+
working-directory: ./infrastructure
70+
shell: bash
71+
- name: Terraform Apply Base
72+
run: terraform apply -auto-approve -input=false tf-base.plan
73+
working-directory: ./infrastructure
7474
- name: Checkout Branch
7575
uses: actions/checkout@v4
7676
with:

backup-vault/teraform/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ terraform {
66
}
77
}
88
backend "s3" {
9-
# dynamodb_table = "ndr-backup-terraform-lock"
10-
use_lockfile = true
11-
region = "eu-west-2"
12-
key = "ndr/terraform.tfstate"
13-
encrypt = true
9+
dynamodb_table = "ndr-backup-terraform-lock"
10+
use_lockfile = true
11+
region = "eu-west-2"
12+
key = "ndr/terraform.tfstate"
13+
encrypt = true
1414
}
1515
}
1616
provider "aws" {

bootstrap/main.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ resource "aws_s3_bucket_public_access_block" "public_access_block" {
6868

6969
data "aws_caller_identity" "current" {}
7070

71-
# resource "aws_dynamodb_table" "dynamodb_terraform_state_lock" {
72-
# name = "ndr-terraform-locks"
73-
# hash_key = "LockID"
74-
# read_capacity = 20
75-
# write_capacity = 20
71+
resource "aws_dynamodb_table" "dynamodb_terraform_state_lock" {
72+
name = "ndr-terraform-locks"
73+
hash_key = "LockID"
74+
read_capacity = 20
75+
write_capacity = 20
7676

77-
# attribute {
78-
# name = "LockID"
79-
# type = "S"
80-
# }
81-
# lifecycle {
82-
# prevent_destroy = true
83-
# }
84-
# }
77+
attribute {
78+
name = "LockID"
79+
type = "S"
80+
}
81+
lifecycle {
82+
prevent_destroy = true
83+
}
84+
}
8585

8686
variable "region" {
8787
type = string

infrastructure/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ terraform {
1212
}
1313
}
1414
backend "s3" {
15-
use_lockfile = true
16-
# dynamodb_table = "ndr-terraform-locks"
17-
region = "eu-west-2"
18-
key = "ndr/terraform.tfstate"
19-
encrypt = true
15+
use_lockfile = true
16+
dynamodb_table = "ndr-terraform-locks"
17+
region = "eu-west-2"
18+
key = "ndr/terraform.tfstate"
19+
encrypt = true
2020
}
2121
}
2222
provider "aws" {

0 commit comments

Comments
 (0)