Skip to content

Instantly share code, notes, and snippets.

@zerolaser
Created August 31, 2016 18:45
Show Gist options
  • Save zerolaser/1664a0842d97a12c2ca4431454aa1c76 to your computer and use it in GitHub Desktop.
Save zerolaser/1664a0842d97a12c2ca4431454aa1c76 to your computer and use it in GitHub Desktop.
resource "aws_iam_user_policy" "policy" {
name = "${var.user}_policy"
user = "${aws_iam_user.user.name}"
policy = "${file("policy.json")}"
}
#add new user
resource "aws_iam_user" "user" {
name = "${var.user}"
path ="/"
}
#adding access key
resource "aws_iam_access_key" "accesskey" {
user = "${aws_iam_user.user.name}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment