File tree Expand file tree Collapse file tree 5 files changed +1534
-7
lines changed
Expand file tree Collapse file tree 5 files changed +1534
-7
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cli
22
33import (
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 }
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -625,8 +625,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
625625github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 /go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E =
626626github.com/BurntSushi/toml v0.3.1 /go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU =
627627github.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 =
630630github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw =
631631github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 /go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM =
632632github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 h1:UQ0AhxogsIRZDkElkblfnwjc3IaltCm2HUMvezQaL7s =
Original file line number Diff line number Diff 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
8389data "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 {
You can’t perform that action at this time.
0 commit comments