What are approaches to calling gcp APIs from terraform For ex creating GCP pubsub Snapshot

0 votes

I want to create snapshot, which is currently not available through GCP Terraform provider. So I want to be able to use the snapshot API call to achieve this. Once the snapshot is created, I need to call some external APIs as well, for instance call the remote server endpoint to restart the service.

What are the standard / better approaches with Terraform to do this? I am newbie with terraform. So no idea how to approach this.

Apr 6, 2022 in GCP by Rahul
• 3,380 points
764 views

1 answer to this question.

0 votes

You don't want to start using null resources or calling scripts from Terraform if you can at all help it. You'd only want to use a local-exec/remote-exec where you really can't architect a proper solution.

One alternative is to wrap this up in a Cloud Function and apply a cron trigger to it if the snapshotting is predictable. Alternatively you could also wrap it up in a Workflow.

answered Apr 6, 2022 by Korak
• 5,820 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer

What are the libraries and tools for cloud storage on GCP?

At the center level, XML API and ...READ MORE

answered Oct 7, 2019 in GCP by Sirajul
• 59,230 points
1,973 views
0 votes
1 answer

What are the service accounts in GCP? How to create one?

The special accounts associated with a project are called the Service Accounts. The ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 59,230 points
940 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Creating password for a windows instance on GCP

Windows Server instances use password authentication instead ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,230 points
4,368 views
0 votes
1 answer

What are the advantages of using gcp?

Google Cloud Platform is a medium that ...READ MORE

answered Oct 4, 2019 in GCP by Sirajul
• 59,230 points
1,568 views
0 votes
1 answer

What gcp firewall settings are needed to enable file download for wordpress site backup?

The firewall rule allowing ingress traffic on ...READ MORE

answered Apr 5, 2022 in GCP by Korak
• 5,820 points
907 views
0 votes
1 answer

How to send email to AWS SES from GCP vm instance

Use port 587. As per AWS SES ...READ MORE

answered Mar 4, 2022 in GCP by Korak
• 5,820 points
1,023 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP