/crossplane-demo

A repo for testing and demoing Crossplane in K8s

Primary LanguageHCLApache License 2.0Apache-2.0

crossplane-demo

This repo contains a simple example showcasing how Crossplane can be used to manage New Relic alerts via Terraform.

Prerequisites

Setup

Rename the ./module/terraform.tfvars.json.example file to ./module/terraform.tfvars.json and modify the values. Then, create a Kubernetes Secret with the data.

kubectl create secret generic terraform --from-file=./module/terraform.tfvars.json

Create the provider.

kubectl apply -f ./crossplane-config/provider.yaml

Create the provider config.

kubectl apply -f ./crossplane-config/providerconfig.yaml

Create the Terraform workspace.

kubectl apply -f ./crossplane-config/workspace-remote.yaml

Validate that the workspace is ready and synced.

$ kubectl get workspaces
NAME              READY   SYNCED   AGE
newrelic-alerts   True    True     11m

Validation

If successful, you should see the Crossplane Demo alert policy created in your New Relic account.

alert condition