Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Enable DynamoDB Table to output stream_arm when streams are enabled #5271

Merged
merged 1 commit into from
Feb 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions builtin/providers/aws/resource_aws_dynamodb_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func resourceAwsDynamoDbTable() *schema.Resource {
},
ValidateFunc: validateStreamViewType,
},
"stream_arn": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -641,6 +645,7 @@ func resourceAwsDynamoDbTableRead(d *schema.ResourceData, meta interface{}) erro
if table.StreamSpecification != nil {
d.Set("stream_view_type", table.StreamSpecification.StreamViewType)
d.Set("stream_enabled", table.StreamSpecification.StreamEnabled)
d.Set("stream_arn", table.LatestStreamArn)
}

err = d.Set("global_secondary_index", gsiList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ parameter.
* `non_key_attributes` - (Optional) Only required with *INCLUDE* as a
projection type; a list of attributes to project into the index. These
do not need to be defined as attributes on the table.
* `stream_enabled` - (Optional) Indicates whether Streams is to be enabled (true) or disabled (false).
* `stream_enabled` - (Optional) Indicates whether Streams are to be enabled (true) or disabled (false).
* `stream_view_type` - (Optional) When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

For `global_secondary_index` objects only, you need to specify
Expand Down Expand Up @@ -114,4 +114,5 @@ The following attributes are exported:

* `arn` - The arn of the table
* `id` - The name of the table
* `stream_arm` - The ARN of the Table Stream. Only available when `stream_enabled = true`