blob: b6edfd49aacd46a518419956a78454c8f9250b63 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** 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: |-
Creates key value entries in a key value map scoped to an environment.
---
# google_apigee_environment_keyvaluemaps_entries
Creates key value entries in a key value map scoped to an environment.
To get more information about EnvironmentKeyvaluemapsEntries, see:
* [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.keyvaluemaps.entries/create)
* How-to Guides
* [Using key value maps](https://cloud.google.com/apigee/docs/api-platform/cache/key-value-maps)
## Example Usage - Apigee Environment Keyvaluemaps Entries Basic
```hcl
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" "apigee_environment" {
org_id = google_apigee_organization.apigee_org.id
name = "tf-test-env"
description = "Apigee Environment"
display_name = "Apigee Environment"
}
resource "google_apigee_instance" "apigee_instance" {
name = "tf-test-instance"
location = "us-central1"
org_id = google_apigee_organization.apigee_org.id
}
resource "google_apigee_instance_attachment" "apigee_instance_attachment" {
instance_id = google_apigee_instance.apigee_instance.id
environment = google_apigee_environment.apigee_environment.name
}
resource "google_apigee_environment_keyvaluemaps" "apigee_environment_keyvaluemaps" {
env_id = google_apigee_environment.create_apigee_environment.id
name = "tf-test-env-kvms"
depends_on = [
google_apigee_organization.apigee_org,
google_apigee_environment.apigee_environment,
google_apigee_instance.apigee_instance,
google_apigee_instance_attachment.apigee_instance_attachment
]
}
resource "google_apigee_environment_keyvaluemaps_entries" "apigee_environment_keyvaluemaps_entries" {
env_keyvaluemap_id = google_apigee_environment_keyvaluemaps.apigee_environment_keyvaluemaps.id
name = "testName"
value = "testValue"
depends_on = [
google_apigee_organization.apigee_org,
google_apigee_environment.apigee_environment,
google_apigee_instance.apigee_instance,
google_apigee_instance_attachment.apigee_instance_attachment,
google_apigee_environment_keyvaluemaps.apigee_environment_keyvaluemaps
]
}
```
## Argument Reference
The following arguments are supported:
* `name` -
(Required)
Required. Resource URI that can be used to identify the scope of the key value map entries.
* `value` -
(Required)
Required. Data or payload that is being retrieved and associated with the unique key.
* `env_keyvaluemap_id` -
(Required)
The Apigee environment keyvalumaps Id associated with the Apigee environment,
in the format `organizations/{{org_name}}/environments/{{env_name}}/keyvaluemaps/{{keyvaluemap_name}}`.
- - -
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `{{env_keyvaluemap_id}}/entries/{{name}}`
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 1 minutes.
- `delete` - Default is 1 minutes.
## Import
EnvironmentKeyvaluemapsEntries can be imported using any of these accepted formats:
* `{{env_keyvaluemap_id}}/entries/{{name}}`
* `{{env_keyvaluemap_id}}/{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import EnvironmentKeyvaluemapsEntries using one of the formats above. For example:
```tf
import {
id = "{{env_keyvaluemap_id}}/entries/{{name}}"
to = google_apigee_environment_keyvaluemaps_entries.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), EnvironmentKeyvaluemapsEntries can be imported using one of the formats above. For example:
```
$ terraform import google_apigee_environment_keyvaluemaps_entries.default {{env_keyvaluemap_id}}/entries/{{name}}
$ terraform import google_apigee_environment_keyvaluemaps_entries.default {{env_keyvaluemap_id}}/{{name}}
```