I’m trying to get Terraform to list available backups from a postgreSQL instance that was provisioned using Terraform. How do I make the API call (rest/v1beta4/backupRuns/list)?
Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.
The URL uses gRPC Transcoding syntax.
Project ID of the project that contains the instance.
Cloud SQL instance ID, or “-” for all instances. This does not include the project ID.
I’ve been trying to create a custom provider but still could not get my head wrapped around it to get it to work. Is this the correct route I should be taking? Any inputs would be greatly appreciated. I am also new to Go.
Ultimately, I would like to be able to select a backup timestamp, supply that to Terraform as a string variable and Terraform apply would create a new instance based on that timestamp.