kusion
kusion copied to clipboard
feat: support terraform runtime
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
- [ ] N
- [x] Y
re #22
2. What is the scope of this PR (e.g. component or file name):
pkg/engine/runtime pkg/terraform
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [x] Other
support kusion terraform runtime: 1、WorkspaceStore store Terraform workspaces. 2、InitWorkSpace、Apply、Read、Destroy call terraform cli and parse terraform output
4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
- [x] N
- [ ] Y
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:
- [x] Unit test
- [ ] Integration test
- [ ] Benchmark (add benchmark stats below)
- [ ] Manual test (add detailed scripts or steps below)
- [ ] Other
6. Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
None
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
Pull Request Test Coverage Report for Build 2860840545
- 273 of 399 (68.42%) changed or added relevant lines in 8 files are covered.
- 13 unchanged lines in 3 files lost coverage.
- Overall coverage decreased (-0.3%) to 74.447%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| pkg/engine/operation/graph/resource_node.go | 2 | 3 | 66.67% |
| pkg/engine/runtime/terraform/tfops/state.go | 14 | 16 | 87.5% |
| pkg/kusionctl/cmd/destroy/options.go | 9 | 11 | 81.82% |
| pkg/engine/runtime/terraform/tfops/tferrors.go | 22 | 26 | 84.62% |
| pkg/engine/runtime/terraform/tfops/store.go | 32 | 50 | 64.0% |
| pkg/engine/runtime/terraform/tfops/workspace.go | 135 | 180 | 75.0% |
| pkg/engine/runtime/terraform/terraform_runtime.go | 54 | 108 | 50.0% |
| <!-- | Total: | 273 | 399 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| pkg/engine/operation/graph/resource_node.go | 3 | 61.11% |
| pkg/engine/operation/parser/parser.go | 3 | 75.0% |
| pkg/kusionctl/cmd/destroy/options.go | 7 | 84.31% |
| <!-- | Total: | 13 |
| Totals | |
|---|---|
| Change from base Build 2838069109: | -0.3% |
| Covered Lines: | 4274 |
| Relevant Lines: | 5741 |
💛 - Coveralls
- Please move pkg/runtime to engine/runtime/tf_runtime
- Keep runtime's difference into runtime pkg and do not add if-branch in main logic
- Capitalize the first letter in runtime Types
- Move tf runtime into a individual project latter