We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 672f04d commit 50a35d0Copy full SHA for 50a35d0
external/states/statefile/resources.go
@@ -1,21 +1,17 @@
1
package statefile
2
3
import (
4
+ "io"
5
+ "sort"
6
+
7
"github.com/kaytu-io/terraform-package/external/addrs"
8
"github.com/kaytu-io/terraform-package/external/configs/hcl2shim"
- "os"
- "sort"
9
10
ctyjson "github.com/zclconf/go-cty/cty/json"
11
)
12
13
// Returns the list of ARNs for all resources in the state file
-func GetResourcesArn(path string) []string {
14
- f, err := os.Open("terraform.tfstate")
15
- if err != nil {
16
- panic(err)
17
- }
18
-
+func GetResourcesArn(f io.Reader) []string {
19
result, err := Read(f)
20
if err != nil {
21
panic(err)
0 commit comments