terraform-provider-jamfpro

command module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

README

Terraform Provider for Jamf Pro

This repository contains the Terraform provider for managing resources in Jamf Pro. It is built on the Terraform Plugin SDK and intended for creating and managing Jamf Pro entities like departments, sites, policies, etc.

The provider contains:

  • Resources and data sources for Jamf Pro entities (internal/provider/),
  • Examples (examples/) and generated documentation (docs/),
  • Miscellaneous meta files.

These files contain the actual code and configurations for the Terraform provider. Tutorials for creating Terraform providers can be found on the HashiCorp Developer platform.

Please see the GitHub template repository documentation for guidance on creating a new repository.

Once the provider is finalized, you may want to publish it on the Terraform Registry so that others can use it.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This provider uses Go modules.

To add a new dependency github.com/author/dependency to your Terraform provider:

go Get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Using the provider

To use this provider, you need to configure it with your Jamf Pro instance's URL and authentication credentials. The provider allows you to manage various resources such as departments, sites, and policies within Jamf Pro.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

To run the full suite of Acceptance tests, execute make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

make testacc

Benchmarking

Indicative time taken to implement changes using this terraform provider against a jamf cloud instance of jamf pro.

Setup: Jamf Cloud instance of Jamf Pro Empty instance of jamf pro with 0 devices enrolled Deployment of jamf pro departments (Simplement resource type in jamf pro)

API Calls Resource Type CRUD Operation Time Taken
1000 Departments Create 8m10s
1000 Departments Read 8ms
1000 Departments Update 8ms
1000 Departments delete 8ms
10000 Departments Create (TF Plan+Apply) 8m10s
10000 Departments Read (TF Plan) 2m49s
10000 Departments Update (TF Plan+Apply) 8ms
10000 Departments delete 8ms

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
client
config_client.go
config_client.go
endpoints/accountgroups
accountgroups_data_handling.go
accountgroups_data_handling.go
endpoints/accounts
accounts_data_handling.go
accounts_data_handling.go
endpoints/advancedcomputersearches
advancedcomputersearches_resource.go
advancedcomputersearches_resource.go
endpoints/advancedmobiledevicesearches
advancedmobiledevicesearches_resource.go
advancedmobiledevicesearches_resource.go
endpoints/advancedusersearches
advancedusersearches_resource.go
advancedusersearches_resource.go
endpoints/allowedfileextensions
allowedfileextensions_resource.go
allowedfileextensions_resource.go
endpoints/apiintegrations
apiintegrations_data_source.go
apiintegrations_data_source.go
endpoints/apiroles
apiroles_data_source.go
apiroles_data_source.go
endpoints/buildings
buildings_data_source.go
buildings_data_source.go
endpoints/byoprofiles
byoprofiles_resource.go
byoprofiles_resource.go
endpoints/common
functions.go This package contains shared / common resource functions
functions.go This package contains shared / common resource functions
endpoints/computercheckin
computercheckin_data_validation.go
computercheckin_data_validation.go
endpoints/computerextensionattributes
computerextensionattributes_data_source.go
computerextensionattributes_data_source.go
endpoints/computergroups
computergroup_data_source.go
computergroup_data_source.go
endpoints/computerinventory
computerinventory_data_source.go
computerinventory_data_source.go
endpoints/computerprestages
computerprestages_resource.go
computerprestages_resource.go
endpoints/departments
department_data_source.go
department_data_source.go
endpoints/diskencryptionconfigurations
diskencryptionconfigurations_resource.go
diskencryptionconfigurations_resource.go
endpoints/dockitems
dockitems_data_source.go
dockitems_data_source.go
endpoints/macosconfigurationprofiles
macosconfigurationprofiles_data_source.go
macosconfigurationprofiles_data_source.go
endpoints/policies
policies_data_source.go
policies_data_source.go
endpoints/printers
printers_data_source.go
printers_data_source.go
endpoints/scripts
scripts_data_handling.go
scripts_data_handling.go
endpoints/sites
sites_date_source.go
sites_date_source.go
helpers/provider_diagnostics
provider_diagnostics.go
provider_diagnostics.go
helpers/type_assertion
type_assertion.go
type_assertion.go
provider
providers.go
providers.go
utilities
utilities.go For utility/helper functions to support the jamf pro tf provider
utilities.go For utility/helper functions to support the jamf pro tf provider
Package version contains a variable used to construct the User-Agent for API requests.
Package version contains a variable used to construct the User-Agent for API requests.

Jump to

Keyboard shortcuts

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