Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ops/platform/root.tofu.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ locals {
# handled by the Terraservice module.
account_type = coalesce(var.account_type, one([for x in local.account_types : x if x == terraform.workspace]))

# This is just a breadcrum - helper variable that is not actually used in code but helps in tracking whether or not we are including this tf.
# tflint-ignore: terraform_unused_declarations
_canary_exists = module.terraservice.canary
}

variable "region" {
default = "us-east-1"
nullable = false
type = string
}

variable "secondary_region" {
default = "us-west-2"
nullable = false
type = string
}

variable "account_type" {
Expand All @@ -36,13 +40,15 @@ variable "account_type" {
}
}

# tflint-ignore: terraform_required_providers
provider "aws" {
region = var.region
default_tags {
tags = local.default_tags
}
}

# tflint-ignore: terraform_required_providers, terraform_unused_declarations
provider "aws" {
alias = "secondary"

Expand All @@ -52,6 +58,7 @@ provider "aws" {
}
}

# tflint-ignore: terraform_required_version
terraform {
backend "s3" {
bucket = "bfd-platform-${local.account_type}-tf-state"
Expand Down
7 changes: 7 additions & 0 deletions ops/services/root.tofu.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ locals {
"invalid-parent-env"
)

# This is just a breadcrum - helper variable that is not actually used in code but helps in tracking whether or not we are including this tf.
# tflint-ignore: terraform_unused_declarations
_canary_exists = module.terraservice.canary
}

variable "region" {
default = "us-east-1"
nullable = false
type = string
}

variable "secondary_region" {
default = "us-west-2"
nullable = false
type = string
}

variable "parent_env" {
Expand All @@ -37,13 +41,15 @@ variable "parent_env" {
}
}

# tflint-ignore: terraform_required_providers
provider "aws" {
region = var.region
default_tags {
tags = local.default_tags
}
}

# tflint-ignore: terraform_required_providers, terraform_unused_declarations
provider "aws" {
alias = "secondary"

Expand All @@ -54,6 +60,7 @@ provider "aws" {
}

terraform {
required_version = "~> 1.6"
backend "s3" {
bucket = "bfd-${local.parent_env}-tf-state"
key = "ops/services/${local.service}/tofu.tfstate"
Expand Down