Skip to content

Commit

Permalink
resource/aws_db_proxy: Address linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gazoakley committed Aug 3, 2020
1 parent 33c9d39 commit 00ab3d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion aws/resource_aws_db_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ func flattenDbProxyAuths(userAuthConfigs []*rds.UserAuthConfigInfo) *schema.Set

func resourceAwsDbProxyRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).rdsconn
ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig

params := rds.DescribeDBProxiesInput{
DBProxyName: aws.String(d.Id()),
Expand Down Expand Up @@ -302,7 +303,11 @@ func resourceAwsDbProxyRead(d *schema.ResourceData, meta interface{}) error {
return fmt.Errorf("Error listing tags for RDS DB Proxy (%s): %s", d.Get("arn").(string), err)
}

if err := d.Set("tags", tags.IgnoreAws().Map()); err != nil {
// if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
// return fmt.Errorf("error setting tags: %s", err)
// }

if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
return fmt.Errorf("Error setting tags: %s", err)
}

Expand Down
3 changes: 1 addition & 2 deletions aws/resource_aws_db_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ func TestAccAWSDBProxy_basic(t *testing.T) {
resourceName, "name", name),
resource.TestCheckResourceAttr(
resourceName, "engine_family", "MYSQL"),
resource.TestMatchResourceAttr(
resourceName, "arn", regexp.MustCompile(`^arn:[^:]+:rds:[^:]+:\d{12}:db-proxy:.+`)),
testAccMatchResourceAttrRegionalARN(resourceName, "arn", "rds", regexp.MustCompile(`db-proxy:.+`)),
),
},
{
Expand Down

0 comments on commit 00ab3d2

Please sign in to comment.