diff --git a/README.md b/README.md index d9d25e0..7e57ae3 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,23 @@ Installs [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager/) into a Kubernetes cluster. +## Example + +```terraform +module "olm" { + source = "e-breuninger/olm/module" + version = "v2.1.0" + # renovate: datasource=github-releases depName=operator-framework/operator-lifecycle-manager + olm_version = "v0.26.0" +} + +resource "some_resource" "operator_subscription" { + depends_on = [ + module.olm.subscription_resource + ] +} +``` + @@ -14,7 +31,9 @@ into a Kubernetes cluster. ## Outputs -No outputs. +| Name | Description | +|------|-------------| +| [subscription\_resource](#output\_subscription\_resource) | The crd for catalog subscriptions. Use this output to depend on the crd for subscriptions to be applied. | ## Upgrade to v2.0.0 diff --git a/main.tf b/main.tf index d33ff94..998aad8 100644 --- a/main.tf +++ b/main.tf @@ -30,6 +30,11 @@ data "kustomization_overlay" "olm" { module "kustomization" { source = "e-breuninger/kustomization/module" - version = "1.0.0" + version = "1.1.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." +}