variable "oidc_issuer" {
  type = string
}

variable "oidc_arn" {
  type = string
}

variable "env" {
  type = string
}

variable "logical_region_name" {
  type = string
}

variable "auto_deploy_owner_tag" {
  type = string
}

module "cert-manager" {
  source = "../../ram_modules/controlplane"

  oidc_issuer = var.oidc_issuer
  oidc_arn    = var.oidc_arn
  role_name   = "${var.env}-${var.logical_region_name}-cert-manager"
  system_policies = [
    "AliyunDNSFullAccess",
  ]
  auto_deploy_owner_tag = var.auto_deploy_owner_tag
}

output "role_id" {
  value = module.cert-manager.controlplane_role_id
}

output "role_name" {
  value = module.cert-manager.controlplane_role_name
}

output "role_arn" {
  value = module.cert-manager.controlplane_role_arn
}
