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
2
2
3
3
import (
4
4
"bytes"
5
+ "encoding/json"
5
6
"fmt"
6
7
"os"
7
8
"os/exec"
@@ -51,7 +52,9 @@ func (r *RootCmd) TerraformPlan() *serpent.Command {
51
52
return fmt .Errorf ("terraform show not successful: %w" , cmd .ProcessState )
52
53
}
53
54
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 )
55
58
return nil
56
59
},
57
60
}
Original file line number Diff line number Diff line change @@ -123,4 +123,4 @@ require (
123
123
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
124
124
)
125
125
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
625
625
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 /go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E =
626
626
github.com/BurntSushi/toml v0.3.1 /go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU =
627
627
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 =
630
630
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw =
631
631
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 /go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM =
632
632
github.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" {
79
79
}
80
80
}
81
81
82
+ data "coder_workspace_tags" "test" {
83
+ tags = {
84
+ " hash" : trimprefix (data. docker_registry_image . coder . sha256_digest , " sha256:" )
85
+ }
86
+ }
87
+
82
88
// Advanced admin parameter
83
89
data "coder_parameter" "image_hash" {
84
- count = local. isAdmin ? 1 : 0
90
+ count = local. isAdmin ? 1 : 0
85
91
name = " Image Hash"
86
92
description = " Override the hash of the image to use. Only available to admins."
87
93
// Value can get stale
88
94
default = trimprefix (data. docker_registry_image . coder . sha256_digest , " sha256:" )
89
-
90
95
order = 100
91
96
92
97
validation {
You can’t perform that action at this time.
0 commit comments