github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/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  ```
    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    assume_role_policy = <<POLICY
    37  {
    38    "Version": "2012-10-17",
    39    "Statement": [
    40      {
    41        "Action": "sts:AssumeRole",
    42        "Principal": {
    43          "Service": "config.amazonaws.com"
    44        },
    45        "Effect": "Allow",
    46        "Sid": ""
    47      }
    48    ]
    49  }
    50  POLICY
    51  }
    52  
    53  resource "aws_iam_role_policy" "p" {
    54    name = "awsconfig-example"
    55    role = "${aws_iam_role.r.id}"
    56    policy = <<POLICY
    57  {
    58    "Version": "2012-10-17",
    59    "Statement": [
    60      {
    61        "Action": [
    62          "s3:*"
    63        ],
    64        "Effect": "Allow",
    65        "Resource": [
    66          "${aws_s3_bucket.b.arn}",
    67          "${aws_s3_bucket.b.arn}/*"
    68        ]
    69      }
    70    ]
    71  }
    72  POLICY
    73  }
    74  ```
    75  
    76  ## Argument Reference
    77  
    78  The following arguments are supported:
    79  
    80  * `name` - (Optional) The name of the delivery channel. Defaults to `default`.
    81  * `s3_bucket_name` - (Required) The name of the S3 bucket used to store the configuration history.
    82  * `s3_key_prefix` - (Optional) The prefix for the specified S3 bucket.
    83  * `sns_topic_arn` - (Optional) The ARN of the SNS topic that AWS Config delivers notifications to.
    84  * `snapshot_delivery_properties` - (Optional) Options for how AWS Config delivers configuration snapshots. See below
    85  
    86  ### `snapshot_delivery_properties`
    87  
    88  * `delivery_frequency` - (Optional) - The frequency with which a AWS Config recurringly delivers configuration snapshots.
    89  	e.g. `One_Hour` or `Three_Hours`
    90  
    91  ## Attributes Reference
    92  
    93  The following attributes are exported:
    94  
    95  * `id` - The name of the delivery channel.
    96  
    97  ## Import
    98  
    99  Delivery Channel can be imported using the name, e.g. 
   100  
   101  ```
   102  $ terraform import aws_config_delivery_channel.foo example
   103  ```