sky-lattice/blueprint/modules/rbac/main.tf

37 lines
589 B
Terraform
Raw Permalink Normal View History

variable "prefix" {
type = string
}
variable "domain" {
type = string
}
variable "access_profile" {
type = string
default = "standard"
}
variable "environments" {
type = list(string)
}
locals {
roles = {
analyst = "${var.prefix}_${upper(var.domain)}_ANALYST"
loader = "${var.prefix}_${upper(var.domain)}_LOADER"
engineer = "${var.prefix}_${upper(var.domain)}_ENGINEER"
}
}
output "roles" {
value = local.roles
}
output "access_profile" {
value = var.access_profile
}
output "planned_objects" {
value = [for k, v in local.roles : "role:${v}"]
}