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
I'd like to be able to define a variable like this in cdktf, where a is optional but b is not.
variable "complex" {
type = object({
a = optional(number, 1)
b = string
})
default = {}
}
Background context: I'm looking into cdktf adoption to try and simplify a large existing Terraform codebase.
The first area I'm looking at is removing duplicated complex variable type signatures. These can be up to ~30 lines that we manually keep in sync to work around this issue.
I'm planning on doing this by synthesising a bit of the module (such as specific variable definitions) by using a shared library but keeping the rest of the existing Terraform in place.
Happy to try and implement this
References
No response
Help Wanted
I'm interested in contributing a fix myself
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
Description
I'd like to be able to define a variable like this in cdktf, where
a
is optional butb
is not.Background context: I'm looking into cdktf adoption to try and simplify a large existing Terraform codebase.
The first area I'm looking at is removing duplicated complex variable type signatures. These can be up to ~30 lines that we manually keep in sync to work around this issue.
I'm planning on doing this by synthesising a bit of the module (such as specific variable definitions) by using a shared library but keeping the rest of the existing Terraform in place.
Happy to try and implement this
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: