Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support terraform resource import #1186

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

liu-hm19
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR implements the import interface for terraform runtime, and supports importing the existing TF resources with Kusion.

Which issue(s) this PR fixes:

Fixes #286

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., design docs, usage docs, etc.:


@liu-hm19 liu-hm19 added the kind/feature Categorizes issue or PR as related to a new feature label Jun 25, 2024
@liu-hm19 liu-hm19 added this to the v0.12.1 milestone Jun 25, 2024
@liu-hm19 liu-hm19 requested a review from SparkYuan June 25, 2024 09:41
@liu-hm19 liu-hm19 self-assigned this Jun 25, 2024
@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9660142142

Details

  • 12 of 93 (12.9%) changed or added relevant lines in 3 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 54.051%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/engine/operation/graph/resource_node.go 0 4 0.0%
pkg/engine/runtime/terraform/terraform_runtime.go 10 37 27.03%
pkg/engine/runtime/terraform/tfops/workspace.go 2 52 3.85%
Files with Coverage Reduction New Missed Lines %
pkg/cmd/destroy/destroy.go 7 49.82%
Totals Coverage Status
Change from base Build 9658530204: -0.2%
Covered Lines: 9127
Relevant Lines: 16886

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9709805329

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 12 of 93 (12.9%) changed or added relevant lines in 3 files are covered.
  • 261 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.3%) to 53.952%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/engine/operation/graph/resource_node.go 0 4 0.0%
pkg/engine/runtime/terraform/terraform_runtime.go 10 37 27.03%
pkg/engine/runtime/terraform/tfops/workspace.go 2 52 3.85%
Files with Coverage Reduction New Missed Lines %
pkg/config/validation.go 10 75.65%
pkg/apis/api.kusion.io/v1/types.go 14 0.0%
pkg/cmd/preview/preview.go 52 39.57%
pkg/cmd/apply/apply.go 185 50.3%
Totals Coverage Status
Change from base Build 9658530204: -0.3%
Covered Lines: 9146
Relevant Lines: 16952

💛 - Coveralls

Copy link
Member

@SparkYuan SparkYuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SparkYuan SparkYuan merged commit 55e7e7a into KusionStack:main Jun 28, 2024
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: implement import method of Terraform Runtime
3 participants