-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add s3 resource to upload files to aws
- Loading branch information
Nishu Goel
committed
Jan 23, 2024
1 parent
c22211a
commit 1938380
Showing
5 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
# Upload file to S3 | ||
resource "epilot-file_upload_file" "my_uploadfile" { | ||
filename = "pumpkin.png" | ||
filename = "NishuGoel.png" | ||
mime_type = "image/png" | ||
} | ||
|
||
output "val" { | ||
output "uploaded_file" { | ||
value = epilot-file_upload_file.my_uploadfile | ||
} | ||
|
||
|
||
resource "aws_s3_object" "s3_file_upload" { | ||
bucket = epilot-file_upload_file.my_uploadfile.s3ref.bucket | ||
key = epilot-file_upload_file.my_uploadfile.s3ref.key | ||
source = "/Users/nishugoel/epilot/terraform blueprints/terraform-provider-epilot-file/examples/resources/epilot-file_upload_file/NishuGoel.png" | ||
} | ||
|
||
# Save uploaded file | ||
resource "epilot-file_file" "my_file" { | ||
access_control = "private" | ||
filename = epilot-file_upload_file.my_uploadfile.filename | ||
bucket = epilot-file_upload_file.my_uploadfile.s3ref.bucket | ||
key = epilot-file_upload_file.my_uploadfile.s3ref.key | ||
entity_id = "" | ||
} | ||
|
||
|