Skip to content

googleApiGatewayApi

A consumable API that can be used by multiple Gateways.

\~> Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

To get more information about Api, see:

Example Usage - Apigateway Api Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.apiGatewayApi.ApiGatewayApi(this, "api", {
  api_id: "my-api",
  provider: "${google-beta}",
});

Argument Reference

The following arguments are supported:

  • apiId - (Required) Identifier to assign to the API. Must be unique within scope of the parent resource(project)

  • displayName - (Optional) A user-visible name for the API.

  • managedService - (Optional) Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.

  • labels - (Optional) Resource labels to represent user-provided metadata.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/global/apis/{{apiId}}

  • name - The resource name of the API. Format projects/{{project}}/locations/global/apis/{{apiId}}

  • createTime - Creation timestamp in RFC3339 text format.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Api can be imported using any of these accepted formats:

$ terraform import google_api_gateway_api.default projects/{{project}}/locations/global/apis/{{api_id}}
$ terraform import google_api_gateway_api.default {{project}}/{{api_id}}
$ terraform import google_api_gateway_api.default {{api_id}}

User Project Overrides

This resource supports User Project Overrides.