diskencryptionconfigurations

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Overview

diskencryptionconfigurations_resource.go

diskencryptionconfigurations_resource.go

Index

Constants

View Source
const (
	JamfProResourceDiskEncryptionConfiguration = "Disk Encryption Configuration"
)

Variables

This section is empty.

Functions

func DataSourceJamfProDiskEncryptionConfigurations added in v0.0.14

func DataSourceJamfProDiskEncryptionConfigurations() *schema.Resource

DataSourceJamfProDiskEncryptionConfigurations defines the schema and CRUD operations for managing Jamf Pro Disk Encryption Configurations in Terraform.

func DataSourceJamfProDiskEncryptionConfigurationsRead added in v0.0.14

func DataSourceJamfProDiskEncryptionConfigurationsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func ResourceJamfProDiskEncryptionConfigurations

func ResourceJamfProDiskEncryptionConfigurations() *schema.Resource

ResourceJamfProDiskEncryptionConfigurations defines the schema and CRUD operations for managing Jamf Pro Disk Encryption Configurations in Terraform.

func ResourceJamfProDiskEncryptionConfigurationsCreate

func ResourceJamfProDiskEncryptionConfigurationsCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProDiskEncryptionConfigurationsCreate is responsible for creating a new Jamf Pro Disk Encryption Configuration in the remote system. The function: 1. Constructs the disk encryption configuration data using the provided Terraform configuration. 2. Calls the API to create the disk encryption configuration in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created disk encryption configuration. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.

func ResourceJamfProDiskEncryptionConfigurationsDelete

func ResourceJamfProDiskEncryptionConfigurationsDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProDiskEncryptionConfigurationsDelete is responsible for deleting a Jamf Pro Disk Encryption Configuration.

func ResourceJamfProDiskEncryptionConfigurationsRead

func ResourceJamfProDiskEncryptionConfigurationsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProDiskEncryptionConfigurationsRead is responsible for reading the current state of a Jamf Pro Disk Encryption Configuration resource from Jamf Pro and updating the Terraform state with the retrieved data. The function operates as follows: 1. Attempts to fetch the resource's current state using its ID stored in the Terraform state.

  • If the retrieval by ID fails with a 404 error, it attempts to fetch the resource using its name as a fallback.
  • Non-404 errors encountered during retrieval by ID or name immediately terminate the retry loop as non-retryable.

2. If the resource cannot be found by either ID or name after all retry attempts, and the last error is a 404, the resource is considered deleted outside of Terraform. In this case, the resource ID is cleared from the Terraform state, effectively removing the resource from Terraform management.

  • For errors other than 404, diagnostics are returned with the last error encountered.

3. Upon successful retrieval, the function updates the Terraform state with the resource's attributes, such as 'name', 'key_type', 'file_vault_enabled_users', and 'institutional_recovery_key'.

  • The 'institutional_recovery_key' attribute is handled carefully to account for its optional nature and complex structure.

func ResourceJamfProDiskEncryptionConfigurationsUpdate

func ResourceJamfProDiskEncryptionConfigurationsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

ResourceJamfProDiskEncryptionConfigurationsUpdate is responsible for updating an existing Jamf Pro Disk Encryption Configuration on the remote system.

Types

This section is empty.

Jump to

Keyboard shortcuts

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