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

resource/aws_rds_cluster: Adding hosted_zone_id as an exported attribute #3267

Merged
merged 2 commits into from
Feb 11, 2018
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
6 changes: 6 additions & 0 deletions aws/resource_aws_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func resourceAwsRDSCluster() *schema.Resource {
Computed: true,
},

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

"engine": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -590,6 +595,7 @@ func flattenAwsRdsClusterResource(d *schema.ResourceData, meta interface{}, dbc
d.Set("reader_endpoint", dbc.ReaderEndpoint)
d.Set("replication_source_identifier", dbc.ReplicationSourceIdentifier)
d.Set("iam_database_authentication_enabled", dbc.IAMDatabaseAuthenticationEnabled)
d.Set("hosted_zone_id", dbc.HostedZoneId)

var vpcg []string
for _, g := range dbc.VpcSecurityGroups {
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_rds_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func TestAccAWSRDSCluster_basic(t *testing.T) {
"aws_rds_cluster.default", "engine", "aurora"),
resource.TestCheckResourceAttrSet(
"aws_rds_cluster.default", "engine_version"),
resource.TestCheckResourceAttrSet(
"aws_rds_cluster.default", "hosted_zone_id"),
),
},
},
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/rds_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ load-balanced across replicas
* `storage_encrypted` - Specifies whether the DB cluster is encrypted
* `preferred_backup_window` - The daily time range during which the backups happen
* `replication_source_identifier` - ARN of the source DB cluster if this DB cluster is created as a Read Replica.
* `hosted_zone_id` - The Route53 Hosted Zone ID of the endpoint

[1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Replication.html
[2]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html
Expand Down