Skip to content

Commit

Permalink
add remote state for global in components
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking authored and czimergebot committed Jul 11, 2018
1 parent 41578b2 commit f041010
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/component/fogg.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ variable "tags" {
}
}

data "terraform_remote_state" "global" {
backend = "s3"

config {
bucket = "{{ $out.InfraBucket }}"
key = "terraform/{{ .Project }}/global.tfstate"
region = "{{ $out.AWSRegionBackend }}"
{{ if $out.AWSProfileBackend }}profile = "{{ $out.AWSProfileBackend }}"{{ end }}
}
}

{{ range $component := .OtherComponents | sortAlpha }}
data "terraform_remote_state" "{{ $component }}" {
backend = "s3"
Expand Down

0 comments on commit f041010

Please sign in to comment.