Skip to content

Commit 4e677e7

Browse files
committed
Rename project to project_id
1 parent 9c3c3f3 commit 4e677e7

File tree

17 files changed

+47
-18
lines changed

17 files changed

+47
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module "memorystore" {
5555
| memory\_size\_gb | Redis memory size in GiB. Defaulted to 1 GiB | `number` | `1` | no |
5656
| name | The ID of the instance or a fully qualified identifier for the instance. | `string` | n/a | yes |
5757
| persistence\_config | The Redis persistence configuration parameters. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#persistenceconfig | <pre>object({<br> persistence_mode = string<br> rdb_snapshot_period = string<br> })</pre> | `null` | no |
58-
| project | The ID of the project in which the resource belongs to. | `string` | n/a | yes |
58+
| project\_id | The ID of the project in which the resource belongs to. | `string` | n/a | yes |
5959
| 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 |
6060
| 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 |
6161
| redis\_version | The version of Redis software. | `string` | `null` | no |

docs/upgrading_to_v12.0.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Upgrading to v12.0
2+
3+
The v12.0 release contains backwards-incompatible changes.
4+
5+
## Use `project_id` instead of `project`
6+
7+
This release renames `project` to `project_id`. The required input variable `project_id` will be used to configure the project for the resource creation.
8+
9+
10+
```diff
11+
module "memorystore" {
12+
source = "terraform-google-modules/memorystore/google"
13+
version = "~> 11.0"
14+
15+
name = "memorystore"
16+
- project = "memorystore"
17+
+ project_id = "memorystore"
18+
memory_size_gb = "1"
19+
enable_apis = "true"
20+
}
21+
```
22+
23+
To be backward compatible, user needs to set `project_id` instead of `project` input variable.

examples/basic/memorystore.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module "memorystore" {
1919
version = "~> 11.0"
2020

2121
name = "memorystore"
22-
project = "memorystore"
22+
project_id = "memorystore"
2323
memory_size_gb = "1"
2424
enable_apis = "true"
2525
}

examples/memcache/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module "memcache" {
2929
version = "~> 11.0"
3030

3131
name = "example-memcache"
32-
project = var.project_id
32+
project_id = var.project_id
3333
memory_size_mb = "1024"
3434
enable_apis = true
3535
cpu_count = "1"

examples/minimal/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module "memstore" {
1919
version = "~> 11.0"
2020

2121
name = "test-minimal"
22-
project = var.project_id
22+
project_id = var.project_id
2323
region = "us-east1"
2424
location_id = "us-east1-b"
2525
enable_apis = true

examples/redis-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module "redis_cluster" {
3838
version = "~> 11.0"
3939

4040
name = "test-redis-cluster"
41-
project = var.project_id
41+
project_id = var.project_id
4242
region = "us-central1"
4343
network = ["projects/${var.project_id}/global/networks/${local.network_name}"]
4444
node_type = "REDIS_STANDARD_SMALL"

examples/redis/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "memstore" {
2020

2121
name = "test-redis"
2222

23-
project = var.project_id
23+
project_id = var.project_id
2424
region = "us-east1"
2525
location_id = "us-east1-b"
2626
alternative_location_id = "us-east1-d"

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
resource "google_redis_instance" "default" {
1818
depends_on = [module.enable_apis]
1919

20-
project = var.project
20+
project = var.project_id
2121
name = var.name
2222
tier = var.tier
2323
replica_count = var.tier == "STANDARD_HA" ? var.replica_count : null
@@ -72,7 +72,7 @@ module "enable_apis" {
7272
source = "terraform-google-modules/project-factory/google//modules/project_services"
7373
version = "~> 17.0"
7474

75-
project_id = var.project
75+
project_id = var.project_id
7676
enable_apis = var.enable_apis
7777
disable_services_on_destroy = false
7878
disable_dependent_services = false

metadata.display.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,9 @@ spec:
9696
transit_encryption_mode:
9797
name: transit_encryption_mode
9898
title: Transit Encryption Mode
99+
runtime:
100+
outputs:
101+
host:
102+
visibility: VISIBILITY_ROOT
103+
port:
104+
visibility: VISIBILITY_ROOT

metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
connections:
6262
- source:
6363
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc
64-
version: v9.1.0
64+
version: ">= 9.1.0"
6565
spec:
6666
outputExpr: network_name
6767
- name: connect_mode

0 commit comments

Comments
 (0)