This commit is contained in:
Guillaume VALLAT 2024-12-06 16:23:32 +01:00
parent 2c6a297c9b
commit fae5069ae5

View File

@ -41,10 +41,23 @@ module "compute" {
module "iam" { module "iam" {
source = "../../modules/iam" source = "../../modules/iam"
# Variables d'entrée
# Autres variables spécifiques au module
project_id = var.project_id project_id = var.project_id
} }
data "google_client_openid_userinfo" "me" {
}
resource "local_file" "ansible_config" {
content = templatefile("${path.module}/../../templates/ansible.cfg.tpl",
{
remote_user = data.google_client_openid_userinfo.me.email
}
)
filename = "../../../ansible/ansible.cfg"
}
resource "local_file" "service_account" {
content = base64decode(module.iam.service_account_key)
filename = "../../../ansible/service_account.json"
}