subcategory | description |
---|---|
Apigee |
An `Environment` in Apigee. |
An Environment
in Apigee.
To get more information about Environment, see:
- API documentation
- How-to Guides
data "google_client_config" "current" {}
resource "google_compute_network" "apigee_network" {
name = "apigee-network"
}
resource "google_compute_global_address" "apigee_range" {
name = "apigee-range"
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = google_compute_network.apigee_network.id
}
resource "google_service_networking_connection" "apigee_vpc_connection" {
network = google_compute_network.apigee_network.id
service = "servicenetworking.googleapis.com"
reserved_peering_ranges = [google_compute_global_address.apigee_range.name]
}
resource "google_apigee_organization" "apigee_org" {
analytics_region = "us-central1"
project_id = data.google_client_config.current.project
authorized_network = google_compute_network.apigee_network.id
depends_on = [google_service_networking_connection.apigee_vpc_connection]
}
resource "google_apigee_environment" "env" {
name = "my-environment"
description = "Apigee Environment"
display_name = "environment-1"
org_id = google_apigee_organization.apigee_org.id
}
The following arguments are supported:
-
name
- (Required) The resource ID of the environment. -
org_id
- (Required) The Apigee Organization associated with the Apigee environment, in the formatorganizations/{{org_name}}
.
-
display_name
- (Optional) Display name of the environment. -
description
- (Optional) Description of the environment. -
deployment_type
- (Optional) Optional. Deployment type supported by the environment. The deployment type can be set when creating the environment and cannot be changed. When you enable archive deployment, you will be prevented from performing a subset of actions within the environment, including: Managing the deployment of API proxy or shared flow revisions; Creating, updating, or deleting resource files; Creating, updating, or deleting target servers. Possible values are:DEPLOYMENT_TYPE_UNSPECIFIED
,PROXY
,ARCHIVE
. -
api_proxy_type
- (Optional) Optional. API Proxy type supported by the environment. The type can be set when creating the Environment and cannot be changed. Possible values are:API_PROXY_TYPE_UNSPECIFIED
,PROGRAMMABLE
,CONFIGURABLE
. -
node_config
- (Optional) NodeConfig for setting the min/max number of nodes associated with the environment. Structure is documented below. -
type
- (Optional) Types that can be selected for an Environment. Each of the types are limited by capability and capacity. Refer to Apigee's public documentation to understand about each of these types in details. An Apigee org can support heterogeneous Environments. Possible values are:ENVIRONMENT_TYPE_UNSPECIFIED
,BASE
,INTERMEDIATE
,COMPREHENSIVE
. -
forward_proxy_uri
- (Optional) Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied. -
properties
- (Optional) Key-value pairs that may be used for customizing the environment. Structure is documented below.
The node_config
block supports:
-
min_node_count
- (Optional) The minimum total number of gateway nodes that the is reserved for all instances that has the specified environment. If not specified, the default is determined by the recommended minimum number of nodes for that gateway. -
max_node_count
- (Optional) The maximum total number of gateway nodes that the is reserved for all instances that has the specified environment. If not specified, the default is determined by the recommended maximum number of nodes for that gateway. -
current_aggregate_node_count
- (Output) The current total number of gateway nodes that each environment currently has across all instances.
The properties
block supports:
property
- (Optional) List of all properties in the object. Structure is documented below.
-
name
- (Optional) The property key. -
value
- (Optional) The property value.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format{{org_id}}/environments/{{name}}
This resource provides the following Timeouts configuration options:
create
- Default is 30 minutes.update
- Default is 20 minutes.delete
- Default is 30 minutes.
Environment can be imported using any of these accepted formats:
{{org_id}}/environments/{{name}}
{{org_id}}/{{name}}
In Terraform v1.5.0 and later, use an import
block to import Environment using one of the formats above. For example:
import {
id = "{{org_id}}/environments/{{name}}"
to = google_apigee_environment.default
}
When using the terraform import
command, Environment can be imported using one of the formats above. For example:
$ terraform import google_apigee_environment.default {{org_id}}/environments/{{name}}
$ terraform import google_apigee_environment.default {{org_id}}/{{name}}