Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
Last active July 5, 2019 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisMcKee/675d4b954fffc08046a7712efe9497db to your computer and use it in GitHub Desktop.
Save ChrisMcKee/675d4b954fffc08046a7712efe9497db to your computer and use it in GitHub Desktop.
variable "aws_assume_role_arn" {
type = string
}
variable "aws_region" {
type = string
default = "eu-west-2"
}
variable "aws_region_replica" {
type = string
default = "eu-west-1"
}
terraform {
required_version = ">= 0.12"
}
provider "aws" {
assume_role {
role_arn = var.aws_assume_role_arn
}
region = var.aws_region
}
provider "aws" {
assume_role {
role_arn = var.aws_assume_role_arn
}
region = var.aws_region_replica
alias = "replicaregion"
}
resource "aws_s3_bucket" "x_test" {
bucket = "xxxxxafadfadadfaddfaxxxxxxxxtest"
}
output "x_test" {
value = aws_s3_bucket.x_test.id
}
resource "aws_s3_bucket" "x_r_test" {
bucket = "xxxxxafadfadadfaddfaxxxxxxxxtest-rep"
provider = aws.replicaregion
}
output "x_r_test" {
value = aws_s3_bucket.x_r_test.id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment