Skip to content

Commit

Permalink
add logic to update in ec2 resources
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Apr 23, 2021
1 parent d0dc7d7 commit 92acf8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_ec2_managed_prefix_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func resourceAwsEc2ManagedPrefixListCreate(d *schema.ResourceData, meta interfac
input.PrefixListName = aws.String(v.(string))
}

if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 {
if len(tags) > 0 {
input.TagSpecifications = ec2TagSpecificationsFromKeyValueTags(tags, "prefix-list")
}

Expand Down Expand Up @@ -209,7 +209,7 @@ func resourceAwsEc2ManagedPrefixListRead(d *schema.ResourceData, meta interface{
func resourceAwsEc2ManagedPrefixListUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).ec2conn

if d.HasChangeExcept("tags") {
if d.HasChangesExcept("tags", "tags_all") {
input := &ec2.ModifyManagedPrefixListInput{
PrefixListId: aws.String(d.Id()),
}
Expand Down

0 comments on commit 92acf8a

Please sign in to comment.