fix
This commit is contained in:
@@ -36,6 +36,7 @@ resource "google_compute_instance" "backend" {
|
||||
|
||||
network_interface {
|
||||
subnetwork = var.backend_subnet_id
|
||||
access_config {} # IP publique
|
||||
}
|
||||
|
||||
tags = ["backend", "ssh"]
|
||||
@@ -59,8 +60,7 @@ resource "google_compute_instance" "database" {
|
||||
|
||||
network_interface {
|
||||
subnetwork = var.database_subnet_id
|
||||
access_config {}
|
||||
|
||||
access_config {} # IP publique
|
||||
}
|
||||
|
||||
tags = ["database", "ssh"]
|
||||
|
@@ -7,7 +7,7 @@ variable "instance_type" {
|
||||
variable "zone" {
|
||||
description = "zone des instances"
|
||||
type = string
|
||||
default = "europe-west4-a"
|
||||
default = "europe-west4"
|
||||
}
|
||||
|
||||
variable "frontend_subnet_id" {
|
||||
|
@@ -21,4 +21,4 @@ resource "google_os_login_ssh_public_key" "add_my_key" {
|
||||
project = var.project_id
|
||||
user = data.google_client_openid_userinfo.me.email
|
||||
key = file("~/.ssh/id_ed25519.pub")
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# modules/iam/variables.tf
|
||||
variable "project_id" {
|
||||
description = "ID du projet GCP"
|
||||
type = string
|
||||
}
|
||||
}
|
@@ -1,3 +1,4 @@
|
||||
# VPC
|
||||
resource "google_compute_network" "vpc" {
|
||||
name = "myvpc"
|
||||
auto_create_subnetworks = false
|
||||
|
@@ -1,29 +1,29 @@
|
||||
|
||||
#- project_name (string)
|
||||
variable "project_name" {
|
||||
description = "Nom du projet"
|
||||
type = string
|
||||
}
|
||||
|
||||
# - region (string)
|
||||
variable "region" {
|
||||
description = "Région du projet"
|
||||
type = string
|
||||
}
|
||||
|
||||
# - frontend_cidr (string)
|
||||
variable "frontend_cidr" {
|
||||
description = "cidr du frontend"
|
||||
type = string
|
||||
}
|
||||
|
||||
# - backend_cidr (string)
|
||||
variable "backend_cidr" {
|
||||
description = "cidr du backend"
|
||||
type = string
|
||||
}
|
||||
|
||||
# - database_cidr (string)
|
||||
variable "database_cidr" {
|
||||
description = "cidr du database"
|
||||
type = string
|
||||
}
|
||||
|
||||
# - ssh_source_ranges (string)
|
||||
variable "ssh_source_ranges" {
|
||||
description = "Accès à internet"
|
||||
type = string
|
||||
|
Reference in New Issue
Block a user