blob: c0f15135e3aebdd5353a72bcd7b9607cf0274296 [file] [log] [blame] [edit]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Apigee"
description: |-
Configures the add-ons for the Apigee organization.
---
# google_apigee_addons_config
Configures the add-ons for the Apigee organization. The existing add-on configuration will be fully replaced.
To get more information about AddonsConfig, see:
* [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations#setaddons)
* How-to Guides
* [Creating an API organization](https://cloud.google.com/apigee/docs/api-platform/get-started/create-org)
## Example Usage - Apigee Addons Basic
```hcl
resource "google_apigee_addons_config" "test_organization" {
org = "test_organization"
addons_config {
api_security_config {
enabled = true
}
monetization_config {
enabled = true
}
}
}
```
## Example Usage - Apigee Addons Full
```hcl
data "google_client_config" "current" {}
resource "google_project_service" "apigee" {
project = data.google_client_config.current.project
service = "apigee.googleapis.com"
}
resource "google_project_service" "compute" {
project = data.google_client_config.current.project
service = "compute.googleapis.com"
}
resource "google_project_service" "servicenetworking" {
project = data.google_client_config.current.project
service = "servicenetworking.googleapis.com"
}
resource "google_compute_network" "apigee_network" {
name = "apigee-network"
project = data.google_client_config.current.project
depends_on = [ google_project_service.compute ]
}
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
project = data.google_client_config.current.project
}
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" "org" {
analytics_region = "us-central1"
project_id = data.google_client_config.current.project
authorized_network = google_compute_network.apigee_network.id
billing_type = "EVALUATION"
depends_on = [
google_service_networking_connection.apigee_vpc_connection,
google_project_service.apigee
]
}
resource "google_apigee_addons_config" "test_organization" {
org = google_apigee_organization.org.name
addons_config {
integration_config {
enabled = true
}
api_security_config {
enabled = true
}
connectors_platform_config {
enabled = true
}
monetization_config {
enabled = true
}
advanced_api_ops_config {
enabled = true
}
}
}
```
## Argument Reference
The following arguments are supported:
* `org` -
(Required)
Name of the Apigee organization.
- - -
* `addons_config` -
(Optional)
Addon configurations of the Apigee organization.
Structure is [documented below](#nested_addons_config).
<a name="nested_addons_config"></a>The `addons_config` block supports:
* `advanced_api_ops_config` -
(Optional)
Configuration for the Monetization add-on.
Structure is [documented below](#nested_advanced_api_ops_config).
* `integration_config` -
(Optional)
Configuration for the Monetization add-on.
Structure is [documented below](#nested_integration_config).
* `monetization_config` -
(Optional)
Configuration for the Monetization add-on.
Structure is [documented below](#nested_monetization_config).
* `api_security_config` -
(Optional)
Configuration for the Monetization add-on.
Structure is [documented below](#nested_api_security_config).
* `connectors_platform_config` -
(Optional)
Configuration for the Monetization add-on.
Structure is [documented below](#nested_connectors_platform_config).
<a name="nested_advanced_api_ops_config"></a>The `advanced_api_ops_config` block supports:
* `enabled` -
(Optional)
Flag that specifies whether the Advanced API Ops add-on is enabled.
<a name="nested_integration_config"></a>The `integration_config` block supports:
* `enabled` -
(Optional)
Flag that specifies whether the Advanced API Ops add-on is enabled.
<a name="nested_monetization_config"></a>The `monetization_config` block supports:
* `enabled` -
(Optional)
Flag that specifies whether the Advanced API Ops add-on is enabled.
<a name="nested_api_security_config"></a>The `api_security_config` block supports:
* `enabled` -
(Optional)
Flag that specifies whether the Advanced API Ops add-on is enabled.
* `expires_at` -
(Output)
Flag that specifies whether the Advanced API Ops add-on is enabled.
<a name="nested_connectors_platform_config"></a>The `connectors_platform_config` block supports:
* `enabled` -
(Optional)
Flag that specifies whether the Advanced API Ops add-on is enabled.
* `expires_at` -
(Output)
Flag that specifies whether the Advanced API Ops add-on is enabled.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `organizations/{{org}}`
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
AddonsConfig can be imported using any of these accepted formats:
* `organizations/{{name}}`
* `{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AddonsConfig using one of the formats above. For example:
```tf
import {
id = "organizations/{{name}}"
to = google_apigee_addons_config.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), AddonsConfig can be imported using one of the formats above. For example:
```
$ terraform import google_apigee_addons_config.default organizations/{{name}}
$ terraform import google_apigee_addons_config.default {{name}}
```