浏览代码

setup and run the db

Chris Mague 8 年之前
父节点
当前提交
2755d3f792
共有 3 个文件被更改,包括 6 次插入2 次删除
  1. 1 1
      README.md
  2. 1 1
      main.tf
  3. 4 0
      variables.tf

+ 1 - 1
README.md

@@ -18,6 +18,6 @@ tfenv install `cat .terraform-version`
 
 
 ```
 ```
 terraform plan
 terraform plan
-terraform apply
+terraform apply -var myip=<IP_ADDRESS_OF_YOUR_LAPTOP>
 ```
 ```
 
 

+ 1 - 1
main.tf

@@ -50,7 +50,7 @@ resource "docker_container" "keycloak" {
 }
 }
 
 
 provider "postgresql" {
 provider "postgresql" {
-  host            = "127.0.0.1"
+  host            = "172.18.5.3"
   port            = 5432
   port            = 5432
   database        = "postgres"
   database        = "postgres"
   username        = "${var.postgres_user}"
   username        = "${var.postgres_user}"

+ 4 - 0
variables.tf

@@ -7,3 +7,7 @@ variable "postgres_password" {
   description = "The Postgres password we want"
   description = "The Postgres password we want"
   default     = "psqltest"
   default     = "psqltest"
 }
 }
+
+variable "myip" {
+  description = "IP address of the local machine"
+}