Skip to content

Commit cbd2fd6

Browse files
authored
fix!: remove apphub_service_uri output and update metadata display yaml (#257)
1 parent b725272 commit cbd2fd6

File tree

5 files changed

+47
-48
lines changed

5 files changed

+47
-48
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ module "memorystore" {
7070

7171
| Name | Description |
7272
|------|-------------|
73-
| apphub\_service\_uri | Service URI in CAIS style to be used by Apphub. |
7473
| auth\_string | AUTH String set on the instance. This field will only be populated if auth\_enabled is true. |
7574
| current\_location\_id | The current zone where the Redis endpoint is placed. |
7675
| env\_vars | Exported environment variables |

docs/upgrading_to_v13.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Upgrading to v13.0
2+
3+
The v13.0 release contains backwards-incompatible changes.
4+
5+
## Replace uses of apphub_service_uri
6+
7+
This release removes apphub_service_uri output. You can replace use of `apphub_service_uri` by forming the desired output as below,
8+
9+
```
10+
{
11+
service_uri = "//redis.googleapis.com/${module.memorystore.id}"
12+
service_id = substr("${<redis-instance-name>}-${md5(${module.memorystore.id})}", 0, 63)
13+
}
14+
```

metadata.display.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ spec:
3636
authorized_network:
3737
name: authorized_network
3838
title: Authorized Network
39-
invisible: false
39+
level: 1
4040
connect_mode:
4141
name: connect_mode
4242
title: Connect Mode
43-
invisible: false
43+
level: 1
4444
customer_managed_key:
4545
name: customer_managed_key
4646
title: Customer Managed Key
4747
display_name:
4848
name: display_name
4949
title: Display Name
50-
invisible: false
50+
level: 1
5151
enable_apis:
5252
name: enable_apis
5353
title: Enable Apis
@@ -63,7 +63,7 @@ spec:
6363
memory_size_gb:
6464
name: memory_size_gb
6565
title: Memory Size Gb
66-
invisible: false
66+
level: 1
6767
name:
6868
name: name
6969
title: Name
@@ -84,15 +84,15 @@ spec:
8484
redis_version:
8585
name: redis_version
8686
title: Redis Version
87-
invisible: false
87+
level: 1
8888
region:
8989
name: region
9090
title: Region
91-
invisible: false
91+
level: 1
9292
replica_count:
9393
name: replica_count
9494
title: Replica Count
95-
invisible: false
95+
level: 1
9696
reserved_ip_range:
9797
name: reserved_ip_range
9898
title: Reserved Ip Range
@@ -102,7 +102,7 @@ spec:
102102
tier:
103103
name: tier
104104
title: Tier
105-
invisible: false
105+
level: 1
106106
enumValueLabels:
107107
- label: STANDARD_HA
108108
value: STANDARD_HA

metadata.yaml

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -52,30 +52,20 @@ spec:
5252
location: examples/valkey
5353
interfaces:
5454
variables:
55-
- name: region
56-
description: The GCP region to use.
57-
varType: string
5855
- name: project_id
5956
description: The ID of the project in which the resource belongs to.
6057
varType: string
6158
required: true
62-
- name: enable_apis
63-
description: Flag for enabling redis.googleapis.com in your project
64-
varType: bool
65-
defaultValue: true
59+
- name: region
60+
description: The GCP region to use.
61+
varType: string
6662
- name: name
6763
description: The ID of the instance or a fully qualified identifier for the instance.
6864
varType: string
6965
required: true
70-
- name: authorized_network
71-
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.
66+
- name: display_name
67+
description: An arbitrary and optional user-provided name for the instance.
7268
varType: string
73-
connections:
74-
- source:
75-
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc
76-
version: ">= 9.1.0"
77-
spec:
78-
outputExpr: network_name
7969
- name: tier
8070
description: The service tier of the instance. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Tier
8171
varType: string
@@ -85,8 +75,27 @@ spec:
8575
varType: number
8676
defaultValue: 1
8777
- name: replica_count
88-
description: The number of replicas. can
78+
description: The number of replicas.
8979
varType: number
80+
- name: authorized_network
81+
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.
82+
varType: string
83+
connections:
84+
- source:
85+
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc
86+
version: ">= 9.1.0"
87+
spec:
88+
outputExpr: network_name
89+
- name: redis_version
90+
description: The version of Redis software.
91+
varType: string
92+
- name: connect_mode
93+
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.
94+
varType: string
95+
- name: enable_apis
96+
description: Flag for enabling redis.googleapis.com in your project
97+
varType: bool
98+
defaultValue: true
9099
- name: read_replicas_mode
91100
description: "Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode "
92101
varType: string
@@ -97,25 +106,16 @@ spec:
97106
- name: alternative_location_id
98107
description: The alternative zone where the instance will be provisioned.
99108
varType: string
100-
- name: redis_version
101-
description: The version of Redis software.
102-
varType: string
103109
- name: redis_configs
104110
description: The Redis configuration parameters. See [more details](https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs)
105111
varType: map(any)
106112
defaultValue: {}
107-
- name: display_name
108-
description: An arbitrary and optional user-provided name for the instance.
109-
varType: string
110113
- name: reserved_ip_range
111114
description: The CIDR range of internal addresses that are reserved for this instance.
112115
varType: string
113116
- name: secondary_ip_range
114117
description: Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance.
115118
varType: string
116-
- name: connect_mode
117-
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.
118-
varType: string
119119
- name: labels
120120
description: The resource labels to represent user provided metadata.
121121
varType: map(string)
@@ -150,12 +150,6 @@ spec:
150150
rdb_snapshot_period = string
151151
})
152152
outputs:
153-
- name: apphub_service_uri
154-
description: Service URI in CAIS style to be used by Apphub.
155-
type:
156-
- object
157-
- service_id: string
158-
service_uri: string
159153
- name: auth_string
160154
description: AUTH String set on the instance. This field will only be populated if auth_enabled is true.
161155
type: string

outputs.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,3 @@ output "env_vars" {
6868
"REDIS_PORT" : tostring(google_redis_instance.default.port)
6969
}
7070
}
71-
72-
output "apphub_service_uri" {
73-
value = {
74-
service_uri = "//redis.googleapis.com/${google_redis_instance.default.id}"
75-
service_id = substr("${var.name}-${md5("${google_redis_instance.default.region}-${var.project_id}")}", 0, 63)
76-
}
77-
description = "Service URI in CAIS style to be used by Apphub."
78-
}

0 commit comments

Comments
 (0)