diff --git a/cart-service/src/main/java/com/nashtech/car/cart/WebConfig.java b/cart-service/src/main/java/com/nashtech/car/cart/WebConfig.java deleted file mode 100644 index 88d15089..00000000 --- a/cart-service/src/main/java/com/nashtech/car/cart/WebConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.nashtech.car.cart; - -/* -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.CorsRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -@Configuration -@ComponentScan -public class WebConfig implements WebMvcConfigurer { - - @Override - public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**") - .allowedOrigins("http://localhost:4200/") // Allow requests from Angular app - .allowedMethods("GET", "POST", "PUT", "DELETE") - .maxAge(3600); - } -} -*/ - diff --git a/deployment/gcpresources/terraform/main.tf b/deployment/gcpresources/terraform/main.tf index 86aeaf31..f6f386bc 100644 --- a/deployment/gcpresources/terraform/main.tf +++ b/deployment/gcpresources/terraform/main.tf @@ -58,6 +58,11 @@ resource "google_sql_database" "shipment_db" { project = var.app_project instance = google_sql_database_instance.my_sql.name } +resource "google_sql_database" "cart_db" { + name = var.cart_db_name + project = var.app_project + instance = google_sql_database_instance.my_sql.name +} # create user resource "random_id" "user_password" { diff --git a/deployment/gcpresources/terraform/my-sql-instance-variables.tf b/deployment/gcpresources/terraform/my-sql-instance-variables.tf index 2afff598..411ae8e4 100644 --- a/deployment/gcpresources/terraform/my-sql-instance-variables.tf +++ b/deployment/gcpresources/terraform/my-sql-instance-variables.tf @@ -60,6 +60,13 @@ variable shipment_db_name { description = "Name of the default database to create" default = "shipment_db" } + +# cart database +variable cart_db_name { + description = "Name of the default database to create" + default = "cart_db" +} + # user settings variable user_name { description = "The name of the default user"