Skip to content

Commit

Permalink
feat(slurmrestd): add config options for base and constraints
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Nucciarone <nuccitheboss@ubuntu.com>
  • Loading branch information
NucciTheBoss committed Jan 16, 2025
1 parent a8daa62 commit 115019f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
13 changes: 8 additions & 5 deletions charms/slurmrestd/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2024-2025 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,10 +17,13 @@ resource "juju_application" "slurmrestd" {
model = var.model_name

charm {
name = "slurmrestd"
channel = var.channel
name = "slurmrestd"
base = var.base
channel = var.channel
revision = var.revision
}

config = var.config
units = var.units
config = var.config
constraints = var.constraints
units = var.units
}
28 changes: 21 additions & 7 deletions charms/slurmrestd/terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Canonical Ltd.
# Copyright 2024-2025 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,35 +13,49 @@
# limitations under the License.

variable "app_name" {
description = "Name of the slurmrestd application within the Juju model"
description = "Application name"
type = string
default = "slurmrestd"
}

variable "base" {
description = "Charm base"
type = string
default = "ubuntu@24.04"
}

variable "channel" {
description = "Channel to deploy the slurmrestd charm from."
description = "Charm channel"
type = string
default = "latest/edge"
}

variable "config" {
description = "Initial configuration for deployed slurmrestd charm."
description = "Charm configuration"
type = map(string)
default = {}
}

variable "constraints" {
description = "Deployment constraints"
type = string
default = "arch=amd64"
}

variable "model_name" {
description = "Name of model to deploy slurmrestd charm to."
description = "Model name"
type = string
}

variable "revision" {
description = "Revision of the slurmrestd charm to deploy."
description = "Charm revision"
type = number
nullable = true
default = null
}

variable "units" {
description = "Number of slurmrestd units to deploy."
description = "Number of units"
type = number
default = 1
}

0 comments on commit 115019f

Please sign in to comment.