update compute main&variables

This commit is contained in:
Come THURET 2024-12-04 17:09:31 +01:00
parent 41980535d7
commit 41da5c5607
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,23 @@
resource "google_compute_instance" "tp07-frontend" {
name = "tp07-frontend"
machine_type = "e2-small"
zone = var.region
boot_disk {
initialize_params {
image = "debian-cloud/debian-11"
size = 10
}
}
network_interface {
subnetwork = var.tp07-frontend
access_config {} # IP publique
}
tags = ["frontend", "ssh"]
metadata = {
enable-oslogin = "TRUE"
}
}

View File

@ -0,0 +1,19 @@
variable "tp07-frontend"{
description = "sous réseau frontend"
type = string
}
variable "tp07-backend"{
description = "sous réseau backend"
type = string
}
variable "tp07-database"{
description = "sous réseau database"
type = string
}
variable "region"{
description = "region du projet"
type = string
}