Skip to content

Commit

Permalink
Move config terraform bucket to config.tf file
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Feb 19, 2019
1 parent 5f30503 commit e13709f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 7 additions & 0 deletions deploy/aws/config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@
limitations under the License.
*/

# Bucket config must be here: https://github.com/hashicorp/terraform/issues/13589
terraform {
required_version = ">= 0.11.11"

backend "s3" {
bucket = "terraform-qed-cluster"
key = "terraform.tfstate"
region = "eu-west-1"
}
}

provider "aws" {
Expand Down
8 changes: 0 additions & 8 deletions deploy/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ resource "null_resource" "prebuild" {
}
}

# Bucket config must be here: https://github.com/hashicorp/terraform/issues/13589
terraform {
backend "s3" {
bucket = "terraform-qed-cluster"
key = "terraform.tfstate"
region = "eu-west-1"
}
}
module "leader" {
source = "./modules/qed"

Expand Down
3 changes: 2 additions & 1 deletion deploy/aws/pre-build/bucket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ provider "aws" {
region = "eu-west-1"
profile = "${var.aws_profile}"
}

resource "aws_s3_bucket" "terraform-qed-cluster" {
bucket = "terraform-qed-cluster"

Expand All @@ -21,4 +22,4 @@ resource "aws_s3_bucket" "terraform-qed-cluster" {
tags {
Name = "S3 Remote Terraform State Store"
}
}
}

0 comments on commit e13709f

Please sign in to comment.