provider/aws: Add replica_source_db to the aws_db_instance datasource (#13842)

Fixes: #13471
This commit is contained in:
Paul Stack 2017-04-21 14:23:48 +03:00 committed by GitHub
parent f3160cdb9b
commit 0aad5f2c43
2 changed files with 7 additions and 0 deletions

View File

@ -188,6 +188,11 @@ func dataSourceAwsDbInstance() *schema.Resource {
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"replicate_source_db": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
@ -271,6 +276,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error
d.Set("storage_encrypted", dbInstance.StorageEncrypted)
d.Set("storage_type", dbInstance.StorageType)
d.Set("timezone", dbInstance.Timezone)
d.Set("replicate_source_db", dbInstance.ReadReplicaSourceDBInstanceIdentifier)
var vpcSecurityGroups []string
for _, v := range dbInstance.VpcSecurityGroups {

View File

@ -61,3 +61,4 @@ The following attributes are exported:
* `storage_type` - Specifies the storage type associated with DB instance.
* `timezone` - The time zone of the DB instance.
* `vpc_security_groups` - Provides a list of VPC security group elements that the DB instance belongs to.
* `replicate_source_db` - The identifier of the source DB that this is a replica of.