Add proper reading/updating of tags for S3
This commit is contained in:
parent
c6d832333b
commit
be60d39b24
|
@ -91,6 +91,18 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp, err := s3conn.GetBucketTagging(&s3.GetBucketTaggingRequest{
|
||||
Bucket: aws.String(d.Id()),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := d.Set("tags", tagsToMapS3(resp.TagSet)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue