Skip to content

Commit

Permalink
Merge pull request #4 from e-breuninger/subscription-output
Browse files Browse the repository at this point in the history
feat: Add output for catalog subscription resource
  • Loading branch information
torvitas authored Jan 8, 2024
2 parents 48da0ff + 7d71a9e commit 343c4fb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
}
```

<!-- BEGIN_TF_DOCS -->


Expand All @@ -14,7 +31,9 @@ into a Kubernetes cluster.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_subscription_resource"></a> [subscription\_resource](#output\_subscription\_resource) | The crd for catalog subscriptions. Use this output to depend on the crd for subscriptions to be applied. |
<!-- END_TF_DOCS -->

## Upgrade to v2.0.0
Expand Down
7 changes: 6 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

0 comments on commit 343c4fb

Please sign in to comment.