google-cloud-platformterraformterraform-provider-gcp

GCP REST API or Terraform equivalent of "gcloud services vpc-peerings enable-vpc-service-controls"


Consider this CLI:

gcloud services vpc-peerings enable-vpc-service-controls ...

Questions:

  1. What is the GCP REST API method equivalent to that?
  2. What is the Terraform equivalent to that?

Solution

  • For any gcloud command you can append --log-http to have the command enumerate the underlying REST APIs that are called.

    Another approach is to browse the service using:

    1. Google's excellent APIs Explorer though this requires more familiarity with the underlying service
    2. Service Networking API;
    3. enableVpcServiceControls

    This approach also provides definitions of the request and response (and Operation) types