Skip to content

Commit

Permalink
chore: Update AWS S3 bucket names for Terraform state backend
Browse files Browse the repository at this point in the history
  • Loading branch information
nilgaar committed Aug 18, 2024
1 parent e335024 commit 25afd5f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
22 changes: 0 additions & 22 deletions IaC/aws/backend/_provider.tf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
variable "bucket_name" {
default = "tofu-backend-state"
}

variable "dynamodb_table_name" {
default = "tofu-state-lock"
provider "aws" {
region = var.region
}

resource "aws_s3_bucket" "state_backend" {
bucket = var.bucket_name
force_destroy = true
tags = {
Name = var.bucket_name
Environment = "dev"
}

lifecycle {
prevent_destroy = false
Expand Down Expand Up @@ -55,10 +47,5 @@ resource "aws_dynamodb_table" "tofu_backend_lock" {
name = "LockID"
type = "S"
}

tags = {
Name = var.dynamodb_table_name
Environment = "dev"
}
}

17 changes: 17 additions & 0 deletions IaC/aws/backend/variables.tofu
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable "availability_zone" {
type = string
default = "eu-west-1a"
}

variable "region" {
type = string
default = "eu-west-1"
}

variable "bucket_name" {
default = "tofu-backend-state"
}

variable "dynamodb_table_name" {
default = "tofu-state-lock"
}

0 comments on commit 25afd5f

Please sign in to comment.