You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't specify all fields(even though some of them are optional) for CORS rule structure, plan fails with:
terraform plan -var-file main.tfvars -out plan
Error: Invalid value for module argument
on main.tf line 125, in module "s3-dev":
125: cors_rules = [
126: {
127: allowed_origins = ["http://localhost/"]
128: allowed_methods = ["GET", "PUT", "POST"]
129: allowed_headers = ["Authorization", "x-amz-date", "x-amz-content-sha256", "content-type", "content-disposition"]
130: expose_headers = ["ETag"]
131: max_age_seconds = 3000
132: },
133: {
134: allowed_origins = ["*"]
135: allowed_methods = ["GET"]
136: max_age_seconds = 3000
137: }
138: ]
The given value is not suitable for child module variable "cors_rules" defined
at ../../modules/s3/variables.tf:247,1-22: all list elements must have the
same type.
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.
If you don't specify all fields(even though some of them are optional) for CORS rule structure, plan fails with:
main.tf
Obvious(a little bit ugly, though) solution would be specifying
max_age_seconds
as a list and using only the first element of it:module/s3/main.tf
main.tf
The text was updated successfully, but these errors were encountered: