Skip to content

Commit 537e33f

Browse files
committed
fixup the expansion block issue using tmp branch on fork
1 parent ddb86ab commit 537e33f

File tree

5 files changed

+1534
-7
lines changed

5 files changed

+1534
-7
lines changed

cli/plan.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cli
22

33
import (
44
"bytes"
5+
"encoding/json"
56
"fmt"
67
"os"
78
"os/exec"
@@ -51,7 +52,9 @@ func (r *RootCmd) TerraformPlan() *serpent.Command {
5152
return fmt.Errorf("terraform show not successful: %w", cmd.ProcessState)
5253
}
5354

54-
_ = os.WriteFile("plan.json", buf.Bytes(), 0644)
55+
var indented bytes.Buffer
56+
_ = json.Indent(&indented, buf.Bytes(), "", " ")
57+
_ = os.WriteFile("plan.json", indented.Bytes(), 0644)
5558
return nil
5659
},
5760
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ require (
123123
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
124124
)
125125

126-
replace github.com/aquasecurity/trivy => github.com/Emyrk/trivy v0.0.0-20250304152221-c3d8368d364b
126+
replace github.com/aquasecurity/trivy => github.com/Emyrk/trivy v0.0.0-20250304163950-c241282d5075

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
625625
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
626626
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
627627
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
628-
github.com/Emyrk/trivy v0.0.0-20250304152221-c3d8368d364b h1:ioU68ZOjXtCjouQqVGvjsEFUFn6CdVfxDJs+RcaCiUU=
629-
github.com/Emyrk/trivy v0.0.0-20250304152221-c3d8368d364b/go.mod h1:h/k++UOEKWxKbATF5462j0OpzrnYwkqHI0HAcLB5uuY=
628+
github.com/Emyrk/trivy v0.0.0-20250304163950-c241282d5075 h1:Ym18SXRgYCCi+2yCgtBAaJToPJyKGBRhYwQ83Wzw6ek=
629+
github.com/Emyrk/trivy v0.0.0-20250304163950-c241282d5075/go.mod h1:h/k++UOEKWxKbATF5462j0OpzrnYwkqHI0HAcLB5uuY=
630630
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw=
631631
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM=
632632
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s=

testdata/demo/parameters.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,19 @@ data "coder_parameter" "cpu" {
7979
}
8080
}
8181

82+
data "coder_workspace_tags" "test" {
83+
tags = {
84+
"hash": trimprefix(data.docker_registry_image.coder.sha256_digest, "sha256:")
85+
}
86+
}
87+
8288
// Advanced admin parameter
8389
data "coder_parameter" "image_hash" {
84-
count = local.isAdmin ? 1 : 0
90+
count = local.isAdmin ? 1 : 0
8591
name = "Image Hash"
8692
description = "Override the hash of the image to use. Only available to admins."
8793
// Value can get stale
8894
default = trimprefix(data.docker_registry_image.coder.sha256_digest, "sha256:")
89-
9095
order = 100
9196

9297
validation {

0 commit comments

Comments
 (0)