I really need some guidance here…
I have created the DC environment for an application. Now I have a DR region which is getting everyday volume backups copied from the DC region automatically. I am retaining the last 5 backups for every boot and block Volume.
Now I am working on to create some tf scripts for DR region which when run, should:
1- First create all the boot and block volumes using the latest respective backup files.
2- Use them in order to create the new VMs.
The part where I need guidance is “1” above. I can’t seem to find a way to refer to the right backup files using Data Source: oci_core_boot_volume_backup and oci_core_boot_volume_backups.
I think the solution may lie in using data source or locals and some regex filtering, but my knowledge is limited on those areas.
The cloud is OCI however I think the terraform logic in broader sense should be same as any other cloud.
Please share your thoughts.