provider/aws: Add reader_endpoint RDS Clusters (supersedes #8878) (#8884)

* provider/aws: Add support for Aurora ReaderEndpoint

* provider/aws: Add reader_endpoint to the schema, document, test
This commit is contained in:
Clint 2016-09-16 10:45:04 -05:00 committed by Radek Simko
parent 458e921dea
commit 69f44a04e9
3 changed files with 10 additions and 0 deletions

View File

@ -85,6 +85,11 @@ func resourceAwsRDSCluster() *schema.Resource {
Computed: true,
},
"reader_endpoint": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"engine": &schema.Schema{
Type: schema.TypeString,
Computed: true,
@ -443,6 +448,7 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error {
d.Set("preferred_backup_window", dbc.PreferredBackupWindow)
d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow)
d.Set("kms_key_id", dbc.KmsKeyId)
d.Set("reader_endpoint", dbc.ReaderEndpoint)
var vpcg []string
for _, g := range dbc.VpcSecurityGroups {

View File

@ -30,6 +30,8 @@ func TestAccAWSRDSCluster_basic(t *testing.T) {
"aws_rds_cluster.default", "storage_encrypted", "false"),
resource.TestCheckResourceAttr(
"aws_rds_cluster.default", "db_cluster_parameter_group_name", "default.aurora5.6"),
resource.TestCheckResourceAttrSet(
"aws_rds_cluster.default", "reader_endpoint"),
),
},
},

View File

@ -94,6 +94,8 @@ The following attributes are exported:
* `preferred_backup_window` - The backup window
* `preferred_maintenance_window` - The maintenance window
* `endpoint` - The DNS address of the RDS instance
* `reader_endpoint` - A read-only endpoint for the Aurora cluster, automatically
load-balanced across replicas
* `engine` - The database engine
* `engine_version` - The database engine version
* `maintenance_window` - The instance maintenance window