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
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,22 @@ module "s3_bucket" {
69
69
}
70
70
```
71
71
72
+
## Terragrunt and `variable "..." { type = any }`
73
+
74
+
There is a bug [#1211](https://github.com/gruntwork-io/terragrunt/issues/1211) in Terragrunt related to the way how the variables of type `any` are passed to Terraform.
75
+
76
+
This module solves this issue by supporting `jsonencode()`-string in addition to the expected type (`list` or `map`).
77
+
78
+
In `terragrunt.hcl` you can write:
79
+
80
+
```terraform
81
+
inputs = {
82
+
bucket = "foobar" # `bucket` has type `string`, no need to jsonencode()
83
+
cors_rule = jsonencode([...]) # `cors_rule` has type `any`, so `jsonencode()` is required
84
+
}
85
+
```
86
+
87
+
72
88
## Examples:
73
89
74
90
*[Complete](https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/tree/master/examples/complete) - Complete S3 bucket with most of supported features enabled
0 commit comments