-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/AWS: Add new resource for creating objects in an S3 bucket #2079
provider/AWS: Add new resource for creating objects in an S3 bucket #2079
Conversation
You can likely remove the
|
That makes sense! I have no idea why I didn’t think of that before. I will try that when I have some time to test it.
|
Hey @m-s-austin is this something you're still working on? Following up to see if you are, or need someone to try and take up the reins. Thanks! |
@catsby @m-s-austin I'm very interested in having this feature. Let me know if you need any help in getting it ready. |
@catsby sorry I have been slammed. we are just using it in our fork as it is. It's been working great! |
and also to verify
that format does work and removes needing the depends_on |
I see code, acceptance test, and docs - looks like maybe this is good to go? What do you think, @catsby? |
return fmt.Errorf("Error putting object in S3 bucket (%s): %s", bucket, err) | ||
} | ||
|
||
d.SetId(*resp.ETag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hesitant on using the ETag
here, simply because the API mentions that if a user supplies their own key to encrypt the file(s), the ETag
will not be the md5
... it doesn't clearly say what it will be in that case though. I worry that down the road we expand on this and then get into a situation where we're losing objects :/
Can we simply use key
here, instead?
Thanks again for the contribution. I had some more questions, but otherwise this works out. It does need to be rebased on
|
All those things said, this is probably good enough, so that if you don't get to these things in the next day or so I'll just push my own branch based on this and do them myself. Thanks! |
Closing in favor of #2898, thanks for the contribution @m-s-austin ! |
provider/aws: Add S3 Bucket Object (supercedes #2079)
I found the examples to upload objects by making ZIP but can we upload multiple files to S3 without Zip? If yes can you give me some example?? resource "aws_s3_bucket" "testbucket" {
} resource "aws_s3_bucket_object" "uploadfile" { } my files are inside project folders. Thanks. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This code adds a new resource that allows you to "preload" a bucket with objects. Usage is as follows:
here is a working example of the format.
Acceptance test is also working now :)