diff --git a/.gitignore b/.gitignore index 589e0c4..dc82526 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,4 @@ override.tf.json # Ignore CLI configuration files .terraformrc -terraform.rc - -db.secret \ No newline at end of file +terraform.rc \ No newline at end of file diff --git a/main.tf b/main.tf index df09144..4fa8e8f 100644 --- a/main.tf +++ b/main.tf @@ -1,13 +1,13 @@ -resource "kubernetes_namespace" "nodexpressv2" { +resource "kubernetes_namespace" "nodexpressv3" { metadata { - name = "nodexpressv2-namespace" + name = "nodexpressv3-namespace" } } resource "kubernetes_deployment" "api-skaffold" { metadata { name = "test" - namespace = kubernetes_namespace.nodexpressv2.metadata.0.name + namespace = kubernetes_namespace.nodexpressv3.metadata.0.name } spec { replicas = 1 @@ -38,7 +38,7 @@ resource "kubernetes_deployment" "api-skaffold" { resource "kubernetes_service" "api-skaffold_service" { metadata { name = "test" - namespace = "kubernetes_namespace.nodexpressv2.metadata.0.name" + namespace = "kubernetes_namespace.nodexpressv3.metadata.0.name" } spec { selector = { @@ -50,4 +50,8 @@ resource "kubernetes_service" "api-skaffold_service" { target_port = 3000 } } + wait_for_completion = true + timeouts { + create = "40s" + } } \ No newline at end of file