From 8abca07889089f4845ef0cb36d5f82a030a3a50f Mon Sep 17 00:00:00 2001 From: Patrick Gray Date: Thu, 18 Jun 2015 11:54:26 -0400 Subject: [PATCH] add markdown --- .../aws/r/iam_policy_attachment.html.markdown | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 website/source/docs/providers/aws/r/iam_policy_attachment.html.markdown diff --git a/website/source/docs/providers/aws/r/iam_policy_attachment.html.markdown b/website/source/docs/providers/aws/r/iam_policy_attachment.html.markdown new file mode 100644 index 000000000..4cc0e18cb --- /dev/null +++ b/website/source/docs/providers/aws/r/iam_policy_attachment.html.markdown @@ -0,0 +1,54 @@ +--- +layout: "aws" +page_title: "AWS: aws_iam_policy_attachment" +sidebar_current: "docs-aws-resource-iam-policy-attachment" +description: |- + Attaches a Managed IAM Policy to user(s), role(s), and/or group(s) +--- + +# aws\_iam\_policy\_attachment + +Attaches a Managed IAM Policy to user(s), role(s), and/or group(s) + +``` +resource "aws_iam_user" "user" { + name = "test-user" +} +resource "aws_iam_role" "role" { + name = "test-role" +} +resource "aws_iam_group" "group" { + name = "test-group" +} + +resource "aws_iam_policy" "policy" { + name = "test-policy" + description = "A test policy" + policy = #omitted +} + +resource "aws_iam_policy_attachment" "test-attach" { + name = "test-attachment" + users = ["${aws_iam_user.user.name}"] + roles = ["${aws_iam_role.role.name}"] + groups = ["${aws_iam_group.group.name}"] + policy_arn = "${aws_iam_policy.policy.arn}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` (Required) - The name of the policy. +* `users` (Optional) - The user(s) the policy should be applied to +* `roles (Optional) - The role(s) the policy should be applied to` +* `groups (Optional) - The group(s) the policy should be applied to` +* `policy_arn` (Required) - The ARN of the policy you want to apply + +## Attributes Reference + +The following attributes are exported: + +* `id` - The policy's ID. +* `name` - The name of the policy.