Skip to content

Commit

Permalink
fix: update display metadata and order of variables (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w authored Jan 16, 2025
1 parent 6338209 commit 2baf8a3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 31 deletions.
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

0 comments on commit 2baf8a3

Please sign in to comment.