-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Problem description
I'm always frustrated when I need to import existing resources into my Terraform state using the stackitcloud provider because the necessary import commands and instructions are missing from the documentation for all resources. This makes it difficult and time-consuming to incorporate existing infrastructure into Terraform management, as users have to manually figure out the correct import syntax for each resource type. This deviates from the standard practice of other major Terraform providers, which consistently include import instructions in their resource documentation.
Proposed solution
I propose that the documentation for every resource within the stackitcloud Terraform provider be updated to include clear and concise instructions on how to import existing resources. This should ideally include:
The specific terraform import command syntax for each resource.
An example of the required ID format for importing (e.g., a single ID, a combination of project ID and resource ID, etc.).
This would significantly improve the user experience, streamline the adoption of Terraform for existing STACKIT cloud resources, and align the provider's documentation with industry best practices.
# Example of how import instructions could be presented in the documentation for a hypothetical resource:
#
# To import an existing STACKIT Object Storage Bucket, use the following command:
#
# terraform import 'stackit_object_storage_bucket.example' 'project_id,bucket_name'
#
# Replace 'project_id' with your STACKIT Project ID and 'bucket_name' with the name of your bucket.
#
# For example:
# terraform import 'stackit_object_storage_bucket.my_bucket' '01234567-89ab-cdef-0123-456789abcdef,my-existing-bucket'
Alternative solutions (optional)
I have considered relying on community forums or trial-and-error to determine import commands, but these methods are inefficient and error-prone. Providing official, documented import instructions is the most effective and user-friendly solution.
Additional information
The absence of import documentation is a significant barrier for users trying to adopt Terraform for existing STACKIT infrastructure. Implementing this feature would greatly enhance the usability and completeness of the stackitcloud Terraform provider. Thank you for considering this request.