Skip to content

Instantly share code, notes, and snippets.

@rberlind
Created April 12, 2018 21:20
Show Gist options
  • Save rberlind/68471f5cb370259b074274ab0758ff11 to your computer and use it in GitHub Desktop.
Save rberlind/68471f5cb370259b074274ab0758ff11 to your computer and use it in GitHub Desktop.
Terraform config to test assume role from EC2 Role
provider "aws" {
assume_role {
role_arn = "arn:aws:iam::128997349609:role/terraform-role"
session_name = "terraform"
}
}
resource "aws_instance" "web" {
ami = "ami-2e1ef954"
instance_type = "t2.micro"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment