Files
terraform/juju/home-maas-focal/lma/24-grafana.tf
Arif Ali 1ca320e672 update the focal tf templates
* Now with cross-model relations
* Added infra and controller model
* Fixed lma model
* Updated variables and linking to model juju_model resource instead
2024-11-19 22:25:21 +00:00

37 lines
741 B
HCL

resource "juju_machine" "grafana" {
model = juju_model.lma.name
placement = join(":", ["lxd", juju_machine.lma_machines["201"].machine_id])
constraints = "spaces=oam"
}
resource "juju_application" "grafana" {
name = "grafana"
model = juju_model.lma.name
charm {
name = "grafana"
channel = "latest/stable"
base = "ubuntu@20.04"
}
units = 1
placement = juju_machine.grafana.machine_id
endpoint_bindings = [{
space = var.oam-space
}]
config = {
port = "3000"
install_method = "snap"
}
}
resource "juju_offer" "grafana" {
model = juju_model.lma.name
application_name = juju_application.grafana.name
endpoint = "dashboards"
}