Created
August 31, 2016 18:45
-
-
Save zerolaser/1664a0842d97a12c2ca4431454aa1c76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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