From f24e8c7b53f39df3f3d5fdc2f2d57d2d71c5c3c4 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 12 May 2015 22:09:46 +0100 Subject: [PATCH 1/4] Add docs for aws_iam_role --- .../providers/aws/r/iam_role.html.markdown | 48 +++++++++++++++++++ website/source/layouts/aws.erb | 4 ++ 2 files changed, 52 insertions(+) create mode 100644 website/source/docs/providers/aws/r/iam_role.html.markdown diff --git a/website/source/docs/providers/aws/r/iam_role.html.markdown b/website/source/docs/providers/aws/r/iam_role.html.markdown new file mode 100644 index 000000000..d7292a9a7 --- /dev/null +++ b/website/source/docs/providers/aws/r/iam_role.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "aws" +page_title: "AWS: aws_iam_role" +sidebar_current: "docs-aws-resource-iam-role" +description: |- + Provides an IAM role. +--- + +# aws\_iam\_role + +Provides an IAM role. + +## Example Usage + +``` +resource "aws_iam_role" "test_role" { + name = "test_role" + assume_role_policy = <aws_iam_policy + > + aws_iam_role + + > aws_iam_role_policy From c2141304016c68f54525af2bf1c4c9f62e0327bf Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 12 May 2015 22:15:16 +0100 Subject: [PATCH 2/4] aws: Reorder resources in IAM examples in docs - This is to make relevant resources more visible --- .../aws/r/iam_access_key.html.markdown | 10 +++--- .../aws/r/iam_group_policy.html.markdown | 10 +++--- .../aws/r/iam_instance_profile.html.markdown | 10 +++--- .../aws/r/iam_role_policy.html.markdown | 34 +++++++++---------- .../aws/r/iam_user_policy.html.markdown | 20 +++++------ 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/website/source/docs/providers/aws/r/iam_access_key.html.markdown b/website/source/docs/providers/aws/r/iam_access_key.html.markdown index 0040c260c..c07d811dc 100644 --- a/website/source/docs/providers/aws/r/iam_access_key.html.markdown +++ b/website/source/docs/providers/aws/r/iam_access_key.html.markdown @@ -13,16 +13,16 @@ Provides an IAM access key. This is a set of credentials that allow API requests ## Example Usage ``` -resource "aws_iam_user" "lb" { - name = "loadbalancer" - path = "/system/" -} - resource "aws_iam_access_key" "lb" { user = "${aws_iam_user.lb.name}" status = "Active" } +resource "aws_iam_user" "lb" { + name = "loadbalancer" + path = "/system/" +} + resource "aws_iam_user_policy" "lb_ro" { name = "test" user = "${aws_iam_user.lb.name}" diff --git a/website/source/docs/providers/aws/r/iam_group_policy.html.markdown b/website/source/docs/providers/aws/r/iam_group_policy.html.markdown index 18603a662..e6df69e35 100644 --- a/website/source/docs/providers/aws/r/iam_group_policy.html.markdown +++ b/website/source/docs/providers/aws/r/iam_group_policy.html.markdown @@ -13,11 +13,6 @@ 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}" @@ -36,6 +31,11 @@ resource "iam_group_policy" "my_developer_policy" { } EOF } + +resource "aws_iam_group" "my_developers" { + name = "developers" + path = "/users/" +} ``` ## Argument Reference diff --git a/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown b/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown index 79d4e32ed..c3161d39c 100644 --- a/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown +++ b/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown @@ -13,6 +13,11 @@ Provides an IAM instance profile. ## Example Usage ``` +resource "aws_iam_instance_profile" "test_profile" { + name = "test_profile" + roles = ["${aws_iam_role.role.name}"] +} + resource "aws_iam_role" "role" { name = "test_role" path = "/" @@ -31,11 +36,6 @@ resource "aws_iam_role" "role" { } EOF } - -resource "aws_iam_instance_profile" "test_profile" { - name = "test_profile" - roles = ["${aws_iam_role.role.name}"] -} ``` ## Argument Reference diff --git a/website/source/docs/providers/aws/r/iam_role_policy.html.markdown b/website/source/docs/providers/aws/r/iam_role_policy.html.markdown index 60f439775..a22dbf190 100644 --- a/website/source/docs/providers/aws/r/iam_role_policy.html.markdown +++ b/website/source/docs/providers/aws/r/iam_role_policy.html.markdown @@ -13,6 +13,23 @@ Provides an IAM role policy. ## Example Usage ``` +resource "aws_iam_role_policy" "test_policy" { + name = "test_policy" + role = "${aws_iam_role.test_role.id}" + policy = < Date: Tue, 12 May 2015 22:20:38 +0100 Subject: [PATCH 3/4] Fix incorrect parameter name --- .../docs/providers/aws/r/iam_instance_profile.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown b/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown index c3161d39c..580cb3dca 100644 --- a/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown +++ b/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown @@ -21,7 +21,7 @@ resource "aws_iam_instance_profile" "test_profile" { resource "aws_iam_role" "role" { name = "test_role" path = "/" - policy = < Date: Tue, 12 May 2015 22:23:18 +0100 Subject: [PATCH 4/4] Add missing EOF to iam_role_policy example --- .../source/docs/providers/aws/r/iam_role_policy.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/source/docs/providers/aws/r/iam_role_policy.html.markdown b/website/source/docs/providers/aws/r/iam_role_policy.html.markdown index a22dbf190..2e9fe4620 100644 --- a/website/source/docs/providers/aws/r/iam_role_policy.html.markdown +++ b/website/source/docs/providers/aws/r/iam_role_policy.html.markdown @@ -29,6 +29,7 @@ resource "aws_iam_role_policy" "test_policy" { } ] } +EOF resource "aws_iam_role" "test_role" { name = "test_role"