Created
July 3, 2021 21:07
-
-
Save mhmdio/20637c5cfe471a93813f5c9d67179258 to your computer and use it in GitHub Desktop.
terraform yamldecode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
raw_value = yamldecode(file("${path.module}/example.yaml")) | |
normalized_value = { | |
name = tostring(try(local.raw_value.name, null)) | |
groups = try(local.raw_value.groups, []) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment