Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github.com/hashicorp/consul/api to v1.22.0 #346

Merged
merged 4 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.18.x, 1.19.x]
go-version: [1.19.x, 1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -24,8 +24,8 @@ jobs:
run: make test
- name: Run OSS acceptance tests
run: |
curl -LO https://releases.hashicorp.com/consul/1.14.2/consul_1.14.2_linux_amd64.zip
sudo unzip consul_1.14.2_linux_amd64.zip consul -d /usr/local/bin
curl -LO https://releases.hashicorp.com/consul/1.15.2/consul_1.15.2_linux_amd64.zip
sudo unzip consul_1.15.2_linux_amd64.zip consul -d /usr/local/bin
SKIP_REMOTE_DATACENTER_TESTS=1 make testacc TESTARGS="-count=1"
- name: Run go vet
run: make vet
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.6
1.20.5
2 changes: 1 addition & 1 deletion consul/data_source_consul_peering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestAccDataConsulPeering_basic(t *testing.T) {
resource.TestCheckResourceAttr("data.consul_peering.basic", "peer_server_addresses.#", "1"),
resource.TestCheckResourceAttr("data.consul_peering.basic", "peer_server_addresses.0", "127.0.0.1:9503"),
resource.TestCheckResourceAttrSet("data.consul_peering.basic", "peer_server_name"),
resource.TestCheckResourceAttr("data.consul_peering.basic", "state", "ESTABLISHING"),
resource.TestCheckResourceAttrSet("data.consul_peering.basic", "state"),
),
},
},
Expand Down
1 change: 0 additions & 1 deletion consul/data_source_consul_peerings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestAccDataConsulPeerings_basic(t *testing.T) {
resource.TestCheckResourceAttrSet("data.consul_peerings.basic", "peers.0.meta.%"),
resource.TestCheckResourceAttr("data.consul_peerings.basic", "peers.0.meta.foo", "bar"),
resource.TestCheckResourceAttrSet("data.consul_peerings.basic", "peers.0.name"),
resource.TestCheckResourceAttr("data.consul_peerings.basic", "peers.0.partition", ""),
resource.TestCheckResourceAttr("data.consul_peerings.basic", "peers.0.peer_ca_pems.#", "1"),
resource.TestCheckResourceAttrSet("data.consul_peerings.basic", "peers.0.peer_id"),
resource.TestCheckResourceAttrSet("data.consul_peerings.basic", "peers.0.peer_server_addresses.#"),
Expand Down
3 changes: 2 additions & 1 deletion consul/resource_consul_config_entry_ce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestAccConsulConfigEntryCE_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("consul_config_entry.foo", "name", "global"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "kind", "proxy-defaults"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "config_json", "{\"Config\":{\"foo\":\"bar\"},\"Expose\":{},\"MeshGateway\":{},\"TransparentProxy\":{}}"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "config_json", "{\"AccessLogs\":{},\"Config\":{\"foo\":\"bar\"},\"Expose\":{},\"MeshGateway\":{},\"TransparentProxy\":{}}"),
),
},
{
Expand Down Expand Up @@ -204,6 +204,7 @@ resource "consul_config_entry" "foo" {
kind = "proxy-defaults"

config_json = jsonencode({
AccessLogs = {}
Config = {
foo = "bar"
}
Expand Down
3 changes: 2 additions & 1 deletion consul/resource_consul_config_entry_ee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestAccConsulConfigEntryEE_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("consul_config_entry.foo", "name", "global"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "kind", "proxy-defaults"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "config_json", "{\"Config\":{\"foo\":\"bar\"},\"Expose\":{},\"MeshGateway\":{},\"TransparentProxy\":{}}"),
resource.TestCheckResourceAttr("consul_config_entry.foo", "config_json", "{\"AccessLogs\":{},\"Config\":{\"foo\":\"bar\"},\"Expose\":{},\"MeshGateway\":{},\"TransparentProxy\":{}}"),
),
},
{
Expand Down Expand Up @@ -238,6 +238,7 @@ resource "consul_config_entry" "foo" {
kind = "proxy-defaults"

config_json = jsonencode({
AccessLogs = {}
Config = {
foo = "bar"
}
Expand Down
2 changes: 1 addition & 1 deletion consul/resource_consul_peering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestAccConsulPeering_basic(t *testing.T) {
resource.TestCheckResourceAttr("consul_peering.basic", "peer_server_addresses.0", "127.0.0.1:9503"),
resource.TestCheckResourceAttrSet("consul_peering.basic", "peer_server_name"),
resource.TestCheckResourceAttrSet("consul_peering.basic", "peering_token"),
resource.TestCheckResourceAttr("consul_peering.basic", "state", "ESTABLISHING"),
resource.TestCheckResourceAttrSet("consul_peering.basic", "state"),
),
},
{
Expand Down
12 changes: 2 additions & 10 deletions consul/resource_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,22 +412,14 @@ func serverIsConsulCommunityEdition(t *testing.T) bool {
if path == "" {
path = "consul"
}
cmd := exec.Command(path, "version", "-format=json")
cmd := exec.Command(path, "version")

data, err := cmd.Output()
if err != nil {
t.Fatalf("failed to get `consul version` output: %v", err)
}

type Output struct {
Version string
}
var output Output
if err := json.Unmarshal(data, &output); err != nil {
t.Fatalf("failed to unmarshal Consul version: %v", err)
}

return !strings.HasSuffix(output.Version, "+ent")
return !strings.Contains(string(data), "+ent")
}

func skipTestOnConsulCommunityEdition(t *testing.T) {
Expand Down
54 changes: 28 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
module github.com/hashicorp/terraform-provider-consul

require (
github.com/hashicorp/consul/api v1.18.0
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/consul/api v1.22.0
github.com/hashicorp/errwrap v1.1.0
github.com/hashicorp/terraform-plugin-sdk v1.17.2
github.com/mitchellh/mapstructure v1.4.3
github.com/mitchellh/mapstructure v1.5.0
)

require (
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/iam v0.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.12.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
)

require (
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go/storage v1.27.0 // indirect
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/frankban/quicktest v1.14.4 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
github.com/hashicorp/consul/sdk v0.13.0
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
github.com/hashicorp/consul/sdk v0.14.0
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.0 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.3.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -66,8 +68,8 @@ require (
github.com/keybase/go-crypto v0.0.0-20180614160407-5114a9a81e1b // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/cli v1.1.2 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
Expand All @@ -84,18 +86,18 @@ require (
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.8.2 // indirect
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
go.opencensus.io v0.23.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.100.0 // indirect
google.golang.org/api v0.114.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.29.1 // indirect
)

go 1.19
Loading