
OPERATIONAL DEFECT DATABASE
...


...

### Terraform Configuration Files <!-- Paste the relevant parts of your Terraform configuration between the ``` marks below. For Terraform configs larger than a few resources, or that involve multiple files, please make a GitHub repository that we can clone, rather than copy-pasting multiple files in here. For security, you can also encrypt the files using our GPG public key at https://www.hashicorp.com/security. --> Input Yaml -- ```terraform resource_groups: resource_group_management: manual startegy: landscapes resource_group: - name: core-rg id: rg1 sapfunc: 3a - name: lz-rg id: rg2 sapfunc: 2a storage_volume: - id: AS0 name: thanos disks: - id: app-1 type: swap volume_profile: g-p zone_name: us-west resource-group-name: rg1 count: 1 iops: 10001 capacity: 128 buffer: 2 encryption-key: - id: app-2 type: data mounts: - path: /usr/mnt size: 100 - path: /usr/tax size: 32 volume_profile: g-p zone_name: us-west resource-group-name: rg1 count: 1 iops: 10000 capacity: 132 encryption-key: tags: - "type": application-1 "value": person ``` We need to parse the values from above yaml to use it in module to deploy the disk and attach it to a vm. For other similar yaml entries we are converting the input value to local using yamldecode function. ``` locals { input_yaml = yamldecode(file("./.config/test.yaml")) rg_name = {for val in local.input_yaml["resource_groups"]["resource_group"]: val["id"] => { name= val["name"] sapfunc = val["sapfunc"] }} } ``` ### Expected Behavior <!-- What should have happened? --> ``` Read the inputs from Yaml file and use it. If there is any other way to parse the values, please let me know. Sample code is attached... `` [yaml_poc_2.zip](https://github.com/hashicorp/terraform/files/8957079/yaml_poc_2.zip) `
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.