Skip to content

Commit

Permalink
resource_aws_efs_filesystem: create tags when resource is created
Browse files Browse the repository at this point in the history
The tags for the efs filesystems were being attached after the resource
was created. AWS has since updated their API so that tags can be
specificed at create time.

Fixes #7662
  • Loading branch information
mildwonkey committed Sep 26, 2019
1 parent 9eac12c commit a3686f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions aws/resource_aws_efs_file_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func resourceAwsEfsFileSystemCreate(d *schema.ResourceData, meta interface{}) er
createOpts := &efs.CreateFileSystemInput{
CreationToken: aws.String(creationToken),
ThroughputMode: aws.String(throughputMode),
Tags: tagsFromMapEFS(d.Get("tags").(map[string]interface{})),
}

if v, ok := d.GetOk("performance_mode"); ok {
Expand Down Expand Up @@ -193,11 +194,6 @@ func resourceAwsEfsFileSystemCreate(d *schema.ResourceData, meta interface{}) er
}
}

err = setTagsEFS(conn, d)
if err != nil {
return fmt.Errorf("error setting tags for EFS file system (%q): %s", d.Id(), err)
}

return resourceAwsEfsFileSystemRead(d, meta)
}

Expand Down

0 comments on commit a3686f0

Please sign in to comment.