Skip to content

Commit 70125a8

Browse files
committed
Downgrade the blueprint roles
1 parent ff07b65 commit 70125a8

File tree

6 files changed

+170
-185
lines changed

6 files changed

+170
-185
lines changed

metadata.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,11 @@ spec:
195195
roles:
196196
- level: Project
197197
roles:
198-
- roles/owner
199-
module_roles:
200-
root:
198+
- roles/memorystore.admin
201199
- roles/redis.admin
202-
memcache:
203200
- roles/memcache.admin
204-
redis-cluster:
205-
- roles/redis.admin
206-
valkey:
207-
- roles/memorystore.admin
201+
- roles/compute.networkAdmin
202+
- roles/resourcemanager.projectIamAdmin
208203
services:
209204
- cloudresourcemanager.googleapis.com
210205
- serviceusage.googleapis.com
@@ -213,15 +208,7 @@ spec:
213208
- serviceconsumermanagement.googleapis.com
214209
- networkconnectivity.googleapis.com
215210
- compute.googleapis.com
216-
module_services:
217-
root:
218-
- redis.googleapis.com
219-
memcache:
220-
- memcache.googleapis.com
221-
redis-cluster:
222-
- redis.googleapis.com
223-
valkey:
224-
- memorystore.googleapis.com
211+
- memorystore.googleapis.com
225212
providerVersions:
226213
- source: hashicorp/google
227214
version: ">= 4.74.0, < 7"

modules/memcache/metadata.yaml

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,53 @@ spec:
4646
location: examples/valkey
4747
interfaces:
4848
variables:
49+
- name: region
50+
description: The GCP region to use.
51+
varType: string
52+
required: true
53+
- name: project_id
54+
description: The ID of the project in which the resource belongs to.
55+
varType: string
56+
required: true
57+
- name: enable_apis
58+
description: Flag for enabling memcache.googleapis.com in your project
59+
varType: bool
60+
defaultValue: true
61+
- name: name
62+
description: The ID of the instance or a fully qualified identifier for the instance.
63+
varType: string
64+
required: true
65+
- name: memcache_version
66+
description: The major version of Memcached software.
67+
varType: string
4968
- name: authorized_network
5069
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.
5170
varType: string
71+
- name: node_count
72+
description: Number of nodes in the memcache instance.
73+
varType: number
74+
defaultValue: 1
5275
- name: cpu_count
5376
description: Number of CPUs per node
5477
varType: number
5578
defaultValue: 1
79+
- name: memory_size_mb
80+
description: Memcache memory size in MiB. Defaulted to 1024
81+
varType: number
82+
defaultValue: 1024
83+
- name: zones
84+
description: Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
85+
varType: list(string)
5686
- name: display_name
5787
description: An arbitrary and optional user-provided name for the instance.
5888
varType: string
59-
- name: enable_apis
60-
description: Flag for enabling memcache.googleapis.com in your project
61-
varType: bool
62-
defaultValue: true
6389
- name: labels
6490
description: The resource labels to represent user provided metadata.
6591
varType: map(string)
6692
defaultValue: {}
93+
- name: params
94+
description: Parameters for the memcache process
95+
varType: map(string)
6796
- name: maintenance_policy
6897
description: The maintenance policy for an instance.
6998
varType: |-
@@ -77,35 +106,6 @@ spec:
77106
nanos = number
78107
})
79108
})
80-
- name: memcache_version
81-
description: The major version of Memcached software.
82-
varType: string
83-
- name: memory_size_mb
84-
description: Memcache memory size in MiB. Defaulted to 1024
85-
varType: number
86-
defaultValue: 1024
87-
- name: name
88-
description: The ID of the instance or a fully qualified identifier for the instance.
89-
varType: string
90-
required: true
91-
- name: node_count
92-
description: Number of nodes in the memcache instance.
93-
varType: number
94-
defaultValue: 1
95-
- name: params
96-
description: Parameters for the memcache process
97-
varType: map(string)
98-
- name: project_id
99-
description: The ID of the project in which the resource belongs to.
100-
varType: string
101-
required: true
102-
- name: region
103-
description: The GCP region to use.
104-
varType: string
105-
required: true
106-
- name: zones
107-
description: Zones where memcache nodes should be provisioned. If not provided, all zones will be used.
108-
varType: list(string)
109109
outputs:
110110
- name: discovery
111111
description: The memorystore discovery endpoint.
@@ -119,7 +119,11 @@ spec:
119119
roles:
120120
- level: Project
121121
roles:
122-
- roles/owner
122+
- roles/memorystore.admin
123+
- roles/redis.admin
124+
- roles/memcache.admin
125+
- roles/compute.networkAdmin
126+
- roles/resourcemanager.projectIamAdmin
123127
services:
124128
- cloudresourcemanager.googleapis.com
125129
- serviceusage.googleapis.com
@@ -128,3 +132,9 @@ spec:
128132
- serviceconsumermanagement.googleapis.com
129133
- networkconnectivity.googleapis.com
130134
- compute.googleapis.com
135+
- memorystore.googleapis.com
136+
providerVersions:
137+
- source: hashicorp/google
138+
version: ">= 4.23.0, < 7"
139+
- source: hashicorp/google-beta
140+
version: ">= 4.23.0, < 7"

