update compute main&variables
This commit is contained in:
parent
41980535d7
commit
41da5c5607
@ -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"
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user