googleApigeeEnvironment
An environment
in Apigee.
To get more information about Environment, see:
- API documentation
- How-to Guides
- Creating an environment
Example Usage - Apigee Environment Basic
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 = "tf-test%{random_suffix}"
description = "Apigee Environment"
display_name = "environment-1"
org_id = google_apigee_organization.apigee_org.id
}
Argument Reference
The following arguments are supported:
-
name
- (Required) The resource ID of the environment. -
orgId
- (Required) The Apigee Organization associated with the Apigee environment, in the formatorganizations/{{orgName}}
.
-
displayName
- (Optional) Display name of the environment. -
description
- (Optional) Description of the environment. -
deploymentType
- (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 aredeploymentTypeUnspecified
,proxy
, andarchive
. -
apiProxyType
- (Optional) Optional. API Proxy type supported by the environment. The type can be set when creating the Environment and cannot be changed. Possible values areapiProxyTypeUnspecified
,programmable
, andconfigurable
. -
nodeConfig
- (Optional) NodeConfig for setting the min/max number of nodes associated with the environment. Structure is documented below.
The nodeConfig
block supports:
-
minNodeCount
- (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. -
maxNodeCount
- (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. -
currentAggregateNodeCount
- (Output) The current total number of gateway nodes that each environment currently has across all instances.
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format{{orgId}}/environments/{{name}}
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 30 minutes.update
- Default is 20 minutes.delete
- Default is 30 minutes.
Import
Environment can be imported using any of these accepted formats: