Skip to content

Commit

Permalink
feat(apigee): add properties and retention variables
Browse files Browse the repository at this point in the history
  • Loading branch information
danistrebel committed Aug 2, 2023
1 parent c838372 commit b3599be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/apigee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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#L84) | Project ID. | <code>string</code> || |
| [endpoint_attachments](variables.tf#L17) | Endpoint attachments. | <code title="map&#40;object&#40;&#123;&#10; region &#61; string&#10; service_attachment &#61; string&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>null</code> |
| [envgroups](variables.tf#L26) | Environment groups (NAME => [HOSTNAMES]). | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>null</code> |
| [environments](variables.tf#L32) | Environments. | <code title="map&#40;object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string, &#34;Terraform-managed&#34;&#41;&#10; deployment_type &#61; optional&#40;string&#41;&#10; api_proxy_type &#61; optional&#40;string&#41;&#10; node_config &#61; optional&#40;object&#40;&#123;&#10; min_node_count &#61; optional&#40;number&#41;&#10; max_node_count &#61; optional&#40;number&#41;&#10; &#125;&#41;&#41;&#10; iam &#61; optional&#40;map&#40;list&#40;string&#41;&#41;&#41;&#10; envgroups &#61; optional&#40;list&#40;string&#41;&#41;&#10; regions &#61; optional&#40;list&#40;string&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>null</code> |
| [instances](variables.tf#L50) | Instances ([REGION] => [INSTANCE]). | <code title="map&#40;object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string, &#34;Terraform-managed&#34;&#41;&#10; runtime_ip_cidr_range &#61; string&#10; troubleshooting_ip_cidr_range &#61; string&#10; disk_encryption_key &#61; optional&#40;string&#41;&#10; consumer_accept_list &#61; optional&#40;list&#40;string&#41;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>null</code> |
| [organization](variables.tf#L63) | Apigee organization. If set to null the organization must already exist. | <code title="object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string, &#34;Terraform-managed&#34;&#41;&#10; authorized_network &#61; optional&#40;string&#41;&#10; runtime_type &#61; optional&#40;string, &#34;CLOUD&#34;&#41;&#10; billing_type &#61; optional&#40;string&#41;&#10; database_encryption_key &#61; optional&#40;string&#41;&#10; analytics_region &#61; optional&#40;string, &#34;europe-west1&#34;&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |
| [organization](variables.tf#L63) | Apigee organization. If set to null the organization must already exist. | <code title="object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string, &#34;Terraform-managed&#34;&#41;&#10; authorized_network &#61; optional&#40;string&#41;&#10; runtime_type &#61; optional&#40;string, &#34;CLOUD&#34;&#41;&#10; billing_type &#61; optional&#40;string&#41;&#10; database_encryption_key &#61; optional&#40;string&#41;&#10; analytics_region &#61; optional&#40;string, &#34;europe-west1&#34;&#41;&#10; properties &#61; optional&#40;object&#40;&#123;&#10; property &#61; optional&#40;list&#40;object&#40;&#123;&#10; name &#61; string&#10; value &#61; string&#10; &#125;&#41;&#41;&#41;&#10; &#125;&#41;&#41;&#10; retention &#61; optional&#40;string&#41;&#10;&#125;&#41;">object&#40;&#123;&#8230;&#125;&#41;</code> | | <code>null</code> |

## Outputs

Expand All @@ -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 -->
2 changes: 2 additions & 0 deletions modules/apigee/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ resource "google_apigee_organization" "organization" {
project_id = var.project_id
authorized_network = var.organization.authorized_network
billing_type = var.organization.billing_type
properties = var.organization.properties
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" {
Expand Down
7 changes: 7 additions & 0 deletions modules/apigee/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ variable "organization" {
billing_type = optional(string)
database_encryption_key = optional(string)
analytics_region = optional(string, "europe-west1")
properties = optional(object({
property = optional(list(object({
name = string
value = string
})))
}))
retention = optional(string)
})
default = null
}
Expand Down

0 comments on commit b3599be

Please sign in to comment.