-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for various iam_* resources.
- Loading branch information
Showing
7 changed files
with
296 additions
and
1 deletion.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
website/source/docs/providers/aws/r/iam_group.html.markdown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_iam_group" | ||
sidebar_current: "docs-aws-resource-iam-group" | ||
description: |- | ||
Provides an IAM group. | ||
--- | ||
|
||
# aws\_iam\_group | ||
|
||
Provides an IAM group. | ||
|
||
## Example Usage | ||
|
||
``` | ||
resource "aws_iam_group" "developers" { | ||
name = "developers" | ||
path = "/users/" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The group's name. | ||
* `path` - (Optional, default "/") Path in which to create the group. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The group's ID. | ||
* `arn` - The ARN assigned by AWS for this group. | ||
* `name` - The group's name. | ||
* `path` - The path of the group in IAM. | ||
* `unique_id` - The [unique ID][1] assigned by AWS. | ||
|
||
[1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs |
55 changes: 55 additions & 0 deletions
55
website/source/docs/providers/aws/r/iam_group_policy.html.markdown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_group_policy" | ||
sidebar_current: "docs-aws-resource-iam-group-policy" | ||
description: |- | ||
Provides an IAM policy attached to a group. | ||
--- | ||
|
||
# aws\_iam\_group\_policy | ||
|
||
Provides an IAM policy attached to a group. | ||
|
||
## Example Usage | ||
|
||
``` | ||
resource "aws_iam_group" "my_developers" { | ||
name = "developers" | ||
path = "/users/" | ||
} | ||
resource "iam_group_policy" "my_developer_policy" { | ||
name = "my_developer_policy" | ||
group = "${aws_iam_group.my_developers.id}" | ||
policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ec2:Describe*" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
EOF | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `policy` - (Required) The policy document. This is a JSON formatted string. | ||
The heredoc syntax or `file` funciton is helpful here. | ||
* `name` - (Required) Name of the policy. | ||
* `user` - (Required) The IAM group to attach to the policy. | ||
|
||
## Attributes Reference | ||
|
||
* `id` - The group policy ID. | ||
* `group` - The group to which this policy applies. | ||
* `name` - The name of the policy. | ||
* `policy` - The policy document attached to the group. |
59 changes: 59 additions & 0 deletions
59
website/source/docs/providers/aws/r/iam_instance_profile.html.markdown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_iam_instance_profile" | ||
sidebar_current: "docs-aws-resource-iam-instance-profile" | ||
description: |- | ||
Provides an IAM instance profile. | ||
--- | ||
|
||
# aws\_iam\_instance\_profile | ||
|
||
Provides an IAM instance profile. | ||
|
||
## Example Usage | ||
|
||
``` | ||
resource "aws_iam_role" "role" { | ||
name = "test_role" | ||
path = "/" | ||
policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ec2:Describe*" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
EOF | ||
} | ||
resource "aws_iam_instance_profile" "test_profile" { | ||
name = "test_profile" | ||
roles = ["${aws_iam_role.role.name}"] | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The profile's name. | ||
* `path` - (Optional, default "/") Path in which to create the profile. | ||
* `roles` - (Required) A list of role names to include in the profile. | ||
|
||
## Attribute Reference | ||
|
||
* `id` - The instance profile's ID. | ||
* `arn` - The ARN assigned by AWS to the instance profile. | ||
* `create_date` - The creation timestamp of the instance profile. | ||
* `name` - The instance profile's name. | ||
* `path` - The path of the instance profile in IAM. | ||
* `roles` - The list of roles assigned to the instance profile. | ||
* `unique_id` - The [unique ID][1] assigned by AWS. | ||
|
||
[1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs |
54 changes: 54 additions & 0 deletions
54
website/source/docs/providers/aws/r/iam_policy.html.markdown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_iam_policy" | ||
sidebar_current: "docs-aws-resource-iam-policy" | ||
description: |- | ||
Provides an IAM policy. | ||
--- | ||
|
||
# aws\_iam\_policy | ||
|
||
Provides an IAM policy. | ||
|
||
``` | ||
resource "aws_iam_policy" "policy" { | ||
name = "test_policy" | ||
path = "/" | ||
description = "My test policy" | ||
policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ec2:Describe*" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
EOF | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `description` - (Optional) Description of the IAM policy. | ||
* `path` - (Optional, default "/") Path in which to create the policy. | ||
* `policy` - (Required) The policy document. This is a JSON formatted string. | ||
The heredoc syntax or `file` funciton is helpful here. | ||
* `name` (Required) - The name of the policy. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The policy's ID. | ||
* `arn` - The ARN assigned by AWS to this policy. | ||
* `description` - The description of the policy. | ||
* `name` - The name of the policy. | ||
* `path` - The path of the policy in IAM. | ||
* `policy` - The policy document. |
67 changes: 67 additions & 0 deletions
67
website/source/docs/providers/aws/r/iam_role_policy.html.markdown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
layout: "aws" | ||
page_title: "AWS: aws_iam_role_policy" | ||
sidebar_current: "docs-aws-resource-iam-role-policy" | ||
description: |- | ||
Provides an IAM role policy. | ||
--- | ||
|
||
# aws\_iam\_role\_policy | ||
|
||
Provides an IAM role policy. | ||
|
||
## Example Usage | ||
|
||
``` | ||
resource "aws_iam_role" "test_role" { | ||
name = "test_role" | ||
assume_role_policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Principal": { | ||
"Service": "ec2.amazonaws.com" | ||
}, | ||
"Effect": "Allow", | ||
"Sid": "" | ||
} | ||
] | ||
} | ||
EOF | ||
} | ||
resource "aws_iam_role_policy" "test_policy" { | ||
name = "test_policy" | ||
role = "${aws_iam_role.test_role.id}" | ||
policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"ec2:Describe*" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The name of the role policy. | ||
* `policy` - (Required) The policy document. This is a JSON formatted string. | ||
The heredoc syntax or `file` funciton is helpful here. | ||
* `role` - (Required) The IAM role to attach to the policy. | ||
|
||
## Attributes Reference | ||
|
||
* `id` - The role policy ID. | ||
* `name` - The name of the policy. | ||
* `policy` - The policy document attached to the role. | ||
* `role` - The role to which this policy applies. |
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