Skip to content

googleApigeeOrganization

An organization is the top-level container in Apigee.

To get more information about Organization, see:

Example Usage - Apigee Organization Cloud 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.*/
const googleComputeNetworkApigeeNetwork =
  new google.computeNetwork.ComputeNetwork(this, "apigee_network", {
    name: "apigee-network",
  });
const dataGoogleClientConfigCurrent =
  new google.dataGoogleClientConfig.DataGoogleClientConfig(this, "current", {});
const googleComputeGlobalAddressApigeeRange =
  new google.computeGlobalAddress.ComputeGlobalAddress(this, "apigee_range", {
    address_type: "INTERNAL",
    name: "apigee-range",
    network: googleComputeNetworkApigeeNetwork.id,
    prefix_length: 16,
    purpose: "VPC_PEERING",
  });
const googleServiceNetworkingConnectionApigeeVpcConnection =
  new google.serviceNetworkingConnection.ServiceNetworkingConnection(
    this,
    "apigee_vpc_connection",
    {
      network: googleComputeNetworkApigeeNetwork.id,
      reserved_peering_ranges: [googleComputeGlobalAddressApigeeRange.name],
      service: "servicenetworking.googleapis.com",
    }
  );
new google.apigeeOrganization.ApigeeOrganization(this, "org", {
  analytics_region: "us-central1",
  authorized_network: googleComputeNetworkApigeeNetwork.id,
  depends_on: [
    `\${${googleServiceNetworkingConnectionApigeeVpcConnection.fqn}}`,
  ],
  project_id: dataGoogleClientConfigCurrent.project,
});

Example Usage - Apigee Organization Cloud Full

/*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.*/
const googleComputeNetworkApigeeNetwork =
  new google.computeNetwork.ComputeNetwork(this, "apigee_network", {
    name: "apigee-network",
  });
const googleKmsKeyRingApigeeKeyring = new google.kmsKeyRing.KmsKeyRing(
  this,
  "apigee_keyring",
  {
    location: "us-central1",
    name: "apigee-keyring",
  }
);
const googleProjectServiceIdentityApigeeSa =
  new google.projectServiceIdentity.ProjectServiceIdentity(this, "apigee_sa", {
    project: "${google_project.project.project_id}",
    provider: "${google-beta}",
    service: "${google_project_service.apigee.service}",
  });
const dataGoogleClientConfigCurrent =
  new google.dataGoogleClientConfig.DataGoogleClientConfig(this, "current", {});
const googleComputeGlobalAddressApigeeRange =
  new google.computeGlobalAddress.ComputeGlobalAddress(this, "apigee_range", {
    address_type: "INTERNAL",
    name: "apigee-range",
    network: googleComputeNetworkApigeeNetwork.id,
    prefix_length: 16,
    purpose: "VPC_PEERING",
  });
const googleKmsCryptoKeyApigeeKey = new google.kmsCryptoKey.KmsCryptoKey(
  this,
  "apigee_key",
  {
    key_ring: googleKmsKeyRingApigeeKeyring.id,
    name: "apigee-key",
  }
);
googleKmsCryptoKeyApigeeKey.addOverride("lifecycle", [
  {
    prevent_destroy: true,
  },
]);
const googleKmsCryptoKeyIamBindingApigeeSaKeyuser =
  new google.kmsCryptoKeyIamBinding.KmsCryptoKeyIamBinding(
    this,
    "apigee_sa_keyuser",
    {
      crypto_key_id: googleKmsCryptoKeyApigeeKey.id,
      members: [
        `serviceAccount:\${${googleProjectServiceIdentityApigeeSa.email}}`,
      ],
      role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
    }
  );
const googleServiceNetworkingConnectionApigeeVpcConnection =
  new google.serviceNetworkingConnection.ServiceNetworkingConnection(
    this,
    "apigee_vpc_connection",
    {
      network: googleComputeNetworkApigeeNetwork.id,
      reserved_peering_ranges: [googleComputeGlobalAddressApigeeRange.name],
      service: "servicenetworking.googleapis.com",
    }
  );
new google.apigeeOrganization.ApigeeOrganization(this, "org", {
  analytics_region: "us-central1",
  authorized_network: googleComputeNetworkApigeeNetwork.id,
  depends_on: [
    `\${${googleServiceNetworkingConnectionApigeeVpcConnection.fqn}}`,
    `\${${googleKmsCryptoKeyIamBindingApigeeSaKeyuser.fqn}}`,
  ],
  description: "Terraform-provisioned Apigee Org.",
  display_name: "apigee-org",
  project_id: dataGoogleClientConfigCurrent.project,
  runtime_database_encryption_key_name: googleKmsCryptoKeyApigeeKey.id,
});

Argument Reference

The following arguments are supported:

  • projectId - (Required) The project ID associated with the Apigee organization.

  • displayName - (Optional) The display name of the Apigee organization.

  • description - (Optional) Description of the Apigee organization.

  • analyticsRegion - (Optional) Primary GCP region for analytics data storage. For valid values, see Create an Apigee organization.

  • authorizedNetwork - (Optional) Compute Engine network used for Service Networking to be peered with Apigee runtime instances. See Getting started with the Service Networking API. Valid only when runtimeType is set to CLOUD. The value can be updated only when there are no runtime instances. For example: "default".

  • runtimeType - (Optional) Runtime type of the Apigee organization based on the Apigee subscription purchased. Default value is cloud. Possible values are cloud and hybrid.

  • billingType - (Optional) Billing type of the Apigee organization. See Apigee pricing.

  • runtimeDatabaseEncryptionKeyName - (Optional) Cloud KMS key name used for encrypting the data that is stored and replicated across runtime instances. Update is not allowed after the organization is created. If not specified, a Google-Managed encryption key will be used. Valid only when runtimeType is CLOUD. For example: projects/foo/locations/us/keyRings/bar/cryptoKeys/baz.

  • properties - (Optional) Properties defined in the Apigee organization profile. Structure is documented below.

  • retention - (Optional) Optional. This setting is applicable only for organizations that are soft-deleted (i.e., BillingType is not EVALUATION). It controls how long Organization data will be retained after the initial delete operation completes. During this period, the Organization may be restored to its last known state. After this period, the Organization will no longer be able to be restored. Default value is deletionRetentionUnspecified. Possible values are deletionRetentionUnspecified and minimum.

The properties block supports:

  • property - (Optional) List of all properties in the object. Structure is documented below.

The property block supports:

  • name - (Optional) Name of the property.

  • value - (Optional) Value of the property.

Attributes Reference

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

  • id - an identifier for the resource with format organizations/{{name}}

  • name - Output only. Name of the Apigee organization.

  • subscriptionType - Output only. Subscription type of the Apigee organization. Valid values include trial (free, limited, and for evaluation purposes only) or paid (full subscription has been purchased).

  • caCertificate - Output only. Base64-encoded public certificate for the root CA of the Apigee organization. Valid only when runtimeType is CLOUD. A base64-encoded string.

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

Organization can be imported using any of these accepted formats:

$ terraform import google_apigee_organization.default organizations/{{name}}
$ terraform import google_apigee_organization.default {{name}}