Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.
output "instance_ip_addr" {
value = aws_instance.server.private_ip
}
output "db_password" {
value = aws_db_instance.default.password
sensitive = true
}
variable "ami_id" {
type = string
validation {
condition = can(regex("^ami-", var.ami_id))
error_message = "Doit être un ID d'AMI valide, commençant par 'ami-'."
}
}
variable "region" {
description = "La région AWS à utiliser."
type = string
default = "us-west-2"
}
variable "users" {
type = map(object({
name = string
admin = bool
}))
}
variable "subnet_ids" {
type = list(string)
default = []
}
variable "tags" {
type = map(string)
default = {
Environment = "Dev"
Project = "MonApp"
}
}
locals {
common_tags = {
Owner = "EquipeDev"
}
}