Revert "working policy assignment"

This reverts commit 0975a70c37.
pull/1986/head
Michael Austin 11 years ago
parent b926b11521
commit b41c7375db

@ -67,10 +67,6 @@ func resourceAwsS3Bucket() *schema.Resource {
Computed: true,
},
"policy": &schema.Schema{
Type: schema.TypeString,
Optional: true,
},
"tags": tagsSchema(),
},
}
@ -104,19 +100,6 @@ func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error {
return fmt.Errorf("Error creating S3 bucket: %s", err)
}
policy := d.Get("policy").(string)
if policy != "" {
log.Printf("[DEBUG] S3 bucket optional policy was specified: %s", policy)
_, err := s3conn.PutBucketPolicy(
&s3.PutBucketPolicyInput{
Bucket: aws.String(bucket),
Policy: aws.String(policy),
})
if err != nil {
return fmt.Errorf("Error adding policy to S3 bucket: %s", err)
}
}
// Assign the bucket name as the resource ID
d.SetId(bucket)

Loading…
Cancel
Save