Skip to content

Commit

Permalink
resource/rds_cluster_instance: Export the RDI Resource ID for the ins…
Browse files Browse the repository at this point in the history
…tance

Fixes: #1081
  • Loading branch information
stack72 committed Jul 14, 2017
1 parent 0ff4206 commit c4dbeed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aws/resource_aws_rds_cluster_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ func resourceAwsRDSClusterInstance() *schema.Resource {
Computed: true,
},

"dbi_resource_id": {
Type: schema.TypeString,
Computed: true,
},

"auto_minor_version_upgrade": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -284,6 +289,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{})
d.Set("cluster_identifier", db.DBClusterIdentifier)
d.Set("instance_class", db.DBInstanceClass)
d.Set("identifier", db.DBInstanceIdentifier)
d.Set("dbi_resource_id", db.DbiResourceId)
d.Set("storage_encrypted", db.StorageEncrypted)
d.Set("kms_key_id", db.KmsKeyId)
d.Set("auto_minor_version_upgrade", db.AutoMinorVersionUpgrade)
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_rds_cluster_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestAccAWSRDSClusterInstance_basic(t *testing.T) {
resource.TestCheckResourceAttr("aws_rds_cluster_instance.cluster_instances", "auto_minor_version_upgrade", "true"),
resource.TestCheckResourceAttrSet("aws_rds_cluster_instance.cluster_instances", "preferred_maintenance_window"),
resource.TestCheckResourceAttrSet("aws_rds_cluster_instance.cluster_instances", "preferred_backup_window"),
resource.TestCheckResourceAttrSet("aws_rds_cluster_instance.cluster_instances", "dbi_resource_id"),
),
},
{
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/rds_cluster_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ this instance is a read replica
* `status` - The RDS instance status
* `storage_encrypted` - Specifies whether the DB cluster is encrypted.
* `kms_key_id` - The ARN for the KMS encryption key if one is set to the cluster.
* `dbi_resource_id` - The region-unique, immutable identifier for the DB instance.

[2]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html
[3]: /docs/providers/aws/r/rds_cluster.html
Expand Down

0 comments on commit c4dbeed

Please sign in to comment.