Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 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
1 change: 1 addition & 0 deletions .changes/v1.0.0/27-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add GitHub Action to detect replaced go-vcloud-director SDK in `go.mod` in PRs [GH-27]
20 changes: 20 additions & 0 deletions .github/workflows/check-mod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: check-mod
on:
pull_request

jobs:
build:
if: github.event.pull_request.mergeable_state == 'CLEAN'
name: Check
runs-on: ubuntu-latest

steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: No replaced Go module
run: |
set +e
grep 'replace github.com/vmware/go-vcloud-director' go.mod
if [ "$?" -eq 0 ]; then echo "ERROR: Found a replaced go.mod. Remove the replacement before merging"; exit 1; else exit 0; fi
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.35.0
github.com/vmware/go-vcloud-director/v3 v3.0.0-alpha.24
github.com/vmware/go-vcloud-director/v3 v3.0.0-alpha.25
)

require (
Expand Down Expand Up @@ -66,5 +66,3 @@ require (
google.golang.org/protobuf v1.35.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/vmware/go-vcloud-director/v3 => github.com/adambarreiro/go-vcloud-director/v3 v3.0.0-20250130150058-c5c28c2bb173
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/adambarreiro/go-vcloud-director/v3 v3.0.0-20250130150058-c5c28c2bb173 h1:WwtoMKQfBr9L1ezqTgRVA/ZutaFDZBFsi3HoC8wY8Do=
github.com/adambarreiro/go-vcloud-director/v3 v3.0.0-20250130150058-c5c28c2bb173/go.mod h1:68KHsVns52dsq/w5JQYzauaU/+NAi1FmCxhBrFc/VoQ=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec=
Expand Down Expand Up @@ -151,6 +149,8 @@ github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IU
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/vmware/go-vcloud-director/v3 v3.0.0-alpha.25 h1:THyQ5FnlrZxV9GeCfmQytvdnE9rdfsPf8hT+LmfNsCY=
github.com/vmware/go-vcloud-director/v3 v3.0.0-alpha.25/go.mod h1:68KHsVns52dsq/w5JQYzauaU/+NAi1FmCxhBrFc/VoQ=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
Expand Down
6 changes: 6 additions & 0 deletions vcfa/datasource_not_found_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ func addMandatoryParams(dataSourceName string, mandatoryFields []string, t *test
templateFields = templateFields + `edge_cluster_id = "urn:vcloud:edgeCluster:12345678-1234-1234-1234-123456789012"` + "\n"
case "content_library_id":
templateFields = templateFields + `content_library_id = "urn:vcloud:contentLibrary:12345678-1234-1234-1234-123456789012"` + "\n"
case "alias": // vcfa_certificate
templateFields = templateFields + `alias = "non-existent-certificate"` + "\n"
case "username": // vcfa_org_local_user
templateFields = templateFields + `username = "non-existent-local-user"` + "\n"
case "org_regional_networking_id":
templateFields = templateFields + `org_regional_networking_id = "urn:vcloud:regionalNetworkingSetting:12345678-1234-1234-1234-123456789012"` + "\n"
}
}

Expand Down