Skip to content

Commit

Permalink
fixing resource tfstate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
slapula committed Mar 30, 2019
1 parent 8d4ee52 commit 5132ea5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion aws/resource_aws_backup_selection.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ func resourceAwsBackupSelectionRead(d *schema.ResourceData, meta interface{}) er
}
}
if resp.BackupSelection.Resources != nil {
d.Set("resources", resp.BackupSelection.Resources)
if err := d.Set("resources", aws.StringValueSlice(resp.BackupSelection.Resources)); err != nil {
return fmt.Errorf("error setting resources: %s", err)
}
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions aws/resource_aws_backup_selection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ resource "aws_backup_selection" "test" {
}
resources = [
"arn:aws:ec2:us-east-1:${data.aws_caller_identity.current.account_id}:volume/",
"arn:aws:elasticfilesystem:us-east-1:${data.aws_caller_identity.current.account_id}:file-system/"
"arn:aws:elasticfilesystem:us-east-1:${data.aws_caller_identity.current.account_id}:file-system/",
"arn:aws:ec2:us-east-1:${data.aws_caller_identity.current.account_id}:volume/"
]
}
`, rInt)
Expand Down

0 comments on commit 5132ea5

Please sign in to comment.