In Terraform, the metadata attribute of google_compute_instance is of type map(string). Non-string values (boolean, number) are automatically converted to strings (Terraform Type Conversion).
Since some metadata fields are used as boolean values in checks, we must explicitly transform strings and numbers to boolean values according to Google Cloud documentation:
For fields that accept boolean values, TRUE or FALSE, the following alternative values can also be used:
- TRUE: Y, Yes, 1
- FALSE: N, No, 0
Boolean values are not case-sensitive. For example, False, false, or FALSE can be used to disable a feature.
Discussed in #9716
In Terraform, the
metadataattribute ofgoogle_compute_instanceis of typemap(string). Non-string values (boolean, number) are automatically converted to strings (Terraform Type Conversion).Since some metadata fields are used as boolean values in checks, we must explicitly transform strings and numbers to boolean values according to Google Cloud documentation:
Discussed in #9716