Skip to content

Commit 2baf8a3

Browse files
authored
fix: update display metadata and order of variables (#268)
1 parent 6338209 commit 2baf8a3

File tree

3 files changed

+54
-31
lines changed

3 files changed

+54
-31
lines changed

metadata.display.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,25 @@ spec:
3333
auth_enabled:
3434
name: auth_enabled
3535
title: Auth Enabled
36+
level: 1
37+
altDefaults:
38+
- type: ALTERNATE_TYPE_DC
39+
value: true
3640
authorized_network:
3741
name: authorized_network
3842
title: Authorized Network
39-
level: 1
4043
connect_mode:
4144
name: connect_mode
4245
title: Connect Mode
4346
level: 1
47+
enumValueLabels:
48+
- label: DIRECT_PEERING
49+
value: DIRECT_PEERING
50+
- label: PRIVATE_SERVICE_ACCESS
51+
value: PRIVATE_SERVICE_ACCESS
52+
altDefaults:
53+
- type: ALTERNATE_TYPE_DC
54+
value: DIRECT_PEERING
4455
customer_managed_key:
4556
name: customer_managed_key
4657
title: Customer Managed Key
@@ -78,19 +89,25 @@ spec:
7889
read_replicas_mode:
7990
name: read_replicas_mode
8091
title: Read Replicas Mode
92+
level: 1
93+
enumValueLabels:
94+
- label: READ_REPLICAS_DISABLED
95+
value: READ_REPLICAS_DISABLED
96+
- label: READ_REPLICAS_ENABLED
97+
value: READ_REPLICAS_ENABLED
8198
redis_configs:
8299
name: redis_configs
83100
title: Redis Configs
84101
redis_version:
85102
name: redis_version
86103
title: Redis Version
87104
enumValueLabels:
88-
- label: REDIS_5_0
89-
value: REDIS_5_0
90-
- label: REDIS_6_X
91-
value: REDIS_6_X
92105
- label: REDIS_7_0
93106
value: REDIS_7_0
107+
- label: REDIS_6_X
108+
value: REDIS_6_X
109+
- label: REDIS_5_0
110+
value: REDIS_5_0
94111
level: 1
95112
altDefaults:
96113
- type: ALTERNATE_TYPE_DC
@@ -120,6 +137,12 @@ spec:
120137
transit_encryption_mode:
121138
name: transit_encryption_mode
122139
title: Transit Encryption Mode
140+
level: 1
141+
enumValueLabels:
142+
- label: SERVER_AUTHENTICATION
143+
value: SERVER_AUTHENTICATION
144+
- label: DISABLED
145+
value: DISABLED
123146
runtime:
124147
outputs:
125148
host:

metadata.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -75,6 +75,16 @@ spec:
7575
description: Redis memory size in GiB. Defaulted to 1 GiB
7676
varType: number
7777
defaultValue: 1
78+
- name: redis_version
79+
description: The version of Redis software.
80+
varType: string
81+
- name: connect_mode
82+
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.
83+
varType: string
84+
- name: read_replicas_mode
85+
description: "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
86+
varType: string
87+
defaultValue: READ_REPLICAS_DISABLED
7888
- name: replica_count
7989
description: The number of replicas.
8090
varType: number
@@ -87,20 +97,10 @@ spec:
8797
version: ">= 9.1.0"
8898
spec:
8999
outputExpr: network_name
90-
- name: redis_version
91-
description: The version of Redis software.
92-
varType: string
93-
- name: connect_mode
94-
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.
95-
varType: string
96100
- name: enable_apis
97101
description: Flag for enabling redis.googleapis.com in your project
98102
varType: bool
99103
defaultValue: true
100-
- name: read_replicas_mode
101-
description: "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
102-
varType: string
103-
defaultValue: READ_REPLICAS_DISABLED
104104
- name: location_id
105105
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].
106106
varType: string

variables.tf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,32 @@ variable "memory_size_gb" {
4747
default = 1
4848
}
4949

50-
variable "replica_count" {
51-
description = "The number of replicas."
52-
type = number
50+
variable "redis_version" {
51+
description = "The version of Redis software."
52+
type = string
5353
default = null
5454
}
5555

56-
variable "authorized_network" {
57-
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."
56+
variable "connect_mode" {
57+
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."
5858
type = string
5959
default = null
6060
}
6161

62-
variable "redis_version" {
63-
description = "The version of Redis software."
62+
variable "read_replicas_mode" {
63+
description = "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
6464
type = string
65+
default = "READ_REPLICAS_DISABLED"
66+
}
67+
68+
variable "replica_count" {
69+
description = "The number of replicas."
70+
type = number
6571
default = null
6672
}
6773

68-
variable "connect_mode" {
69-
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."
74+
variable "authorized_network" {
75+
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."
7076
type = string
7177
default = null
7278
}
@@ -77,12 +83,6 @@ variable "enable_apis" {
7783
default = true
7884
}
7985

80-
variable "read_replicas_mode" {
81-
description = "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
82-
type = string
83-
default = "READ_REPLICAS_DISABLED"
84-
}
85-
8686
variable "location_id" {
8787
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]."
8888
type = string

0 commit comments

Comments
 (0)