correction arborescence

This commit is contained in:
2025-12-04 11:47:32 +01:00
parent 6b1d52974a
commit 188ae64c09
28 changed files with 3413 additions and 6 deletions

View File

@@ -0,0 +1,26 @@
resource "google_service_account" "terraform_sa" {
account_id = "terraform"
display_name = "Service Account pour Terraform Automation"
}
resource "google_service_account_key" "terraform_sa_key" {
service_account_id = google_service_account.terraform_sa.name
public_key_type = "TYPE_X509_PEM_FILE"
}
resource "google_project_iam_binding" "terraform_viewer" {
project = var.projet_name
role = "roles/viewer"
members = [
"serviceAccount:${google_service_account.terraform_sa.email}",
]
}
data "google_client_openid_userinfo" "me" {}
resource "google_os_login_ssh_public_key" "my_ssh_key" {
user = data.google_client_openid_userinfo.me.email
key = file("~/.ssh/id_ed25519.pub")
project = var.projet_name
}

View File

@@ -0,0 +1,9 @@
output "service_account_email" {
value = google_service_account.terraform_sa.email
}
output "service_account_key" {
value = google_service_account_key.terraform_sa_key.private_key
sensitive = true
}

View File

@@ -0,0 +1,4 @@
variable "projet_name" {
type = string
default = "projet-hugo-478713"
}