Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is `string` a default `type` of a Terraform `variable`?

I can’t find the answer in the docs, hence the question in the title. Are the following variable declarations equivalent?

variable "a" {
  nullable = false
  type     = string
}
variable "b" {
  nullable = false
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

No, it’s stated in the documentation you shared:

If no type constraint is set then a value of any type is accepted.

So basically variable b is set to any type.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading