github.com/armen/terraform@v0.5.2-0.20150529052519-caa8117a08f1/website/source/docs/providers/aws/r/iam_access_key.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_iam_access_key"
     4  sidebar_current: "docs-aws-resource-iam-access-key"
     5  description: |-
     6    Provides an IAM access key. This is a set of credentials that allow API requests to be made as an IAM user.
     7  ---
     8  
     9  # aws\_iam\_access\_key
    10  
    11  Provides an IAM access key. This is a set of credentials that allow API requests to be made as an IAM user.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_iam_access_key" "lb" {
    17      user = "${aws_iam_user.lb.name}"
    18      status = "Active"
    19  }
    20  
    21  resource "aws_iam_user" "lb" {
    22      name = "loadbalancer"
    23      path = "/system/"
    24  }
    25  
    26  resource "aws_iam_user_policy" "lb_ro" {
    27      name = "test"
    28      user = "${aws_iam_user.lb.name}"
    29      policy = <<EOF
    30  {
    31    "Version": "2012-10-17",
    32    "Statement": [
    33      {
    34        "Action": [
    35          "ec2:Describe*"
    36        ],
    37        "Effect": "Allow",
    38        "Resource": "*"
    39      }
    40    ]
    41  }
    42  EOF
    43  }
    44  ```
    45  
    46  ## Argument Reference
    47  
    48  The following arguments are supported:
    49  
    50  * `user` - (Required) The IAM user to associate with this access key.
    51  
    52  ## Attributes Reference
    53  
    54  The following attributes are exported:
    55  
    56  * `id` - The access key ID.
    57  * `user` - The IAM user associated with this access key.
    58  * `secret` - The secret access key. Note that this will be written to the state file.
    59  * `status` - "Active" or "Inactive". Keys are initially active, but can be made
    60  	inactive by other means.