-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
40 lines (35 loc) · 1.06 KB
/
main.tf
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
terraform {
required_version = "~>1.2"
required_providers {
kustomization = {
source = "kbst/kustomization"
version = "~> 0.9"
}
}
}
variable "olm_version" {
type = string
description = "Version of the operator lifecycle manager."
default = "v0.26.0"
}
locals {
olm_base_url = format(
"https://github.com/operator-framework/operator-lifecycle-manager/releases/download/%s",
var.olm_version
)
}
data "kustomization_overlay" "olm" {
resources = [
format("%s/crds.yaml", local.olm_base_url),
format("%s/olm.yaml", local.olm_base_url)
]
}
module "kustomization" {
source = "e-breuninger/kustomization/module"
version = "1.2.0"
kustomization_data_source = data.kustomization_overlay.olm
}
output "subscription_resource" {
value = module.kustomization.p0["apiextensions.k8s.io/CustomResourceDefinition/_/subscriptions.operators.coreos.com"]
description = "The crd for catalog subscriptions. Use this output to depend on the crd for subscriptions to be applied."
}