Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update display metadata and order of variables #268

Merged
merged 5 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,25 @@ spec:
auth_enabled:
name: auth_enabled
title: Auth Enabled
level: 1
altDefaults:
- type: ALTERNATE_TYPE_DC
value: true
authorized_network:
name: authorized_network
title: Authorized Network
level: 1
connect_mode:
name: connect_mode
title: Connect Mode
level: 1
enumValueLabels:
- label: DIRECT_PEERING
value: DIRECT_PEERING
- label: PRIVATE_SERVICE_ACCESS
value: PRIVATE_SERVICE_ACCESS
altDefaults:
- type: ALTERNATE_TYPE_DC
value: DIRECT_PEERING
customer_managed_key:
name: customer_managed_key
title: Customer Managed Key
Expand Down Expand Up @@ -78,19 +89,25 @@ spec:
read_replicas_mode:
name: read_replicas_mode
title: Read Replicas Mode
level: 1
enumValueLabels:
- label: READ_REPLICAS_DISABLED
value: READ_REPLICAS_DISABLED
- label: READ_REPLICAS_ENABLED
value: READ_REPLICAS_ENABLED
redis_configs:
name: redis_configs
title: Redis Configs
redis_version:
name: redis_version
title: Redis Version
enumValueLabels:
- label: REDIS_5_0
value: REDIS_5_0
- label: REDIS_6_X
value: REDIS_6_X
- label: REDIS_7_0
value: REDIS_7_0
- label: REDIS_6_X
value: REDIS_6_X
- label: REDIS_5_0
value: REDIS_5_0
level: 1
altDefaults:
- type: ALTERNATE_TYPE_DC
Expand Down Expand Up @@ -120,6 +137,12 @@ spec:
transit_encryption_mode:
name: transit_encryption_mode
title: Transit Encryption Mode
level: 1
enumValueLabels:
- label: SERVER_AUTHENTICATION
value: SERVER_AUTHENTICATION
- label: DISABLED
value: DISABLED
runtime:
outputs:
host:
Expand Down
22 changes: 11 additions & 11 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,6 +75,16 @@ spec:
description: Redis memory size in GiB. Defaulted to 1 GiB
varType: number
defaultValue: 1
- name: redis_version
description: The version of Redis software.
varType: string
- name: connect_mode
description: The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING.
varType: string
- name: read_replicas_mode
description: "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
varType: string
defaultValue: READ_REPLICAS_DISABLED
- name: replica_count
description: The number of replicas.
varType: number
Expand All @@ -87,20 +97,10 @@ spec:
version: ">= 9.1.0"
spec:
outputExpr: network_name
- name: redis_version
description: The version of Redis software.
varType: string
- name: connect_mode
description: The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING.
varType: string
- name: enable_apis
description: Flag for enabling redis.googleapis.com in your project
varType: bool
defaultValue: true
- name: read_replicas_mode
description: "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
varType: string
defaultValue: READ_REPLICAS_DISABLED
- name: location_id
description: The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId].
varType: string
Expand Down
30 changes: 15 additions & 15 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,32 @@ variable "memory_size_gb" {
default = 1
}

variable "replica_count" {
description = "The number of replicas."
type = number
variable "redis_version" {
description = "The version of Redis software."
type = string
default = null
}

variable "authorized_network" {
description = "The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used."
variable "connect_mode" {
description = "The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING."
type = string
default = null
}

variable "redis_version" {
description = "The version of Redis software."
variable "read_replicas_mode" {
description = "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
type = string
default = "READ_REPLICAS_DISABLED"
}

variable "replica_count" {
description = "The number of replicas."
type = number
default = null
}

variable "connect_mode" {
description = "The connection mode of the Redis instance. Can be either DIRECT_PEERING or PRIVATE_SERVICE_ACCESS. The default connect mode if not provided is DIRECT_PEERING."
variable "authorized_network" {
description = "The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used."
type = string
default = null
}
Expand All @@ -77,12 +83,6 @@ variable "enable_apis" {
default = true
}

variable "read_replicas_mode" {
description = "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
type = string
default = "READ_REPLICAS_DISABLED"
}

variable "location_id" {
description = "The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]."
type = string
Expand Down
Loading