[FATAL] putting object failed (): one of source / content / content_base64 is not set
Closed this issue · 0 comments
53845714nF commented
Description
I get this error even though I have source
in my minio_s3_object.
Steps to Reproduce
Part of my TF File:
resource "minio_s3_object" "vite_app_index_html" {
depends_on = [null_resource.vite_app_build]
bucket_name = minio_s3_bucket.vite_app_bucket.bucket
object_name = "index.html"
source = "dist/index.html"
content_type = "text/html"
}
resource "minio_s3_object" "vite_app_js" {
depends_on = [null_resource.vite_app_build]
bucket_name = minio_s3_bucket.vite_app_bucket.bucket
object_name = "assets/main.js"
source = "dist/assets/index-*.js"
content_type = "application/javascript"
}
resource "minio_s3_object" "vite_app_css" {
depends_on = [ null_resource.vite_app_build]
bucket_name = minio_s3_bucket.vite_app_bucket.bucket
object_name = "assets/main.css"
source = "dist/assets/index-*.css"
content_type = "text/css"
}
Run: terraform apply
Then i get this Errors:
Error: [FATAL] putting object failed (): one of source / content / content_base64 is not set
│
│ with minio_s3_object.vite_app_index_html,
│ on main.tf line 38, in resource "minio_s3_object" "vite_app_index_html":
│ 38: resource "minio_s3_object" "vite_app_index_html" {
│
╵
╷
│ Error: [FATAL] putting object failed (): one of source / content / content_base64 is not set
│
│ with minio_s3_object.vite_app_js,
│ on main.tf line 46, in resource "minio_s3_object" "vite_app_js":
│ 46: resource "minio_s3_object" "vite_app_js" {
│
╵
╷
│ Error: [FATAL] putting object failed (): one of source / content / content_base64 is not set
│
│ with minio_s3_object.vite_app_css,
│ on main.tf line 54, in resource "minio_s3_object" "vite_app_css":
│ 54: resource "minio_s3_object" "vite_app_css" {
Expected behavior: No Error, because source
is set.
Actual behavior: Get Error.
Reproduces how often: Always
Versions
terraform -v
Terraform v1.6.5
on linux_amd64
+ provider registry.terraform.io/aminueza/minio v2.0.1
+ provider registry.terraform.io/hashicorp/null v3.2.2
Additional Information
I build a Vite app locally beforehand. The css and js files have random names. Can understand that he could not find them in the local filesystem.
But it should actually find the index.html.