Skip to content

Commit c5d4bc3

Browse files
sANGINI2004Sangini Gargimrannayer
authored
chore: Add "enable_api" module to Memorystore for Redis Instances examples (#319)
Co-authored-by: Sangini Garg <[email protected]> Co-authored-by: Imran Nayer <[email protected]>
1 parent 0d78c19 commit c5d4bc3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

examples/redis/main.tf

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
* limitations under the License.
1515
*/
1616

17+
module "enable_apis" {
18+
source = "terraform-google-modules/project-factory/google//modules/project_services"
19+
version = "~> 18.0"
20+
21+
project_id = var.project_id
22+
enable_apis = true
23+
disable_services_on_destroy = false
24+
disable_dependent_services = false
25+
26+
activate_apis = [
27+
"redis.googleapis.com",
28+
]
29+
}
30+
1731
module "memstore" {
1832
source = "terraform-google-modules/memorystore/google"
1933
version = "~> 15.0"
@@ -24,7 +38,7 @@ module "memstore" {
2438
region = "us-east1"
2539
location_id = "us-east1-b"
2640
alternative_location_id = "us-east1-d"
27-
enable_apis = true
41+
enable_apis = false
2842
auth_enabled = true
2943
transit_encryption_mode = "SERVER_AUTHENTICATION"
3044
authorized_network = module.test-vpc-module.network_id

0 commit comments

Comments
 (0)