Skip to content

Commit

Permalink
changes to the aws provider to allow tf0.13 module dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyBarros committed Jul 27, 2020
1 parent 8f12c4a commit 363f863
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
16 changes: 15 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,21 @@ data "terraform_remote_state" "dns" {
//--------------------------------------------------------------------

provider "aws" {
version = ">= 1.20.0"
region = var.primary_region
alias = "primary"
}

provider "aws" {
region = var.secondary_region
alias = "secondary"
}


module "primarycluster" {
providers = {
aws.demostack = aws.primary
aws = aws.primary
}
source = "./modules"
owner = var.owner
region = var.primary_region
Expand Down Expand Up @@ -84,6 +94,10 @@ module "primarycluster" {


module "secondarycluster" {
providers = {
aws.demostack = aws.secondary
aws = aws.secondary
}
source = "./modules"
owner = var.owner
region = var.secondary_region
Expand Down
4 changes: 2 additions & 2 deletions modules/aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ terraform {
}

provider "aws" {
# version = "~> 2.0"
region = var.region
alias = "demostack"
region = var.region
}
//Getting the Domaing name
data "aws_route53_zone" "fdqn" {
Expand Down
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ variable "host_access_ip" {
}


variable "region" {
description = "The region to create resources."
default = "eu-west-2"
}

variable "namespace" {
description = <<EOH
this is the differantiates different demostack deployment on the same subscription, everycluster should have a different value
Expand Down

0 comments on commit 363f863

Please sign in to comment.