Skip to content

Commit 37ec91c

Browse files
authored
Merge pull request #3 from breml/update-terraform
Update terraform
2 parents c118267 + a43ae34 commit 37ec91c

File tree

6 files changed

+611
-117
lines changed

6 files changed

+611
-117
lines changed

cmd/cmd_test.go

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ func TestPlain(t *testing.T) {
1919

2020
require.NoError(t, cmd.Execute())
2121
assert.Equal(t, `availability_zone_names = ["us-west-1a"]
22-
docker_ports = [{ external = 8300, internal = 8300, protocol = "tcp" }]
23-
image_id = null
22+
docker_ports = [{
23+
external = 8300
24+
internal = 8300
25+
protocol = "tcp"
26+
}]
27+
image_id = null
2428
`, actual.String())
2529
}
2630

@@ -62,8 +66,12 @@ func TestAutoAssign(t *testing.T) {
6266

6367
require.NoError(t, cmd.Execute())
6468
assert.Equal(t, `availability_zone_names = ["my-zone"]
65-
docker_ports = [{ external = 80, internal = 80, protocol = "tcp" }]
66-
image_id = "abc123"
69+
docker_ports = [{
70+
external = 80
71+
internal = 80
72+
protocol = "tcp"
73+
}]
74+
image_id = "abc123"
6775
`, actual.String())
6876
}
6977

@@ -76,8 +84,12 @@ func TestVar(t *testing.T) {
7684

7785
require.NoError(t, cmd.Execute())
7886
assert.Equal(t, `availability_zone_names = ["my-zone"]
79-
docker_ports = [{ external = 80, internal = 80, protocol = "tcp" }]
80-
image_id = "abc123"
87+
docker_ports = [{
88+
external = 80
89+
internal = 80
90+
protocol = "tcp"
91+
}]
92+
image_id = "abc123"
8193
`, actual.String())
8294
}
8395

@@ -101,8 +113,12 @@ func TestVarFile(t *testing.T) {
101113

102114
require.NoError(t, cmd.Execute())
103115
assert.Equal(t, `availability_zone_names = ["us-west-1a"]
104-
docker_ports = [{ external = 8300, internal = 8300, protocol = "tcp" }]
105-
image_id = "xyz"
116+
docker_ports = [{
117+
external = 8300
118+
internal = 8300
119+
protocol = "tcp"
120+
}]
121+
image_id = "xyz"
106122
`, actual.String())
107123
}
108124

@@ -116,4 +132,3 @@ func TestVarFileError(t *testing.T) {
116132
assert.Error(t, cmd.Execute())
117133
assert.Contains(t, actual.String(), `Error: tfvar: failed to parse 'testdata/bad.tfvars'`)
118134
}
119-

go.mod

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,33 @@ module github.com/shihanng/tfvar
33
go 1.13
44

55
require (
6-
github.com/certifi/gocertifi v0.0.0-20200104152315-a6d78f326758 // indirect
7-
github.com/cockroachdb/errors v1.2.4
8-
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
9-
github.com/getsentry/raven-go v0.2.0 // indirect
10-
github.com/hashicorp/hcl/v2 v2.2.0
11-
github.com/hashicorp/terraform v0.12.19
12-
github.com/spf13/cobra v0.0.5
13-
github.com/stretchr/testify v1.4.0
14-
github.com/zclconf/go-cty v1.1.1
15-
go.uber.org/zap v1.13.0
6+
github.com/agext/levenshtein v1.2.3 // indirect
7+
github.com/cockroachdb/errors v1.7.3
8+
github.com/cockroachdb/redact v1.0.4 // indirect
9+
github.com/fatih/color v1.9.0 // indirect
10+
github.com/google/go-cmp v0.5.2 // indirect
11+
github.com/hashicorp/go-hclog v0.14.1 // indirect
12+
github.com/hashicorp/go-multierror v1.1.0 // indirect
13+
github.com/hashicorp/go-retryablehttp v0.6.7 // indirect
14+
github.com/hashicorp/go-version v1.2.1 // indirect
15+
github.com/hashicorp/hcl/v2 v2.6.0
16+
github.com/hashicorp/terraform v0.13.1
17+
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
18+
github.com/kr/pretty v0.2.1 // indirect
19+
github.com/kr/text v0.2.0 // indirect
20+
github.com/mattn/go-colorable v0.1.7 // indirect
21+
github.com/spf13/afero v1.3.4 // indirect
22+
github.com/spf13/cobra v1.0.0
23+
github.com/spf13/pflag v1.0.5 // indirect
24+
github.com/stretchr/testify v1.5.1
25+
github.com/zclconf/go-cty v1.6.0
26+
go.uber.org/zap v1.16.0
27+
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a // indirect
28+
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
29+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
30+
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect
31+
golang.org/x/tools v0.0.0-20200902012652-d1954cc86c82 // indirect
32+
google.golang.org/appengine v1.6.6 // indirect
33+
google.golang.org/protobuf v1.25.0 // indirect
34+
honnef.co/go/tools v0.0.1-2020.1.5 // indirect
1635
)

0 commit comments

Comments
 (0)