Skip to content

Commit

Permalink
Rename development_environment variable to environmentx
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Sep 24, 2024
1 parent 552e816 commit 6a569b1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions web/deploy/terraform/modules/bootstrap/state_storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ provider "aws" {
}

resource "aws_s3_bucket" "tf_state" {
bucket = "${var.bucket_name}-${var.development_environment}"
bucket = "${var.bucket_name}-${var.environment}"

tags = {
Name = "${var.bucket_name}-${var.development_environment}"
Name = "${var.bucket_name}-${var.environment}"
}
}

resource "aws_s3_bucket_lifecycle_configuration" "tf_state" {
bucket = aws_s3_bucket.tf_state.id
rule {
id = "tf_state_${var.development_environment}"
id = "tf_state_${var.environment}"
status = "Enabled"

transition {
Expand Down Expand Up @@ -57,7 +57,7 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
}

resource "aws_dynamodb_table" "tf_locks" {
name = "${var.table_name}-${var.development_environment}"
name = "${var.table_name}-${var.environment}"
billing_mode = "PAY_PER_REQUEST"
hash_key = "LockID"

Expand All @@ -67,6 +67,6 @@ resource "aws_dynamodb_table" "tf_locks" {
}

tags = {
Name = "${var.bucket_name}-${var.development_environment}"
Name = "${var.bucket_name}-${var.environment}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variable "aws_region" {
default = "us-east-1"
}

variable "development_environment" {
variable "environment" {
description = "The name of the development environment. Usually `stage` or `prod`."
type = string
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module "prod_state_bootstrap" {
# I would like to make this path more robust using something like `path.root`
source = "../../../modules/bootstrap/state_storage/"

development_environment = var.development_environment
environment = var.environment
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "development_environment" {
variable "environment" {
description = "The name of the development environment. Usually `stage` or `prod`. Defaults to `prod`"
type = string
default = "prod"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module "stage_state_bootstrap" {
# I would like to make this path more robust using something like `path.root`
source = "../../../modules/bootstrap/state_storage/"

development_environment = var.development_environment
environment = var.environment
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "development_environment" {
variable "environment" {
description = "The name of the development environment. Usually `stage` or `prod`. Defaults to `stage`"
type = string
default = "stage"
Expand Down

0 comments on commit 6a569b1

Please sign in to comment.