Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
devonbleak authored and Devon Bleak committed May 1, 2018
1 parent 98a6430 commit 01a3425
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
4 changes: 4 additions & 0 deletions website/aws.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,10 @@
<a href="/docs/providers/aws/r/iam_user.html">aws_iam_user</a>
</li>

<li<%= sidebar_current("docs-aws-resource-iam-user-group-membership") %>>
<a href="/docs/providers/aws/r/iam_user_group_membership.html">aws_iam_user_group_membership</a>
</li>

<li<%= sidebar_current("docs-aws-resource-iam-user-login-profile") %>>
<a href="/docs/providers/aws/r/iam_user_login_profile.html">aws_iam_user_login_profile</a>
</li>
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/iam_group_membership.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Provides a top level resource to manage IAM Group membership for IAM Users. For
more information on managing IAM Groups or IAM Users, see [IAM Groups][1] or
[IAM Users][2]

~> **Note:** `aws_iam_group_membership` will conflict with itself if used more than once with the same group.

## Example Usage

```hcl
Expand Down Expand Up @@ -49,7 +51,7 @@ The following arguments are supported:

## Attributes Reference

* `name` - The name to identifing the Group Membership
* `name` - The name to identify the Group Membership
* `users` - list of IAM User names
* `group` – IAM Group name

Expand Down
70 changes: 70 additions & 0 deletions website/docs/r/iam_user_group_membership.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
layout: "aws"
page_title: "AWS: aws_iam_user_group_membership"
sidebar_current: "docs-aws-resource-iam-user-group-membership"
description: |-
Provides a resource for adding an IAM User to IAM Groups without conflicting
with itself.
---

# aws_iam_user_group_membership

Provides a resource for adding an [IAM User][2] to [IAM Groups][1]. This
resource will not conflict with itself when used multiple times for the same
user.

## Example usage

```hcl
resource "aws_iam_user_group_membership" {
name = "user-group-membership-1"
user = "${aws_iam_user.user1.name}"
groups = [
"${aws_iam_group.group1.name}",
"${aws_iam_group.group2.name}",
]
}
resource "aws_iam_user_group_membership" {
name = "user-group-membership-2"
user = "${aws_iam_user.user1.name}"
groups = [
"${aws_iam_group.group3.name}",
]
}
resource "aws_iam_user" "user1" {
name = "user1"
}
resource "aws_iam_group" "group1" {
name = "group1"
}
resource "aws_iam_group" "group2" {
name = "group2"
}
resource "aws_iam_group" "group3" {
name = "group3"
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The name to identify the user group Membership
* `user` - (Required) The name of the [IAM User][2] to add to groups
* `groups` - (Required) A list of [IAM Groups][1] to add the user to

## Attributes Reference

* `name` - The name to identify the user group membership
* `user` - The name of the IAM User
* `groups` - The list of IAM Groups

[1]: /docs/providers/aws/r/iam_group.html
[2]: /docs/providers/aws/r/iam_user.html

0 comments on commit 01a3425

Please sign in to comment.