deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
24 stars 9 forks source link

Terraform plugin sdk v2 #210

Closed ShocOne closed 2 months ago

ShocOne commented 2 months ago

Summary

This PR introduces a new importer for the All jamf pro resource in our Terraform provider. The importer uses the schema.ImportStatePassthroughContext to facilitate the straightforward import of existing Any instances into Terraform management without any transformations.

Implementation Details

Purpose

The addition of this importer enables users to easily integrate their existing <ResourceName> resources with Terraform, making it possible to manage these resources through Terraform without needing to recreate them. This is particularly useful for users who are transitioning to Terraform management and have pre-existing infrastructure that needs to be incorporated without disruption.

Usage

Users can import their existing <ResourceName> resources by executing the following command:

terraform import <provider>_<resource_name>.<resource_id> <ID_of_the_resource>

This command will read the current state of the resource from the underlying service and bring it under Terraform management.

Testing

Documentation

Notes

This change does not impact other resources or any existing functionality within the provider. It solely adds importing capabilities to <ResourceName>.