KusionStack / KusionStack/kusion
Feat: Importing terraform resources takes too long
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 107
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
What would you like to be added?
Importing a terraform resource takes around 1 minute for the preview step and about 30 seconds for the apply step.
Kusion currently has a --max-concurrent flag that specifies the number of concurrent resource node executions (including terraform) that defaults to 10. This is still relatively slow. Importing 120 resources takes about 20 minutes to complete (Every 10 resources takes about 1 minute and half).
This issues tracks the effort to reduce the 1 minute and half time frame.
Why is this needed?
Another workaround to this is to up the number of --max-concurrent but that has other consequences.
Each terraform CLI execution allegedly takes ~100MB memory usage so a safe number of --max-concurrent may differ case by case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by reproducing the 120-resource import and measuring the preview and apply steps with --max-concurrent; done means reducing the reported delays without relying only on a higher concurrency value and while accounting for Terraform CLI memory use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- terraform
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100