-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.tf
More file actions
74 lines (61 loc) · 1.27 KB
/
main.tf
File metadata and controls
74 lines (61 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
terraform {
required_providers {
juju = {
version = "1.5.1"
source = "juju/juju"
}
}
}
variable "client_id" {
type = string
sensitive = true
}
variable "client_secret" {
type = string
sensitive = true
}
variable "jimm_url" {
type = string
}
variable "model" {
type = string
}
variable "charm" {
description = "The configurations of the application."
type = object({
name = optional(string, "identity-platform-login-ui-operator")
units = optional(number, 1)
base = optional(string, "ubuntu@22.04")
trust = optional(string, true)
config = optional(map(string), {})
})
default = {}
}
variable "application_name" {
type = string
}
variable "revision" {
type = number
}
variable "channel" {
type = string
}
provider "juju" {
controller_addresses = var.jimm_url
client_id = var.client_id
client_secret = var.client_secret
}
data "juju_model" "model" {
name = var.model
owner = format("%s@serviceaccount", var.client_id)
}
module "application" {
source = "../terraform"
model = data.juju_model.model.uuid
app_name = var.application_name
units = var.charm.units
base = var.charm.base
config = var.charm.config
channel = var.channel
revision = var.revision
}