terraform-provider-jamfplatform

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 5 Imported by: 0

README

terraform-provider-jamf-platform

Provides resources and data sources for managing Jamf Platform Services:

Note that some of these APIs are only available in private beta. Provider stability, functionality and schemas are subject to change.

This repository also includes a Go client for direct API access and scripting.

Requirements

  • Terraform 1.3 or later

Using the Provider in your own Terraform Projects

If using the Terraform Registry
terraform {
  required_providers {
    jamfplatform = {
      source  = "Jamf-Concepts/jamfplatform"
      version = ">= 1.0.0"
    }
  }
}

provider "jamfplatform" {
  base_url        = "https://us.apigw.jamf.com" # or "https://eu.apigw.jamf.com", "https://apac.apigw.jamf.com"
  client_id       = "example-client-id"
  client_secret   = "example-client-secret"
}
If using a local install (see manual installation steps below)
terraform {
  required_providers {
    jamfplatform = {
      source  = "local/Jamf-Concepts/jamfplatform"
      version = ">= 1.0.0"
    }
  }
}

provider "jamfplatform" {
  base_url        = "https://us.apigw.jamf.com" # or "https://eu.apigw.jamf.com", "https://apac.apigw.jamf.com"
  client_id       = "example-client-id"
  client_secret   = "example-client-secret"
}

Initialize Terraform
terraform init

Terraform will detect the provider and you're good to go!

Note: If you are updating this provider manually, you should also delete the lock file:

rm .terraform.lock.hcl
terraform init

Manual Installation

Step 1: Download the Release Zip

Pick your platform and architecture from the latest releases page:

  • If running on an Apple Silicon Mac, download ...darwin_arm64.zip
  • If running on an Intel Mac, download ...darwin_amd64.zip

Step 2: Extract to your local Terraform Plugin Directory

The plugin must be extracted to the correct location for Terraform to find and use it. You must also remove the Quarantine attribute on macOS.

Example (macOS arm64)
cd ~/Downloads
mkdir -p ~/.terraform.d/plugins/local/Jamf-Concepts/jamfplatform/1.3.2/darwin_arm64
unzip terraform-provider-jamfplatform_1.3.2_darwin_arm64.zip -d ~/.terraform.d/plugins/local/Jamf-Concepts/jamfplatform/1.3.2/darwin_arm64
xattr -r -d com.apple.quarantine ~/.terraform.d/plugins

This will result in:

~/.terraform.d/plugins/
└── local/
    └── Jamf-Concepts/
        └── jamfplatform/
            └── 1.3.2/
                └── darwin_arm64/
                    └── terraform-provider-jamfplatform_v1.3.2
Step 3: Set up a local file system mirror

Terraform needs to know it will be using a locally installed plugin. Create the file: ~/.terraform.d/terraform.tfrc

  • nano ~/.terraform.d/terraform.tfrc

It must contain the following contents:

provider_installation {
  filesystem_mirror {
    path    = ~"/.terraform.d/plugins"
    include = ["local/Jamf-Concepts/*"]
  }
  direct {
    exclude = ["local/Jamf-Concepts/*"]
  }
}
  • In nano, use ctrl+x then enter y and return to save.

That's it! You're ready to use the provider!


Provider Configuration Reference and Example Usage

Refer to the documentation and the examples directories for full usage and Terraform examples.


Using the Go Client in Your Own Go Projects

You can import and use the Go client directly in your own Go code for scripting or automation against the services supported by the Jamf Platform API.

For example, go get a list of current Compliance Baselines from the mSCP:

import "github.com/Jamf-Concepts/terraform-provider-jamfplatform/internal/client"

func main() {
    apiClient := client.NewClient("https://region.apigw.jamf.com", "your-client-id", "your-client-secret")
    // Use apiClient to call API methods, e.g.:
    baselines, err := apiClient.GetCBEngineBaselines(context.Background())
    // ...
}

See the examples/client/ directory for full working Go examples.


Feedback & Discussion

Please contact the project principles via GitHub Issues. The Jamf Terraform community has discussions in #terraform-provider-jamfpro on MacAdmins Slack.

 

Copyright 2025, Jamf Software LLC.

Included components

The following third party acknowledgements and licenses are incorporated by reference:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL