kusion
kusion copied to clipboard
Feature: implement import method of Terraform Runtime
What would you like to be added?
We currently support import K8s resources existing in cluster and Spec(Plan resources) but not existing in kusion_state.json automatically. We also need to support this feature for TF resources.
/pkg/engine/runtime/terraform/terraform_runtime.go#L185
Why is this needed?
Importing TF resources automatically is necessary for our users and can help users to manage all resources they have with kusion.
Import resources is supported by Terraform
https://developer.hashicorp.com/terraform/cli/import
How to store TF resources now?Local path or other storage(oss/s3)?
How to store TF resources now?Local path or other storage(oss/s3)?
TF resources will be regarded as normal kusion resources and it will be saved in kusion_stat.json. Currently, kusion supports storing kusion_state.json in many storage types, like the local filesystem, oss, database, etc. You can find more details here pkg/engine/states
If you are already familiar with Terraform, we warmly welcome you to participate in this issue. The TerraformRuntime
interface provides several other methods that can assist you with this task. However, if you are new to Kusion and Terraform, we suggest taking a look at this 'good first issue' (https://github.com/KusionStack/kusion/issues/173)
OK, I‘m familiar with Terraform. But for kusion I need to be familiar with it