github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/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  }
    19  
    20  resource "aws_iam_user" "lb" {
    21      name = "loadbalancer"
    22      path = "/system/"
    23  }
    24  
    25  resource "aws_iam_user_policy" "lb_ro" {
    26      name = "test"
    27      user = "${aws_iam_user.lb.name}"
    28      policy = <<EOF
    29  {
    30    "Version": "2012-10-17",
    31    "Statement": [
    32      {
    33        "Action": [
    34          "ec2:Describe*"
    35        ],
    36        "Effect": "Allow",
    37        "Resource": "*"
    38      }
    39    ]
    40  }
    41  EOF
    42  }
    43  ```
    44  
    45  ## Argument Reference
    46  
    47  The following arguments are supported:
    48  
    49  * `user` - (Required) The IAM user to associate with this access key.
    50  
    51  ## Attributes Reference
    52  
    53  The following attributes are exported:
    54  
    55  * `id` - The access key ID.
    56  * `user` - The IAM user associated with this access key.
    57  * `secret` - The secret access key. Note that this will be written to the state file.
    58  * `ses_smtp_password` - The secret access key converted into an SES SMTP
    59    password by applying [AWS's documented conversion
    60    algorithm](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html#smtp-credentials-convert).
    61  * `status` - "Active" or "Inactive". Keys are initially active, but can be made
    62  	inactive by other means.