Skip to content

Commit

Permalink
Added capability to fetch & store state in S3
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy724 committed Dec 2, 2022
1 parent a555e25 commit 026f651
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions terraform/elasticache/_override.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
security_group_ids = "${data.terraform_remote_state.network.outputs.web_sg_id}"
}
7 changes: 7 additions & 0 deletions terraform/elasticache/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
terraform {
backend "s3" {
bucket = "bp-step-tfstate"
key = "elasticache/terraform.tfstate"
region = "us-west-2"
}
}
9 changes: 9 additions & 0 deletions terraform/elasticache/data.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
data "terraform_remote_state" "network" {
backend = "s3"

config = {
bucket = "bp-step-tfstate"
key = "network/terraform.tfstate"
region = "us-west-2"
}

0 comments on commit 026f651

Please sign in to comment.