Skip to content

Commit

Permalink
fix!: make region a required input variable (terraform-google-modules…
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w authored Dec 17, 2024
1 parent cbd2fd6 commit 9f9ebb9
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module "memorystore" {
| read\_replicas\_mode | Read replicas mode. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#readreplicasmode | `string` | `"READ_REPLICAS_DISABLED"` | no |
| redis\_configs | The Redis configuration parameters. See [more details](https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs) | `map(any)` | `{}` | no |
| redis\_version | The version of Redis software. | `string` | `null` | no |
| region | The GCP region to use. | `string` | `null` | no |
| region | The GCP region to use. | `string` | n/a | yes |
| replica\_count | The number of replicas. | `number` | `null` | no |
| reserved\_ip\_range | The CIDR range of internal addresses that are reserved for this instance. | `string` | `null` | no |
| secondary\_ip\_range | Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. | `string` | `null` | no |
Expand Down
16 changes: 16 additions & 0 deletions docs/upgrading_to_v13.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

The v13.0 release contains backwards-incompatible changes.

## Explicitly provide region as input

```diff
module "memorystore" {
source = "terraform-google-modules/memorystore/google"
version = "~> 13.0"

name = "memorystore"
project_id = "memorystore"
memory_size_gb = "1"
enable_apis = "true"
+ region = "us-central1"
}

```

## Replace uses of apphub_service_uri

This release removes apphub_service_uri output. You can replace use of `apphub_service_uri` by forming the desired output as below,
Expand Down
1 change: 1 addition & 0 deletions examples/basic/memorystore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ module "memorystore" {
project_id = "memorystore"
memory_size_gb = "1"
enable_apis = "true"
region = "us-central1"
}
19 changes: 14 additions & 5 deletions metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ spec:
persistence_config:
name: persistence_config
title: Persistence Config
project:
name: project
title: Project
project_id:
name: project_id
title: Project Id
read_replicas_mode:
name: read_replicas_mode
title: Read Replicas Mode
Expand All @@ -84,11 +84,20 @@ spec:
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
level: 1
altDefaults:
- type: ALTERNATE_TYPE_DC
value: REDIS_7_0
region:
name: region
title: Region
level: 1
replica_count:
name: replica_count
title: Replica Count
Expand All @@ -102,12 +111,12 @@ spec:
tier:
name: tier
title: Tier
level: 1
enumValueLabels:
- label: STANDARD_HA
value: STANDARD_HA
- label: BASIC
value: BASIC
level: 1
transit_encryption_mode:
name: transit_encryption_mode
title: Transit Encryption Mode
Expand Down
1 change: 1 addition & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
- name: region
description: The GCP region to use.
varType: string
required: true
- name: name
description: The ID of the instance or a fully qualified identifier for the instance.
varType: string
Expand Down
1 change: 0 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ variable "project_id" {
variable "region" {
description = "The GCP region to use."
type = string
default = null
}

variable "name" {
Expand Down

0 comments on commit 9f9ebb9

Please sign in to comment.