How to deploy with Terraform

This charm ships a Terraform module that wraps the Juju provider, so you can manage an osquery deployment declaratively alongside the rest of your infrastructure.

Prerequisites

  • Terraform installed.

  • The Juju Terraform provider configured against your Juju controller.

  • An existing Juju model, or a principal application to attach the subordinate to.

Use the module

Reference the module from the charm’s repository in your Terraform configuration:

module "osquery" {
  source     = "git::https://github.com/canonical/osquery-operator//terraform"
  model_name = "my-model"
}

The module’s inputs and outputs are documented in the Terraform reference and in the module’s own README.

Plan and apply

Initialize the working directory, review the plan, and apply it:

terraform init
terraform plan
terraform apply

After terraform apply completes, integrate the osquery subordinate with a principal application and configure it as described in the advanced tutorial.