github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/config_delivery_channel.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_config_delivery_channel"
     4  sidebar_current: "docs-aws-resource-config-delivery-channel"
     5  description: |-
     6    Provides an AWS Config Delivery Channel.
     7  ---
     8  
     9  # aws\_config\_delivery\_channel
    10  
    11  Provides an AWS Config Delivery Channel.
    12  
    13  ~> **Note:** Delivery Channel requires a [Configuration Recorder](/docs/providers/aws/r/config_configuration_recorder.html) to be present. Use of `depends_on` (as shown below) is recommended to avoid race conditions.
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  resource "aws_config_delivery_channel" "foo" {
    19    name           = "example"
    20    s3_bucket_name = "${aws_s3_bucket.b.bucket}"
    21    depends_on     = ["aws_config_configuration_recorder.foo"]
    22  }
    23  
    24  resource "aws_s3_bucket" "b" {
    25    bucket        = "example-awsconfig"
    26    force_destroy = true
    27  }
    28  
    29  resource "aws_config_configuration_recorder" "foo" {
    30    name     = "example"
    31    role_arn = "${aws_iam_role.r.arn}"
    32  }
    33  
    34  resource "aws_iam_role" "r" {
    35    name = "awsconfig-example"
    36  
    37    assume_role_policy = <<POLICY
    38  {
    39    "Version": "2012-10-17",
    40    "Statement": [
    41      {
    42        "Action": "sts:AssumeRole",
    43        "Principal": {
    44          "Service": "config.amazonaws.com"
    45        },
    46        "Effect": "Allow",
    47        "Sid": ""
    48      }
    49    ]
    50  }
    51  POLICY
    52  }
    53  
    54  resource "aws_iam_role_policy" "p" {
    55    name = "awsconfig-example"
    56    role = "${aws_iam_role.r.id}"
    57  
    58    policy = <<POLICY
    59  {
    60    "Version": "2012-10-17",
    61    "Statement": [
    62      {
    63        "Action": [
    64          "s3:*"
    65        ],
    66        "Effect": "Allow",
    67        "Resource": [
    68          "${aws_s3_bucket.b.arn}",
    69          "${aws_s3_bucket.b.arn}/*"
    70        ]
    71      }
    72    ]
    73  }
    74  POLICY
    75  }
    76  ```
    77  
    78  ## Argument Reference
    79  
    80  The following arguments are supported:
    81  
    82  * `name` - (Optional) The name of the delivery channel. Defaults to `default`.
    83  * `s3_bucket_name` - (Required) The name of the S3 bucket used to store the configuration history.
    84  * `s3_key_prefix` - (Optional) The prefix for the specified S3 bucket.
    85  * `sns_topic_arn` - (Optional) The ARN of the SNS topic that AWS Config delivers notifications to.
    86  * `snapshot_delivery_properties` - (Optional) Options for how AWS Config delivers configuration snapshots. See below
    87  
    88  ### `snapshot_delivery_properties`
    89  
    90  * `delivery_frequency` - (Optional) - The frequency with which a AWS Config recurringly delivers configuration snapshots.
    91  	e.g. `One_Hour` or `Three_Hours`
    92  
    93  ## Attributes Reference
    94  
    95  The following attributes are exported:
    96  
    97  * `id` - The name of the delivery channel.
    98  
    99  ## Import
   100  
   101  Delivery Channel can be imported using the name, e.g.
   102  
   103  ```
   104  $ terraform import aws_config_delivery_channel.foo example
   105  ```