Merge pull request #1558 from danistrebel/feature/apigee-add-retention
feat(apigee): add retention variable
This commit is contained in:
commit
24bd6179a7
|
@ -162,17 +162,16 @@ module "apigee" {
|
|||
# tftest modules=1 resources=1
|
||||
```
|
||||
<!-- BEGIN TFDOC -->
|
||||
|
||||
## Variables
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L77) | Project ID. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L78) | Project ID. | <code>string</code> | ✓ | |
|
||||
| [endpoint_attachments](variables.tf#L17) | Endpoint attachments. | <code title="map(object({ region = string service_attachment = string }))">map(object({…}))</code> | | <code>null</code> |
|
||||
| [envgroups](variables.tf#L26) | Environment groups (NAME => [HOSTNAMES]). | <code>map(list(string))</code> | | <code>null</code> |
|
||||
| [environments](variables.tf#L32) | Environments. | <code title="map(object({ display_name = optional(string) description = optional(string, "Terraform-managed") deployment_type = optional(string) api_proxy_type = optional(string) node_config = optional(object({ min_node_count = optional(number) max_node_count = optional(number) })) iam = optional(map(list(string))) envgroups = optional(list(string)) regions = optional(list(string)) }))">map(object({…}))</code> | | <code>null</code> |
|
||||
| [instances](variables.tf#L50) | Instances ([REGION] => [INSTANCE]). | <code title="map(object({ display_name = optional(string) description = optional(string, "Terraform-managed") runtime_ip_cidr_range = string troubleshooting_ip_cidr_range = string disk_encryption_key = optional(string) consumer_accept_list = optional(list(string)) }))">map(object({…}))</code> | | <code>null</code> |
|
||||
| [organization](variables.tf#L63) | Apigee organization. If set to null the organization must already exist. | <code title="object({ display_name = optional(string) description = optional(string, "Terraform-managed") authorized_network = optional(string) runtime_type = optional(string, "CLOUD") billing_type = optional(string) database_encryption_key = optional(string) analytics_region = optional(string, "europe-west1") })">object({…})</code> | | <code>null</code> |
|
||||
| [organization](variables.tf#L63) | Apigee organization. If set to null the organization must already exist. | <code title="object({ display_name = optional(string) description = optional(string, "Terraform-managed") authorized_network = optional(string) runtime_type = optional(string, "CLOUD") billing_type = optional(string) database_encryption_key = optional(string) analytics_region = optional(string, "europe-west1") retention = optional(string) })">object({…})</code> | | <code>null</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
@ -186,5 +185,4 @@ module "apigee" {
|
|||
| [org_name](outputs.tf#L42) | Organization name. | |
|
||||
| [organization](outputs.tf#L47) | Organization. | |
|
||||
| [service_attachments](outputs.tf#L52) | Service attachments. | |
|
||||
|
||||
<!-- END TFDOC -->
|
||||
|
|
|
@ -30,6 +30,7 @@ resource "google_apigee_organization" "organization" {
|
|||
billing_type = var.organization.billing_type
|
||||
runtime_type = var.organization.runtime_type
|
||||
runtime_database_encryption_key_name = var.organization.database_encryption_key
|
||||
retention = var.organization.retention
|
||||
}
|
||||
|
||||
resource "google_apigee_envgroup" "envgroups" {
|
||||
|
|
|
@ -70,6 +70,7 @@ variable "organization" {
|
|||
billing_type = optional(string)
|
||||
database_encryption_key = optional(string)
|
||||
analytics_region = optional(string, "europe-west1")
|
||||
retention = optional(string)
|
||||
})
|
||||
default = null
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
project_id = "my-project"
|
||||
organization = {
|
||||
display_name = "My Organization"
|
||||
description = "My Organization"
|
||||
authorized_network = "my-vpc"
|
||||
runtime_type = "CLOUD"
|
||||
billing_type = "PAYG"
|
||||
database_encryption_key = "123456789"
|
||||
analytics_region = "europe-west1"
|
||||
retention = "MINIMUM"
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright 2023 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
values:
|
||||
google_apigee_organization.organization[0]:
|
||||
analytics_region: europe-west1
|
||||
authorized_network: my-vpc
|
||||
billing_type: PAYG
|
||||
description: null
|
||||
display_name: null
|
||||
project_id: my-project
|
||||
retention: MINIMUM
|
||||
runtime_database_encryption_key_name: '123456789'
|
||||
runtime_type: CLOUD
|
||||
|
||||
counts:
|
||||
google_apigee_organization: 1
|
|
@ -24,3 +24,4 @@ tests:
|
|||
instance_only:
|
||||
no_instances:
|
||||
organization_only:
|
||||
organization_retention:
|
||||
|
|
Loading…
Reference in New Issue