### Example Go Scripts for Client Usage Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/README.md Points to example Go scripts that demonstrate how the client functions can be utilized in other projects. The long-term goal is to extract these into a separate SDK. ```go Check out the [example Go scripts](examples/client) showing how the client functions can be used in other projects. The intention here is to break these out into a separate SDK eventually. ``` -------------------------------- ### Terraform Provider Documentation Link Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/README.md Provides a link to the official documentation for the terraform-provider-axm, guiding users on how to get started with using it in Terraform. ```markdown [Read the documentation to get started with using it in Terraform!](https://registry.terraform.io/providers/neilmartin83/axm/latest/docs) ``` -------------------------------- ### Example Usage Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/device_management_services.md Fetches the list of device management services and outputs them. ```terraform data "axm_device_management_services" "all" {} output "all_mdm_servers" { value = data.axm_device_management_services.all } ``` -------------------------------- ### axm_organization_device_assigned_server_information Data Source Example Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_device_assigned_server_information.md This example demonstrates how to use the axm_organization_device_assigned_server_information data source to retrieve the MDM server assigned to a device and output the information. ```terraform data "axm_organization_device_assigned_server_information" "example" { device_id = "GX7N12345XYZ" } output "assigned_server" { value = data.axm_organization_device_assigned_server_information.example } ``` -------------------------------- ### axm_organization_devices Data Source Example Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_devices.md Fetches the list of devices from Apple Business or School Manager using the axm_organization_devices data source. It then outputs the retrieved device information. ```terraform data "axm_organization_devices" "all" {} output "all" { value = data.axm_organization_devices.all } ``` -------------------------------- ### axm_device_management_service_serial_numbers Data Source Example Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/device_management_service_serial_numbers.md This example demonstrates how to use the axm_device_management_service_serial_numbers data source to fetch serial numbers for a specific MDM server and output them. ```terraform data "axm_device_management_service_serial_numbers" "example" { server_id = "12345678ABCD9012EFGH5678IJKL9012" } output "device_serial_numbers" { value = data.axm_device_management_service_serial_numbers.example } ``` -------------------------------- ### Fetch Organization Device Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_device.md This example demonstrates how to use the `axm_organization_device` data source to retrieve details of a specific device using its ID. The output block then displays the retrieved device information. ```terraform data "axm_organization_device" "example" { id = "GX7N12345XYZ" } output "example_device" { value = data.axm_organization_device.example } ``` -------------------------------- ### axm_device_management_service Resource Example Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/resources/device_management_service.md Manages device assignments to a specific Apple Business Manager MDM server. This resource requires a device management service ID and a list of device IDs to assign. ```terraform resource "axm_device_management_service" "example" { id = "FAKE0000111122223333444444444444" device_ids = [ "FAKE000ABC123", "FAKE111DEF456", "FAKE222GHI789" ] } ``` -------------------------------- ### Go Client Implementation for Apple API Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/README.md Details the location of the Go client implementation for interacting with the Apple Business/School Manager API. It highlights that OAuth functions are in a separate file due to their complexity. ```go /* internal/client contains a complete client implementation to interract with all the endpoints documented here (https://developer.apple.com/documentation/apple-school-and-business-manager-api). OAuth functions are in a separate client_oauth.go file due to their complexity. */ ``` -------------------------------- ### axm_organization_device Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_device.md Defines the schema for the `axm_organization_device` data source, specifying required input parameters and read-only attributes returned for a device. ```APIDOC axm_organization_device (Data Source): Fetches information about a specific device from Apple Business or School Manager. Schema: Required: - id (String): The identifier of the device to lookup. Read-Only: - added_to_org_date_time (String): The date and time when the device was added to the organization. - bluetooth_mac_address (String): Bluetooth MAC address. - color (String): The color of the device. - device_capacity (String): The storage capacity of the device. - device_model (String): The model of the device. - eid (String): The EID of the device. - imei (List of String): The IMEI numbers associated with the device. - meid (List of String): The MEID numbers associated with the device. - order_date_time (String): The date and time when the device was ordered. - order_number (String): The order number associated with the device. - part_number (String): The part number of the device. - product_family (String): The product family of the device. - product_type (String): The product type of the device. - purchase_source_id (String): The identifier of the purchase source. - purchase_source_type (String): The type of the purchase source. - serial_number (String): The serial number of the device. - status (String): The current status of the device. - type (String): The type of the device. - updated_date_time (String): The date and time when the device was last updated. - wifi_mac_address (String): Wi-Fi MAC address. ``` -------------------------------- ### Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/device_management_services.md Defines the schema for the axm_device_management_services data source, including read-only attributes for servers. ```APIDOC axm_device_management_services (Data Source) Fetches the list of device management services. Schema: ### Read-Only - id (String) Identifier for this data source. - servers (Attributes List) List of device management services. (see [below for nested schema](#nestedatt--servers)) ### Nested Schema for `servers` Read-Only: - created_date_time (String) The creation date and time of the server. - id (String) The identifier of the MDM server. - server_name (String) The name of the MDM server. - server_type (String) The type of the server (MDM, APPLE_CONFIGURATOR, APPLE_MDM). - type (String) The type of the resource (mdmServers). - updated_date_time (String) The last update date and time of the server. ``` -------------------------------- ### axm Provider Configuration Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/index.md Configures the axm Terraform provider with authentication details for the Apple Business and School Manager API. Requires client ID, key ID, private key, and scope. Optionally accepts team ID. ```terraform provider "axm" { client_id = "BUSINESSAPI.abcdef12-3456-4789-abcd-ef1234567890" key_id = "98765432-dcba-4321-9876-543210fedcba" private_key = file("/path/to/private_key.pem") scope = "business.api" } ``` -------------------------------- ### axm_device_management_service Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/resources/device_management_service.md Defines the schema for the axm_device_management_service resource, including required and optional arguments for managing device assignments. ```APIDOC axm_device_management_service (Resource): Manages device assignments to a specific Apple Business Manager MDM server. Schema: Required: - device_ids (List of String): A list of device IDs to assign to the MDM server. These are device serial numbers. Optional: - id (String): MDM server ID. This is a unique ID for the server and is visible in the browser address bar when navigating to Preferences and selecting the desired 'Device Management Service'. Required until creation is supported. ``` -------------------------------- ### axm_organization_device_assigned_server_information Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_device_assigned_server_information.md Defines the schema for the axm_organization_device_assigned_server_information data source, including required and read-only attributes. ```APIDOC axm_organization_device_assigned_server_information: description: Retrieves information about the MDM server assigned to a specific device. attributes: required: device_id: type: String description: The identifier (serial number) of the device to look up. read_only: created_date_time: type: String description: The creation date and time of the server assignment. id: type: String description: Identifier for this data source. server_id: type: String description: The identifier of the assigned MDM server. server_name: type: String description: The name of the assigned MDM server. server_type: type: String description: The type of the assigned server (MDM, APPLE_CONFIGURATOR, APPLE_MDM). updated_date_time: type: String description: The last update date and time of the server assignment. ``` -------------------------------- ### axm_organization_devices Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/organization_devices.md Defines the schema for the axm_organization_devices data source, detailing the read-only attributes for organization devices, including nested attributes for individual device details. ```APIDOC axm_organization_devices (Data Source): Fetches the list of devices from Apple Business or School Manager. Schema: devices (Attributes List) - List of organization devices. (see [below for nested schema](#nestedatt--devices)) - added_to_org_date_time (String) - Date and time when device was added to organization. - bluetooth_mac_address (String) - Bluetooth MAC address. - color (String) - Device color. - device_capacity (String) - Device capacity. - device_model (String) - Device model. - eid (String) - EID number. - id (String) - Device identifier. - imei (List of String) - IMEI numbers. - meid (List of String) - MEID numbers. - order_date_time (String) - Order date and time. - order_number (String) - Order number. - part_number (String) - Part number. - product_family (String) - Product family. - product_type (String) - Product type. - purchase_source_id (String) - Purchase source identifier. - purchase_source_type (String) - Purchase source type. - serial_number (String) - Device serial number. - status (String) - Device status. - type (String) - Device type. - updated_date_time (String) - Last update date and time. - wifi_mac_address (String) - Wi-Fi MAC address. id (String) - Identifier of the data source. ``` -------------------------------- ### axm Provider Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/index.md Defines the configuration schema for the axm Terraform provider, including required and optional parameters for authentication and API scope. ```APIDOC axm Provider Schema: Required: - client_id (String): Client ID for Apple Business and School Manager authentication. Can also be set via the AXM_CLIENT_ID environment variable. - key_id (String): Key ID for the private key. Can also be set via the AXM_KEY_ID environment variable. - private_key (String, Sensitive): Contents of the private key downloaded from Apple Business or School Manager. Can also be set via the AXM_PRIVATE_KEY environment variable. - scope (String): API scope to use. Valid values are 'business.api' or 'school.api'. Can also be set via the AXM_SCOPE environment variable. Optional: - team_id (String): Team ID for Apple Business and School Manager authentication. If not specified, client_id will be used. Can also be set via the AXM_TEAM_ID environment variable. ``` -------------------------------- ### axm_device_management_service_serial_numbers Schema Source: https://github.com/neilmartin83/terraform-provider-axm/blob/main/docs/data-sources/device_management_service_serial_numbers.md Defines the schema for the axm_device_management_service_serial_numbers data source, including required and read-only attributes. ```APIDOC axm_device_management_service_serial_numbers (Data Source): Retrieves the list of device serial numbers assigned to a specific device management service. Schema: Required: - server_id (String): The identifier of the MDM server to get serial numbers for. Read-Only: - id (String): Identifier for this data source. - serial_numbers (List of String): List of device serial numbers assigned to this MDM server. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.