forked from pierront/but3-iac
encore encore encore
This commit is contained in:
@@ -48,7 +48,7 @@ resource "google_compute_firewall" "allow-http" {
|
|||||||
|
|
||||||
# - SSH vers toutes les instances
|
# - SSH vers toutes les instances
|
||||||
resource "google_compute_firewall" "SSH" {
|
resource "google_compute_firewall" "SSH" {
|
||||||
name = "google_compute_firewall"
|
name = "SSH"
|
||||||
network = google_compute_network.vpc.id
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
@@ -61,7 +61,7 @@ resource "google_compute_firewall" "SSH" {
|
|||||||
|
|
||||||
# - Port 8000 de frontend vers backend
|
# - Port 8000 de frontend vers backend
|
||||||
resource "google_compute_firewall" "front-back" {
|
resource "google_compute_firewall" "front-back" {
|
||||||
name = "google_compute_firewall"
|
name = "front-back"
|
||||||
network = google_compute_network.vpc.id
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
@@ -75,7 +75,7 @@ resource "google_compute_firewall" "front-back" {
|
|||||||
|
|
||||||
# - Port 3306 de backend vers database
|
# - Port 3306 de backend vers database
|
||||||
resource "google_compute_firewall" "back-base" {
|
resource "google_compute_firewall" "back-base" {
|
||||||
name = "google_compute_firewall"
|
name = "back-base"
|
||||||
network = google_compute_network.vpc.id
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
|
|||||||
@@ -1,17 +1,11 @@
|
|||||||
output "vpc_terraform" {
|
output "vpc_terraform_output" {
|
||||||
description = "ID du VPC créé"
|
value = google_compute_network.vpc_terraform.id
|
||||||
value = google_compute_instance.vpc.id
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "list_id" {
|
||||||
output "subnet_ids" {
|
|
||||||
description = "Map des IDs des sous-réseaux"
|
|
||||||
value = {
|
value = {
|
||||||
|
frontend = google_compute_subnetwork.subnet_frontend.id
|
||||||
frontend = google_compute_subnetwork.frontend.id
|
backend = google_compute_subnetwork.subnet_backend.id
|
||||||
backend = google_compute_subnetwork.backend.id
|
database = google_compute_subnetwork.subnet_database.id
|
||||||
database = google_compute_subnetwork.database.id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user