allowedfileextensions

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

allowedfileextensions_object.go

allowedfileextensions_resource.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceJamfProAllowedFileExtensionCreate

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

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

func ResourceJamfProAllowedFileExtensionDelete

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

ResourceJamfProAllowedFileExtensionDelete is responsible for deleting an Allowed File Extension in Jamf Pro. This function will delete the resource based on its ID from the Terraform state. If the resource cannot be found by ID, it will attempt to delete by the 'extension' attribute.

func ResourceJamfProAllowedFileExtensionRead

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

ResourceJamfProAllowedFileExtensionRead is responsible for reading the current state of an Allowed File Extension Resource from the remote system. The function: 1. Fetches the Allowed File Extension's current state using its ID. If it fails, then obtain the Allowed File Extension's current state using its Name. 2. Updates the Terraform state with the fetched data to ensure it accurately reflects the current state in Jamf Pro. 3. Handles any discrepancies, such as the Allowed File Extension being deleted outside of Terraform, to keep the Terraform state synchronized.

func ResourceJamfProAllowedFileExtensionUpdate

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

ResourceJamfProAllowedFileExtensionUpdate handles the update operation for an AllowedFileExtension resource in Terraform. Since there is no direct update API endpoint, this function will delete the existing AllowedFileExtension and create a new one. This approach simulates an update operation from the user's perspective in Terraform.

func ResourceJamfProAllowedFileExtensions

func ResourceJamfProAllowedFileExtensions() *schema.Resource

ResourceJamfProAllowedFileExtensions defines the schema and CRUD operations for managing AllowedFileExtentionss in Terraform.

Types

This section is empty.

Jump to

Keyboard shortcuts

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