From 37d99ac1d61c1a7e42478eb5e519477312a919b7 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsuda Date: Mon, 5 Aug 2019 16:33:13 +0900 Subject: [PATCH] Support aurora-mysql engine type in performance insights Now that all the valid engine types support performance insights, remove the code to check engine type. --- aws/resource_aws_rds_cluster_instance.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_rds_cluster_instance.go b/aws/resource_aws_rds_cluster_instance.go index 4d7a94604c9..2c1e9d24a01 100644 --- a/aws/resource_aws_rds_cluster_instance.go +++ b/aws/resource_aws_rds_cluster_instance.go @@ -256,14 +256,12 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ createOpts.MonitoringRoleArn = aws.String(attr.(string)) } - if attr, _ := d.GetOk("engine"); attr == "aurora-postgresql" || attr == "aurora" { - if attr, ok := d.GetOk("performance_insights_enabled"); ok { - createOpts.EnablePerformanceInsights = aws.Bool(attr.(bool)) - } + if attr, ok := d.GetOk("performance_insights_enabled"); ok { + createOpts.EnablePerformanceInsights = aws.Bool(attr.(bool)) + } - if attr, ok := d.GetOk("performance_insights_kms_key_id"); ok { - createOpts.PerformanceInsightsKMSKeyId = aws.String(attr.(string)) - } + if attr, ok := d.GetOk("performance_insights_kms_key_id"); ok { + createOpts.PerformanceInsightsKMSKeyId = aws.String(attr.(string)) } if attr, ok := d.GetOk("preferred_backup_window"); ok {