Skip to content

Conversation

@nghialv
Copy link
Member

@nghialv nghialv commented Jul 6, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #674

Does this PR introduce a user-facing change?:

NONE

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 32.20%. This pull request decreases coverage by -0.05%.

File Function Base Head Diff
pkg/app/piped/cloudprovider/terraform/terraform.go WithoutColor -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go WithVars -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go WithVarFiles -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go stripAnsiCodes -- 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go parsePlanResult 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Apply 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go NewTerraform 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Init 0.00% 0.00% +0.00%
pkg/app/piped/cloudprovider/terraform/terraform.go Terraform.Plan 0.00% 0.00% +0.00%

Comment on lines 91 to 99
if t.options.noColor {
args = append(args, "-no-color")
}
for _, v := range t.options.vars {
args = append(args, fmt.Sprintf("-var=%s", v))
}
for _, f := range t.varFiles {
for _, f := range t.options.varFiles {
args = append(args, fmt.Sprintf("-var-file=%s", f))
}
Copy link
Member

@khanhtc1202 khanhtc1202 Jul 7, 2021

Choose a reason for hiding this comment

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

nits, should we extract this part as t.makeCommandArgs private method 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. Applied that idea. 👍

@nakabonne
Copy link
Member

With it we can see the full version of the preview result for Terraform 👍
/lgtm

@pipecd-bot pipecd-bot added the lgtm label Jul 7, 2021
@pipecd-bot pipecd-bot removed the lgtm label Jul 7, 2021
@khanhtc1202
Copy link
Member

Thx
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by khanhtc1202.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit 9658d3a into master Jul 7, 2021
@pipecd-bot pipecd-bot deleted the terraform-option branch July 7, 2021 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove this -no-color flag after parsePlanResult supports parsing the message containing color codes.

5 participants