I am calling Terraform oci_core_volumes module to query block storage volumes, in the response, I am expecting id list of the volumes, but it returned a function tolist instead, how to execute it and get the ids in the function? Is there something like eval in Bash?
Code:
data "oci_core_volumes" "sas_volumes" {
compartment_id = var.compartment_id
display_name = "sas-lab_volume_0"
}
snippet of response:
volume_all_ids = tolist([
{
"auto_tuned_vpus_per_gb" = ""
"availability_domain" = "ayQE:US-ASHBURN-AD-1"
"backup_policy_id" = ""
"block_volume_replicas" = tolist([])
"block_volume_replicas_deletion" = false
"compartment_id" = "ocid1.compartment.oc1..aaaaaaaaxxxxxx"
"defined_tags" = tomap({
"Oracle-Tags.CreatedBy" = "azuread-test/xxxxxxxxxx"
"Oracle-Tags.CreatedOn" = "2021-11-06T03:58:38.510Z"
})
"display_name" = "sas-lab_volume_0"
"freeform_tags" = tomap({
"application" = "SAS"
"automation:autoShutdown" = "false"
"client" = "test"
"compliance:PCI" = "false"
"compliance:PII" = "false"
"repository" = "terraform"
})
"id" = "ocid1.volume.oc1.iad.xxxxxxxxxxx"
"is_auto_tune_enabled" = false
"is_hydrated" = true
"kms_key_id" = ""
"size_in_gbs" = "50"
"size_in_mbs" = "51200"
"source_details" = tolist([])
"state" = "AVAILABLE"
"system_tags" = tomap({})
"time_created" = "2021-11-06 03:58:39.209 +0000 UTC"
"volume_backup_id" = ""
"volume_group_id" = ""
"vpus_per_gb" = "10"
},
])