modules/redis-cluster/metadata.yaml

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,52 +46,42 @@ spec:
4646
location: examples/valkey
4747
interfaces:
4848
variables:
49-
- name: authorization_mode
50-
description: "The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. Default value is AUTH_MODE_DISABLED. Possible values are: AUTH_MODE_UNSPECIFIED, AUTH_MODE_IAM_AUTH, AUTH_MODE_DISABLED"
51-
varType: string
52-
defaultValue: AUTH_MODE_DISABLED
53-
- name: deletion_protection_enabled
54-
description: " Indicates if the cluster is deletion protected or not. If the value if set to true, any delete cluster operation will fail. Default value is true"
55-
varType: bool
56-
defaultValue: true
57-
- name: enable_apis
58-
description: Flag for enabling memcache.googleapis.com in your project
59-
varType: bool
60-
defaultValue: true
6149
- name: name
6250
description: The ID of the instance or a fully qualified identifier for the instance. must be 1 to 63 characters and use only lowercase letters, numbers, or hyphens. It must start with a lowercase letter and end with a lowercase letter or number
6351
varType: string
6452
required: true
65-
- name: network
66-
description: List of consumer network where the network address of the discovery endpoint will be reserved, in the form of projects/{network_project_id_or_number}/global/networks/{network_id}. Currently, only one item is supported
67-
varType: list(string)
68-
required: true
69-
- name: node_type
70-
description: "The nodeType for the Redis cluster. If not provided, REDIS_HIGHMEM_MEDIUM will be used as default Possible values are: REDIS_SHARED_CORE_NANO, REDIS_HIGHMEM_MEDIUM, REDIS_HIGHMEM_XLARGE, REDIS_STANDARD_SMALL."
71-
varType: string
7253
- name: project_id
7354
description: The ID of the project in which the resource belongs to.
7455
varType: string
7556
required: true
76-
- name: redis_configs
77-
description: Configure Redis Cluster behavior using a subset of native Redis configuration parameters
78-
varType: |-
79-
object({
80-
maxmemory-clients = optional(string)
81-
maxmemory = optional(string)
82-
maxmemory-policy = optional(string)
83-
notify-keyspace-events = optional(string)
84-
slowlog-log-slower-than = optional(number)
85-
maxclients = optional(number)
86-
})
8757
- name: region
8858
description: The name of the region of the Redis cluster
8959
varType: string
9060
required: true
61+
- name: enable_apis
62+
description: Flag for enabling memcache.googleapis.com in your project
63+
varType: bool
64+
defaultValue: true
65+
- name: shard_count
66+
description: Required. Number of shards for the Redis cluster. The minimum number of shards in a Memorystore cluster is 3 shards
67+
varType: number
68+
defaultValue: 3
9169
- name: replica_count
9270
description: The number of replica nodes per shard. Each shard can have 0, 1, or 2 replica nodes. Replicas provide high availability and additional read throughput, and are evenly distributed across zones
9371
varType: number
9472
defaultValue: 0
73+
- name: transit_encryption_mode
74+
description: "The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. Default value is TRANSIT_ENCRYPTION_MODE_DISABLED. Possible values are: TRANSIT_ENCRYPTION_MODE_UNSPECIFIED, TRANSIT_ENCRYPTION_MODE_DISABLED, TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"
75+
varType: string
76+
defaultValue: TRANSIT_ENCRYPTION_MODE_DISABLED
77+
- name: authorization_mode
78+
description: "The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. Default value is AUTH_MODE_DISABLED. Possible values are: AUTH_MODE_UNSPECIFIED, AUTH_MODE_IAM_AUTH, AUTH_MODE_DISABLED"
79+
varType: string
80+
defaultValue: AUTH_MODE_DISABLED
81+
- name: network
82+
description: List of consumer network where the network address of the discovery endpoint will be reserved, in the form of projects/{network_project_id_or_number}/global/networks/{network_id}. Currently, only one item is supported
83+
varType: list(string)
84+
required: true
9585
- name: service_connection_policies
9686
description: The Service Connection Policies to create
9787
varType: |-
@@ -104,21 +94,31 @@ spec:
10494
labels = optional(map(string), {})
10595
}))
10696
defaultValue: {}
107-
- name: shard_count
108-
description: Required. Number of shards for the Redis cluster. The minimum number of shards in a Memorystore cluster is 3 shards
109-
varType: number
110-
defaultValue: 3
111-
- name: transit_encryption_mode
112-
description: "The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. Default value is TRANSIT_ENCRYPTION_MODE_DISABLED. Possible values are: TRANSIT_ENCRYPTION_MODE_UNSPECIFIED, TRANSIT_ENCRYPTION_MODE_DISABLED, TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION"
97+
- name: node_type
98+
description: "The nodeType for the Redis cluster. If not provided, REDIS_HIGHMEM_MEDIUM will be used as default Possible values are: REDIS_SHARED_CORE_NANO, REDIS_HIGHMEM_MEDIUM, REDIS_HIGHMEM_XLARGE, REDIS_STANDARD_SMALL."
11399
varType: string
114-
defaultValue: TRANSIT_ENCRYPTION_MODE_DISABLED
100+
- name: redis_configs
101+
description: Configure Redis Cluster behavior using a subset of native Redis configuration parameters
102+
varType: |-
103+
object({
104+
maxmemory-clients = optional(string)
105+
maxmemory = optional(string)
106+
maxmemory-policy = optional(string)
107+
notify-keyspace-events = optional(string)
108+
slowlog-log-slower-than = optional(number)
109+
maxclients = optional(number)
110+
})
115111
- name: zone_distribution_config_mode
116112
description: "The mode for zone distribution for Memorystore Redis cluster (Immutable). If not provided, MULTI_ZONE will be used as default value. Possible values are: MULTI_ZONE, SINGLE_ZONE"
117113
varType: string
118114
defaultValue: MULTI_ZONE
119115
- name: zone_distribution_config_zone
120116
description: The zone for single zone Memorystore Redis cluster (Immutable)
121117
varType: string
118+
- name: deletion_protection_enabled
119+
description: " Indicates if the cluster is deletion protected or not. If the value if set to true, any delete cluster operation will fail. Default value is true"
120+
varType: bool
121+
defaultValue: true
122122
outputs:
123123
- name: discovery_endpoints
124124
description: Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one endpoint is supported
@@ -132,7 +132,11 @@ spec:
132132
roles:
133133
- level: Project
134134
roles:
135-
- roles/owner
135+
- roles/memorystore.admin
136+
- roles/redis.admin
137+
- roles/memcache.admin
138+
- roles/compute.networkAdmin
139+
- roles/resourcemanager.projectIamAdmin
136140
services:
137141
- cloudresourcemanager.googleapis.com
138142
- serviceusage.googleapis.com
@@ -141,3 +145,7 @@ spec:
141145
- serviceconsumermanagement.googleapis.com
142146
- networkconnectivity.googleapis.com
143147
- compute.googleapis.com
148+
- memorystore.googleapis.com
149+
providerVersions:
150+
- source: hashicorp/google
151+
version: ">= 6.0, < 7"

0 commit comments

Comments
 (0)