Documentation ¶
Overview ¶
scripts_data_validation.go
scripts_date_source.go
scripts_resource.go
Index ¶
- func DataSourceJamfProScripts() *schema.Resource
- func DataSourceJamfProScriptsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProScripts() *schema.Resource
- func ResourceJamfProScriptsCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProScriptsDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProScriptsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceJamfProScriptsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceJamfProScripts ¶
DataSourceJamfProScripts provides information about a specific Jamf Pro script by its ID or Name.
func DataSourceJamfProScriptsRead ¶
func DataSourceJamfProScriptsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
dataSourceJamfProScriptsRead fetches the details of a specific Jamf Pro script from Jamf Pro using either its unique Name or its Id. The function prioritizes the 'name' attribute over the 'id' attribute for fetching details. If neither 'name' nor 'id' is provided, it returns an error. Once the details are fetched, they are set in the data source's state.
Parameters: - ctx: The context within which the function is called. It's used for timeouts and cancellation. - d: The current state of the data source. - meta: The meta object that can be used to retrieve the API client connection.
Returns: - diag.Diagnostics: Returns any diagnostics (errors or warnings) encountered during the function's execution.
func ResourceJamfProScripts ¶
ResourceJamfProScripts defines the schema and CRUD operations for managing Jamf Pro Scripts in Terraform.
func ResourceJamfProScriptsCreate ¶
func ResourceJamfProScriptsCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProScriptsCreate is responsible for creating a new Jamf Pro Script in the remote system. The function: 1. Constructs the attribute data using the provided Terraform configuration. 2. Calls the API to create the attribute in Jamf Pro. 3. Updates the Terraform state with the ID of the newly created attribute. 4. Initiates a read operation to synchronize the Terraform state with the actual state in Jamf Pro.
func ResourceJamfProScriptsDelete ¶
func ResourceJamfProScriptsDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProScriptsDelete is responsible for deleting a Jamf Pro script.
func ResourceJamfProScriptsRead ¶
func ResourceJamfProScriptsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProScriptsRead is responsible for reading the current state of a Jamf Pro Script Resource from the remote system. The function: 1. Fetches the attribute's current state using its ID. If it fails then obtain attribute'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 attribute being deleted outside of Terraform, to keep the Terraform state synchronized.
func ResourceJamfProScriptsUpdate ¶
func ResourceJamfProScriptsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
ResourceJamfProScriptsUpdate is responsible for updating an existing Jamf Pro Script on the remote system.
Types ¶
This section is empty.