diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 5e306e965..98ee32545 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -44,6 +44,12 @@ jobs: terraform_wrapper: false - name: Build go test run: make test + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} - name: Run integration tests run: make test-integration env: diff --git a/.github/workflows/nets_integ_tests.yml b/.github/workflows/nets_integ_tests.yml index 1f62a1481..9fd2f1684 100644 --- a/.github/workflows/nets_integ_tests.yml +++ b/.github/workflows/nets_integ_tests.yml @@ -44,6 +44,12 @@ jobs: terraform_wrapper: false - name: Build go test run: make test + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} - name: Run nets integration tests run: make test-integration env: diff --git a/.github/workflows/nets_testacc.yml b/.github/workflows/nets_testacc.yml index b9b237252..c1131e8a7 100644 --- a/.github/workflows/nets_testacc.yml +++ b/.github/workflows/nets_testacc.yml @@ -31,6 +31,12 @@ jobs: go-version: 'stable' - name: Build go test run: make test + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} - name: Run nets acceptances tests run: make test-net env: diff --git a/.github/workflows/others_testacc.yml b/.github/workflows/others_testacc.yml index e6d591742..c386ef20b 100644 --- a/.github/workflows/others_testacc.yml +++ b/.github/workflows/others_testacc.yml @@ -36,6 +36,12 @@ jobs: go-version: 'stable' - name: Build go test run: make test + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} - name: Run others acceptances tests run: make test-others env: @@ -44,3 +50,4 @@ jobs: OUTSCALE_REGION: ${{ secrets.OSC_REGION }} OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} + CA_PATH: ${{ secrets.CA_PATH }} diff --git a/.github/workflows/vms_testacc.yml b/.github/workflows/vms_testacc.yml index f09713344..43594fe8c 100644 --- a/.github/workflows/vms_testacc.yml +++ b/.github/workflows/vms_testacc.yml @@ -31,6 +31,12 @@ jobs: go-version: 'stable' - name: Build go test run: make test + env: + OUTSCALE_ACCESSKEYID: ${{ secrets.OSC_ACCESS_KEY }} + OUTSCALE_SECRETKEYID: ${{ secrets.OSC_SECRET_KEY }} + OUTSCALE_REGION: ${{ secrets.OSC_REGION }} + OUTSCALE_ACCOUNT: ${{ secrets.OSC_ACCOUNT_ID }} + OUTSCALE_IMAGEID: ${{ secrets.OUTSCALE_IMAGEID }} - name: Run vms acceptances tests run: make test-vm env: diff --git a/go.mod b/go.mod index 7b99e6d31..d416c37c8 100644 --- a/go.mod +++ b/go.mod @@ -3,99 +3,67 @@ module github.com/terraform-providers/terraform-provider-outscale go 1.19 require ( - github.com/aws/aws-sdk-go v1.45.25 + github.com/aws/aws-sdk-go v1.49.3 github.com/davecgh/go-spew v1.1.1 github.com/go-test/deep v1.0.6 - github.com/hashicorp/errwrap v1.0.0 - github.com/hashicorp/terraform v0.14.0 - github.com/hashicorp/terraform-plugin-sdk v1.17.2 + github.com/hashicorp/errwrap v1.1.0 + github.com/hashicorp/terraform-plugin-framework v1.4.2 + github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 + github.com/hashicorp/terraform-plugin-go v0.19.0 + github.com/hashicorp/terraform-plugin-mux v0.12.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/nav-inc/datetime v0.1.3 - github.com/openlyinc/pointy v1.1.2 + github.com/openlyinc/pointy v1.2.0 github.com/outscale/osc-sdk-go/v2 v2.18.2 - github.com/spf13/cast v1.3.1 + github.com/spf13/cast v1.6.0 ) require ( - cloud.google.com/go v0.110.8 // indirect - cloud.google.com/go/compute v1.23.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect - cloud.google.com/go/storage v1.33.0 // 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-radix v1.0.0 // indirect - github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect - github.com/bgentry/speakeasy v0.1.0 // indirect - github.com/fatih/color v1.7.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect + github.com/agext/levenshtein v1.2.3 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/cloudflare/circl v1.3.3 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect 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.3 // indirect - github.com/hashicorp/go-hclog v0.9.2 // indirect - github.com/hashicorp/go-multierror v1.0.0 // indirect - github.com/hashicorp/go-plugin v1.3.0 // indirect - github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-uuid v1.0.1 // indirect + github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-plugin v1.5.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect - github.com/hashicorp/hcl/v2 v2.8.2 // indirect + github.com/hashicorp/hc-install v0.6.0 // indirect + github.com/hashicorp/hcl/v2 v2.18.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 // indirect - github.com/hashicorp/terraform-exec v0.13.3 // indirect - github.com/hashicorp/terraform-json v0.10.0 // indirect - github.com/hashicorp/terraform-plugin-test/v2 v2.2.1 // indirect - github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect - github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect - github.com/huandu/xstrings v1.3.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/hashicorp/terraform-exec v0.19.0 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/klauspost/compress v1.17.1 // indirect - github.com/mattn/go-colorable v0.1.1 // indirect - github.com/mattn/go-isatty v0.0.5 // 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 - github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.1.2 // indirect - github.com/mitchellh/reflectwalk v1.0.1 // indirect - github.com/oklog/run v1.0.0 // indirect - github.com/posener/complete v1.2.1 // indirect - github.com/spf13/afero v1.2.2 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - 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.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.6.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.147.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/zclconf/go-cty v1.14.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf // indirect + google.golang.org/grpc v1.57.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 1fb26fedd..92410d30b 100644 --- a/go.sum +++ b/go.sum @@ -1,1403 +1,248 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.33.0 h1:PVrDOkIC8qQVa1P3SXGpQvfuJhN2LHOoyZvWs8D2X5M= -cloud.google.com/go/storage v1.33.0/go.mod h1:Hhh/dogNRGca7IWv1RC2YqEn0c0G77ctA/OxflYkiD8= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.3/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.0/go.mod h1:JljT387FplPzBA31vUcvsetLKF3pec5bdAxjVU4kI2s= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.0/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= -github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= -github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= -github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= -github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -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/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= -github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw= -github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= -github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= -github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= +github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13/go.mod h1:7kfpUbyCdGJ9fDRCp3fopPQi5+cKNHgTE4ZuNrO71Cw= -github.com/apparentlymart/go-versions v1.0.1/go.mod h1:YF5j7IQtrOAOnsGkniupEA5bfCjzd7i14yu0shZavyM= -github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/aws/aws-sdk-go v1.44.103/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.45.23 h1:0xRQw5fsFMpisaliDZ8iUZtw9w+3YjY9/UwUGRbB/i4= -github.com/aws/aws-sdk-go v1.45.23/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= -github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/aws/aws-sdk-go v1.49.3 h1:+UGwhC3kChk0pRCxSsbaQSNIc8MfFURQL44Ig6RRR3I= +github.com/aws/aws-sdk-go v1.49.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= -github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.1.0 h1:4pl5BV4o7ZG/lterP4S6WzJ6xr49Ba5ET9ygheTYahk= -github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= -github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= +github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8= github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= -github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/gophercloud/gophercloud v0.6.1-0.20191122030953-d8ac278c1c9d/go.mod h1:ozGNgr9KYOVATV5jsgHl/ceCDXGuguqOZAzoQ/2vcNM= -github.com/gophercloud/gophercloud v0.10.1-0.20200424014253-c3bfe50899e5/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/utils v0.0.0-20200423144003-7c72efc7435d/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/aws-sdk-go-base v0.6.0/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY= -github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.5.1/go.mod h1:a7z7NPPfNQpJWcn4rSWFtdrSldqLdLPEF3d8nFMsSLM= -github.com/hashicorp/go-getter v1.5.3 h1:NF5+zOlQegim+w/EUhSLh6QhXHmZMEeHLQzllkQ3ROU= -github.com/hashicorp/go-getter v1.5.3/go.mod h1:BrrV/1clo8cCYu6mxvboYg+KutTiFnXjMEgDD8+i7ZI= -github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= -github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa/go.mod h1:6ij3Z20p+OhOkCSrA0gImAWoHYQRGbnlcuk6XYTiaRw= -github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.3.0 h1:4d/wJojzvHV1I4i/rrjVaeuyxWrLzDE1mDCyDy8fXS8= -github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= -github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= -github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= -github.com/hashicorp/go-slug v0.4.1/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8= -github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-tfe v0.8.1/go.mod h1:XAV72S4O1iP8BDaqiaPLmL2B4EE6almocnOn8E8stHc= +github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= +github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= -github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws= -github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= -github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= -github.com/hashicorp/hcl/v2 v2.7.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= -github.com/hashicorp/hcl/v2 v2.8.2 h1:wmFle3D1vu0okesm8BTLVDyJ6/OL9DCLUwn0b2OptiY= -github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= +github.com/hashicorp/hc-install v0.6.0 h1:fDHnU7JNFNSQebVKYhHZ0va1bC6SrPQ8fpebsvNr2w4= +github.com/hashicorp/hc-install v0.6.0/go.mod h1:10I912u3nntx9Umo1VAeYPUUuehk0aRQJYpMwbX5wQA= +github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= +github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= -github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.14.0 h1:s0OivKdekGqireI8vzOXkXUHb0QxNfG8rnGuPS+cQMU= -github.com/hashicorp/terraform v0.14.0/go.mod h1:K/qLM9bt3zVQPWrOn7IWiHbmNms5bn2O4UWycd2kMjk= -github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7 h1:Pc5TCv9mbxFN6UVX0LH6CpQrdTM5YjbVI2w15237Pjk= -github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= -github.com/hashicorp/terraform-exec v0.13.3 h1:R6L2mNpDGSEqtLrSONN8Xth0xYwNrnEVzDz6LF/oJPk= -github.com/hashicorp/terraform-exec v0.13.3/go.mod h1:SSg6lbUsVB3DmFyCPjBPklqf6EYGX0TlQ6QTxOlikDU= -github.com/hashicorp/terraform-json v0.10.0 h1:9syPD/Y5t+3uFjG8AiWVPu1bklJD8QB8iTCaJASc8oQ= -github.com/hashicorp/terraform-json v0.10.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE= -github.com/hashicorp/terraform-plugin-sdk v1.17.2 h1:V7DUR3yBWFrVB9z3ddpY7kiYVSsq4NYR67NiTs93NQo= -github.com/hashicorp/terraform-plugin-sdk v1.17.2/go.mod h1:wkvldbraEMkz23NxkkAsFS88A1R9eUiooiaUZyS6TLw= -github.com/hashicorp/terraform-plugin-test/v2 v2.2.1 h1:d3Rzmi5bnRzcAZon91FY4TDCMUYdU8c5vpPpf2Tz+c8= -github.com/hashicorp/terraform-plugin-test/v2 v2.2.1/go.mod h1:eZ9JL3O69Cb71Skn6OhHyj17sLmHRb+H6VrDcJjKrYU= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM= +github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg= +github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-framework v1.4.2 h1:P7a7VP1GZbjc4rv921Xy5OckzhoiO3ig6SGxwelD2sI= +github.com/hashicorp/terraform-plugin-framework v1.4.2/go.mod h1:GWl3InPFZi2wVQmdVnINPKys09s9mLmTZr95/ngLnbY= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= +github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= +github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-mux v0.12.0 h1:TJlmeslQ11WlQtIFAfth0vXx+gSNgvMEng2Rn9z3WZY= +github.com/hashicorp/terraform-plugin-mux v0.12.0/go.mod h1:8MR0AgmV+Q03DIjyrAKxXyYlq2EUnYBQP8gxAAA0zeM= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 h1:wcOKYwPI9IorAJEBLzgclh3xVolO7ZorYd6U1vnok14= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0/go.mod h1:qH/34G25Ugdj5FcM95cSoXzUgIbgfhVLXCcEcYaMwq8= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= -github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= -github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/likexian/gokit v0.0.0-20190309162924-0a377eecf7aa/go.mod h1:QdfYv6y6qPA9pbBA2qXtoT8BMKha6UyNbxWGWl/9Jfk= -github.com/likexian/gokit v0.0.0-20190418170008-ace88ad0983b/go.mod h1:KKqSnk/VVSW8kEyO2vVCXoanzEutKdlBAPohmGXkxCk= -github.com/likexian/gokit v0.0.0-20190501133040-e77ea8b19cdc/go.mod h1:3kvONayqCaj+UgrRZGpgfXzHdMYCAO0KAt4/8n0L57Y= -github.com/likexian/gokit v0.20.15/go.mod h1:kn+nTv3tqh6yhor9BC4Lfiu58SmH8NmQ2PmEl+uM6nU= -github.com/likexian/simplejson-go v0.0.0-20190409170913-40473a74d76d/go.mod h1:Typ1BfnATYtZ/+/shXfFYLrovhFyuKvzwrdOnIDHlmg= -github.com/likexian/simplejson-go v0.0.0-20190419151922-c1f9f0b4f084/go.mod h1:U4O1vIJvIKwbMZKUJ62lppfdvkCdVd2nfMimHK81eec= -github.com/likexian/simplejson-go v0.0.0-20190502021454-d8787b4bfa0b/go.mod h1:3BWwtmKP9cXWwYCr5bkoVDEfLywacOv0s06OBEDpyt8= -github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54tfGmO3NKssKveTEFFzH8C/akrSOy/iW9qEAUDV84= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= -github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= -github.com/masterzen/winrm v0.0.0-20200615185753-c42b5136ff88/go.mod h1:a2HXwefeat3evJHxFXSayvRHpYEPJYtErl4uIzfaUqY= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= -github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.4 h1:ZU1VNC02qyufSZsjjs7+khruk2fKvbQ3TwRV/IBCeFA= -github.com/mitchellh/go-testing-interface v1.0.4/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/panicwrap v1.0.0/go.mod h1:pKvZHwWrZowLUzftuFq7coarnxbBXU4aQh3N0BJOeeA= -github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/nav-inc/datetime v0.1.3 h1:PaybPUsScX+Cd3TEa1tYpfwU61deCEhMTlCO2hONm1c= github.com/nav-inc/datetime v0.1.3/go.mod h1:gKGf5G+cW7qkTo5TC/sieNyz6lYdrA9cf1PNV+pXIOE= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY= -github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/openlyinc/pointy v1.2.0 h1:vbb/WoPbshyTH8j3/XYu3enlZfv+NHxAD15qTm1zbk0= +github.com/openlyinc/pointy v1.2.0/go.mod h1:JodZOTJoBNaAQHeU0F/SwA4PL0lg4pKF7fYFpX291P0= github.com/outscale/osc-sdk-go/v2 v2.18.2 h1:tnv6f57L0lg1czaujHTP+veZesJHICk5DbyRfgYpe5Q= github.com/outscale/osc-sdk-go/v2 v2.18.2/go.mod h1:kzhtUErCzKYl87bZ+kDMphDafmnwbsyFJY9iHF7NgNE= -github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI= -github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= -github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= -github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tombuildsstuff/giovanni v0.12.0/go.mod h1:qJ5dpiYWkRsuOSXO8wHbee7+wElkLNfWVolcf59N84E= -github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= +github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +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/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.7.0/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= -github.com/zclconf/go-cty v1.8.2 h1:u+xZfBKgpycDnTNjPhGiTEYZS5qS/Sb5MqSfm7vzcjg= -github.com/zclconf/go-cty v1.8.2/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -github.com/zclconf/go-cty-yaml v1.0.2 h1:dNyg4QLTrv2IfJpm7Wtxi55ed5gLGOlPrZ6kMd51hY0= -github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= +github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201028111035-eafbe7b904eb/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.34.0 h1:k40adF3uR+6x/+hO5Dh4ZFUqFp67vxvbpafFiJxl10A= -google.golang.org/api v0.34.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= -google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d h1:92D1fum1bJLKSdr11OJ+54YeCMCGYIygTA7R/YZxH5M= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8= -google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf h1:guOdSPaeFgN+jEJwTo1dQ71hdBm+yKSCCKuTRkJzcVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= -k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= -k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= -k8s.io/client-go v10.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/utils v0.0.0-20200411171748-3d5a2fe318e4/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/main.go b/main.go index 99563f883..a23ee1af4 100644 --- a/main.go +++ b/main.go @@ -1,12 +1,59 @@ package main import ( - "github.com/hashicorp/terraform-plugin-sdk/plugin" + "context" + "flag" + "log" + + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" "github.com/terraform-providers/terraform-provider-outscale/outscale" + vers "github.com/terraform-providers/terraform-provider-outscale/version" +) + +var ( + version string = vers.GetVersion() ) func main() { - plugin.Serve(&plugin.ServeOpts{ - ProviderFunc: outscale.Provider, - }) + + var debug bool + + flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve") + flag.Parse() + + providers := []func() tfprotov5.ProviderServer{ + providerserver.NewProtocol5(outscale.New(version)), // Example terraform-plugin-framework provider + outscale.Provider().GRPCProvider, // Example terraform-plugin-sdk provider + } + + //using muxer + muxServer, err := tf5muxserver.NewMuxServer(context.Background(), providers...) + + if err != nil { + log.Fatal(err) + } + + var serveOpts []tf5server.ServeOpt + + if debug { + serveOpts = append(serveOpts, tf5server.WithManagedDebug()) + } + + err = tf5server.Serve( + "registry.terraform.io/providers/outscale/outscale/", + muxServer.ProviderServer, + serveOpts..., + ) + + if err != nil { + log.Fatal(err) + } } + +// plugin.Serve(&plugin.ServeOpts{ +// ProviderFunc: outscale.Provider, +// }) +//} diff --git a/outscale/config.go b/outscale/config.go index cee11c3d8..78c229019 100644 --- a/outscale/config.go +++ b/outscale/config.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - "github.com/hashicorp/terraform-plugin-sdk/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/version" ) @@ -65,6 +65,5 @@ func (c *Config) Client() (*OutscaleClient, error) { client := &OutscaleClient{ OSCAPI: oscClient, } - return client, nil } diff --git a/outscale/data_source_outscale_access_key.go b/outscale/data_source_outscale_access_key.go index 12ec55f53..78a5066f4 100644 --- a/outscale/data_source_outscale_access_key.go +++ b/outscale/data_source_outscale_access_key.go @@ -7,11 +7,11 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func dataSourceOutscaleAccessKey() *schema.Resource { diff --git a/outscale/data_source_outscale_access_key_test.go b/outscale/data_source_outscale_access_key_test.go index 93537cb5a..600447afa 100644 --- a/outscale/data_source_outscale_access_key_test.go +++ b/outscale/data_source_outscale_access_key_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DatasourceAccessKey_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_access_keys.go b/outscale/data_source_outscale_access_keys.go index 6bf443c50..c94c324a8 100644 --- a/outscale/data_source_outscale_access_keys.go +++ b/outscale/data_source_outscale_access_keys.go @@ -6,11 +6,11 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func dataSourceOutscaleAccessKeys() *schema.Resource { diff --git a/outscale/data_source_outscale_access_keys_test.go b/outscale/data_source_outscale_access_keys_test.go index c4a702cee..2f37fa72d 100644 --- a/outscale/data_source_outscale_access_keys_test.go +++ b/outscale/data_source_outscale_access_keys_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceAccessKeys_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_account.go b/outscale/data_source_outscale_account.go index a55ac81c9..2083d0043 100644 --- a/outscale/data_source_outscale_account.go +++ b/outscale/data_source_outscale_account.go @@ -7,8 +7,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_account_test.go b/outscale/data_source_outscale_account_test.go index 73012b166..618eeb38d 100644 --- a/outscale/data_source_outscale_account_test.go +++ b/outscale/data_source_outscale_account_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceAccount_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_accounts.go b/outscale/data_source_outscale_accounts.go index c0dd4d607..12be14402 100644 --- a/outscale/data_source_outscale_accounts.go +++ b/outscale/data_source_outscale_accounts.go @@ -7,8 +7,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_accounts_test.go b/outscale/data_source_outscale_accounts_test.go index feb3f973d..abd1faa03 100644 --- a/outscale/data_source_outscale_accounts_test.go +++ b/outscale/data_source_outscale_accounts_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceAccounts_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_api_access_policy.go b/outscale/data_source_outscale_api_access_policy.go index 0e7fbc7f5..e5682f303 100644 --- a/outscale/data_source_outscale_api_access_policy.go +++ b/outscale/data_source_outscale_api_access_policy.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_api_access_policy_test.go b/outscale/data_source_outscale_api_access_policy_test.go index 226d76e52..2df13984d 100644 --- a/outscale/data_source_outscale_api_access_policy_test.go +++ b/outscale/data_source_outscale_api_access_policy_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccDataSourceOutscaleOAPIApiAccessPolicy_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_api_access_rule.go b/outscale/data_source_outscale_api_access_rule.go index e49609863..64a96bd2a 100644 --- a/outscale/data_source_outscale_api_access_rule.go +++ b/outscale/data_source_outscale_api_access_rule.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_api_access_rule_test.go b/outscale/data_source_outscale_api_access_rule_test.go index 936b318fc..51b68e549 100644 --- a/outscale/data_source_outscale_api_access_rule_test.go +++ b/outscale/data_source_outscale_api_access_rule_test.go @@ -3,19 +3,20 @@ package outscale import ( "context" "fmt" + "os" "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccOthers_DataOutscaleOAPIApiAccessRule_basic(t *testing.T) { t.Parallel() resourceName := "outscale_api_access_rule.rule_data" + ca_path := os.Getenv("CA_PATH") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,7 +24,7 @@ func TestAccOthers_DataOutscaleOAPIApiAccessRule_basic(t *testing.T) { CheckDestroy: testAccDataCheckOutscaleApiAccessRuleDestroy, Steps: []resource.TestStep{ { - Config: testAccDataOutscaleOAPIApiAccessRuleConfig(), + Config: testAccDataOutscaleOAPIApiAccessRuleConfig(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleApiAccessRuleExists(resourceName), ), @@ -70,10 +71,10 @@ func testAccDataCheckOutscaleApiAccessRuleDestroy(s *terraform.State) error { return nil } -func testAccDataOutscaleOAPIApiAccessRuleConfig() string { +func testAccDataOutscaleOAPIApiAccessRuleConfig(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_rule" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%q) description = "Ca data test create" } @@ -98,6 +99,5 @@ data "outscale_api_access_rule" "api_access_rule" { name = "descriptions" values = ["test api access rule"] } -} - `) +}`, path) } diff --git a/outscale/data_source_outscale_api_access_rules.go b/outscale/data_source_outscale_api_access_rules.go index 315803fd3..eb9f3a020 100644 --- a/outscale/data_source_outscale_api_access_rules.go +++ b/outscale/data_source_outscale_api_access_rules.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_api_access_rules_test.go b/outscale/data_source_outscale_api_access_rules_test.go index 242cf753f..1c0ea5b63 100644 --- a/outscale/data_source_outscale_api_access_rules_test.go +++ b/outscale/data_source_outscale_api_access_rules_test.go @@ -6,11 +6,10 @@ import ( "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccDataOutscaleOAPIApiAccessRules_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_ca.go b/outscale/data_source_outscale_ca.go index 8ae3f8da1..204db2d38 100644 --- a/outscale/data_source_outscale_ca.go +++ b/outscale/data_source_outscale_ca.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_ca_test.go b/outscale/data_source_outscale_ca_test.go index 658cfe6f8..4e59813a4 100644 --- a/outscale/data_source_outscale_ca_test.go +++ b/outscale/data_source_outscale_ca_test.go @@ -3,17 +3,19 @@ package outscale import ( "context" "fmt" + "os" "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) func TestAccOthers_DataOutscaleCa_basic(t *testing.T) { resourceName := "outscale_ca.ca_test" + ca_path := os.Getenv("CA_PATH") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,7 +23,7 @@ func TestAccOthers_DataOutscaleCa_basic(t *testing.T) { CheckDestroy: testAccDataCheckOutscaleCaDestroy, Steps: []resource.TestStep{ { - Config: testAccDataOutscaleOAPICaConfig(), + Config: testAccDataOutscaleOAPICaConfig(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleCaExists(resourceName), ), @@ -70,10 +72,10 @@ func testAccDataCheckOutscaleCaDestroy(s *terraform.State) error { return nil } -func testAccDataOutscaleOAPICaConfig() string { +func testAccDataOutscaleOAPICaConfig(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_test" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%q) description = "Ca testacc create" } @@ -82,6 +84,5 @@ data "outscale_ca" "ca_data" { name = "ca_ids" values = [outscale_ca.ca_test.id] } -} -`) +}`, path) } diff --git a/outscale/data_source_outscale_cas.go b/outscale/data_source_outscale_cas.go index 405cb13aa..f26599a69 100644 --- a/outscale/data_source_outscale_cas.go +++ b/outscale/data_source_outscale_cas.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_cas_test.go b/outscale/data_source_outscale_cas_test.go index b0f41f084..ace8b0495 100644 --- a/outscale/data_source_outscale_cas_test.go +++ b/outscale/data_source_outscale_cas_test.go @@ -3,17 +3,19 @@ package outscale import ( "context" "fmt" + "os" "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) func TestAccOthers_DataOutscaleCas_basic(t *testing.T) { resName := "outscale_ca.ca_test" + ca_path := os.Getenv("CA_PATH") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -21,7 +23,7 @@ func TestAccOthers_DataOutscaleCas_basic(t *testing.T) { CheckDestroy: testAccDataCheckOutscaleCasDestroy, Steps: []resource.TestStep{ { - Config: testAccDataOutscaleOAPICasConfig(), + Config: testAccDataOutscaleOAPICasConfig(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleCaExists(resName), ), @@ -70,15 +72,15 @@ func testAccDataCheckOutscaleCasDestroy(s *terraform.State) error { return nil } -func testAccDataOutscaleOAPICasConfig() string { +func testAccDataOutscaleOAPICasConfig(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_test" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%[1]q) description = "Ca testacc create" } resource "outscale_ca" "ca_test2" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%[1]q) description = "Ca testacc create2" } @@ -91,6 +93,5 @@ data "outscale_cas" "cas_data" { name = "description" values = ["Ca testacc create2"] } -} -`) +}`, path) } diff --git a/outscale/data_source_outscale_client_gateway.go b/outscale/data_source_outscale_client_gateway.go index 11be0d1fe..447fa587f 100644 --- a/outscale/data_source_outscale_client_gateway.go +++ b/outscale/data_source_outscale_client_gateway.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_client_gateway_test.go b/outscale/data_source_outscale_client_gateway_test.go index a27a1c913..625b86595 100644 --- a/outscale/data_source_outscale_client_gateway_test.go +++ b/outscale/data_source_outscale_client_gateway_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_client_gateways.go b/outscale/data_source_outscale_client_gateways.go index c0899986e..8931956db 100644 --- a/outscale/data_source_outscale_client_gateways.go +++ b/outscale/data_source_outscale_client_gateways.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleClientGateways() *schema.Resource { diff --git a/outscale/data_source_outscale_client_gateways_test.go b/outscale/data_source_outscale_client_gateways_test.go index dd8c6767c..db091b26a 100644 --- a/outscale/data_source_outscale_client_gateways_test.go +++ b/outscale/data_source_outscale_client_gateways_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_ClientGatewaysDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_dhcp_option.go b/outscale/data_source_outscale_dhcp_option.go index 78c167a1a..242f8dfeb 100644 --- a/outscale/data_source_outscale_dhcp_option.go +++ b/outscale/data_source_outscale_dhcp_option.go @@ -6,11 +6,10 @@ import ( "log" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_dhcp_option_test.go b/outscale/data_source_outscale_dhcp_option_test.go index afbe10093..2f271e11d 100644 --- a/outscale/data_source_outscale_dhcp_option_test.go +++ b/outscale/data_source_outscale_dhcp_option_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DHCPOption_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_dhcp_options.go b/outscale/data_source_outscale_dhcp_options.go index 72292a8fb..bf6805fab 100644 --- a/outscale/data_source_outscale_dhcp_options.go +++ b/outscale/data_source_outscale_dhcp_options.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleDHCPOptions() *schema.Resource { diff --git a/outscale/data_source_outscale_dhcp_options_test.go b/outscale/data_source_outscale_dhcp_options_test.go index 2e64abd4c..c702f41ff 100644 --- a/outscale/data_source_outscale_dhcp_options_test.go +++ b/outscale/data_source_outscale_dhcp_options_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DHCPOptionsDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_flexible_gpu.go b/outscale/data_source_outscale_flexible_gpu.go index 165d2f3ad..70892b46f 100644 --- a/outscale/data_source_outscale_flexible_gpu.go +++ b/outscale/data_source_outscale_flexible_gpu.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_flexible_gpu_catalog.go b/outscale/data_source_outscale_flexible_gpu_catalog.go index ef6361089..d1692ccc7 100644 --- a/outscale/data_source_outscale_flexible_gpu_catalog.go +++ b/outscale/data_source_outscale_flexible_gpu_catalog.go @@ -5,10 +5,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIFlexibleGpuCatalog() *schema.Resource { diff --git a/outscale/data_source_outscale_flexible_gpu_catalog_test.go b/outscale/data_source_outscale_flexible_gpu_catalog_test.go index 4faabcea3..a6940e901 100644 --- a/outscale/data_source_outscale_flexible_gpu_catalog_test.go +++ b/outscale/data_source_outscale_flexible_gpu_catalog_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceFlexibleGpuCatalog_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_flexible_gpu_test.go b/outscale/data_source_outscale_flexible_gpu_test.go index 5a1d781bb..7be0ecdb5 100644 --- a/outscale/data_source_outscale_flexible_gpu_test.go +++ b/outscale/data_source_outscale_flexible_gpu_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_flexible_gpus.go b/outscale/data_source_outscale_flexible_gpus.go index b19e22058..fd183c948 100644 --- a/outscale/data_source_outscale_flexible_gpus.go +++ b/outscale/data_source_outscale_flexible_gpus.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIFlexibleGpus() *schema.Resource { diff --git a/outscale/data_source_outscale_flexible_gpus_test.go b/outscale/data_source_outscale_flexible_gpus_test.go index 6ca38ae18..9f135e834 100644 --- a/outscale/data_source_outscale_flexible_gpus_test.go +++ b/outscale/data_source_outscale_flexible_gpus_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_image.go b/outscale/data_source_outscale_image.go index a035b7f74..20d3c70b5 100644 --- a/outscale/data_source_outscale_image.go +++ b/outscale/data_source_outscale_image.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIImage() *schema.Resource { diff --git a/outscale/data_source_outscale_image_export_task.go b/outscale/data_source_outscale_image_export_task.go index a7ba40ac9..717405b27 100644 --- a/outscale/data_source_outscale_image_export_task.go +++ b/outscale/data_source_outscale_image_export_task.go @@ -8,10 +8,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIImageExportTask() *schema.Resource { diff --git a/outscale/data_source_outscale_image_export_task_test.go b/outscale/data_source_outscale_image_export_task_test.go index 68d46f354..3475cf5e7 100644 --- a/outscale/data_source_outscale_image_export_task_test.go +++ b/outscale/data_source_outscale_image_export_task_test.go @@ -5,11 +5,11 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVM_withImageExportTaskDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_image_export_tasks.go b/outscale/data_source_outscale_image_export_tasks.go index f97c13836..9f0ba2de2 100644 --- a/outscale/data_source_outscale_image_export_tasks.go +++ b/outscale/data_source_outscale_image_export_tasks.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIImageExportTasks() *schema.Resource { diff --git a/outscale/data_source_outscale_image_export_tasks_test.go b/outscale/data_source_outscale_image_export_tasks_test.go index b594eeb33..06a5ee6f8 100644 --- a/outscale/data_source_outscale_image_export_tasks_test.go +++ b/outscale/data_source_outscale_image_export_tasks_test.go @@ -5,10 +5,10 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVM_withImageExportTasksDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_image_test.go b/outscale/data_source_outscale_image_test.go index 66915851c..68f1c447a 100644 --- a/outscale/data_source_outscale_image_test.go +++ b/outscale/data_source_outscale_image_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_images.go b/outscale/data_source_outscale_images.go index 895311f84..f2afc57ab 100644 --- a/outscale/data_source_outscale_images.go +++ b/outscale/data_source_outscale_images.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_images_test.go b/outscale/data_source_outscale_images_test.go index ebcd9580c..45d4ffe81 100644 --- a/outscale/data_source_outscale_images_test.go +++ b/outscale/data_source_outscale_images_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_internet_service.go b/outscale/data_source_outscale_internet_service.go index 0da67cbc7..8c5f0e64a 100644 --- a/outscale/data_source_outscale_internet_service.go +++ b/outscale/data_source_outscale_internet_service.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOAPIInternetService() *schema.Resource { diff --git a/outscale/data_source_outscale_internet_service_test.go b/outscale/data_source_outscale_internet_service_test.go index 478080916..6df55ee70 100644 --- a/outscale/data_source_outscale_internet_service_test.go +++ b/outscale/data_source_outscale_internet_service_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_InternetServiceDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_internet_services.go b/outscale/data_source_outscale_internet_services.go index d50b3e692..e5de60f6d 100644 --- a/outscale/data_source_outscale_internet_services.go +++ b/outscale/data_source_outscale_internet_services.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOAPIInternetServices() *schema.Resource { diff --git a/outscale/data_source_outscale_internet_services_test.go b/outscale/data_source_outscale_internet_services_test.go index 1a554f02f..7a267aa02 100644 --- a/outscale/data_source_outscale_internet_services_test.go +++ b/outscale/data_source_outscale_internet_services_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_InternetServicesDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_keypair.go b/outscale/data_source_outscale_keypair.go index 33e1d1e48..0cd0d5ff4 100644 --- a/outscale/data_source_outscale_keypair.go +++ b/outscale/data_source_outscale_keypair.go @@ -8,10 +8,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOApiKeyPairRead(d *schema.ResourceData, meta interface{}) error { diff --git a/outscale/data_source_outscale_keypair_test.go b/outscale/data_source_outscale_keypair_test.go index db2c10ff0..a0edaf4f0 100644 --- a/outscale/data_source_outscale_keypair_test.go +++ b/outscale/data_source_outscale_keypair_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_keypairs.go b/outscale/data_source_outscale_keypairs.go index 5130319ce..275d35aad 100644 --- a/outscale/data_source_outscale_keypairs.go +++ b/outscale/data_source_outscale_keypairs.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOAPiKeyPairsRead(d *schema.ResourceData, meta interface{}) error { diff --git a/outscale/data_source_outscale_keypairs_test.go b/outscale/data_source_outscale_keypairs_test.go index 5ff462e8c..5e25c16b4 100644 --- a/outscale/data_source_outscale_keypairs_test.go +++ b/outscale/data_source_outscale_keypairs_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_load_balancer.go b/outscale/data_source_outscale_load_balancer.go index 0f3ee1b9a..4fee3c09c 100644 --- a/outscale/data_source_outscale_load_balancer.go +++ b/outscale/data_source_outscale_load_balancer.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -51,7 +51,7 @@ func attrLBchema() map[string]*schema.Schema { Optional: true, }, "access_log": { - Type: schema.TypeMap, + Type: schema.TypeList, Optional: true, Computed: true, Elem: &schema.Resource{ @@ -76,29 +76,37 @@ func attrLBchema() map[string]*schema.Schema { }, }, "health_check": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "healthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "unhealthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, - "checked_vm": { + "path": { Type: schema.TypeString, Computed: true, }, "check_interval": { + Type: schema.TypeInt, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "protocol": { Type: schema.TypeString, Computed: true, }, "timeout": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, }, @@ -337,16 +345,16 @@ func dataSourceOutscaleOAPILoadBalancerRead(d *schema.ResourceData, meta interfa } else { d.Set("security_groups", make([]map[string]interface{}, 0)) } - ssg := make(map[string]string) + if lb.SourceSecurityGroup != nil { - ssg["security_group_account_id"] = *lb.SourceSecurityGroup.SecurityGroupAccountId - ssg["security_group_name"] = *lb.SourceSecurityGroup.SecurityGroupName + d.Set("source_security_group", flattenSource_sg(lb.SourceSecurityGroup)) + } else { + d.Set("source_security_group", make([]map[string]interface{}, 0)) } d.Set("public_ip", lb.PublicIp) d.Set("secured_cookies", lb.SecuredCookies) d.Set("net_id", lb.NetId) - d.Set("source_security_group", ssg) d.Set("subnets", utils.StringSlicePtrToInterfaceSlice(lb.Subnets)) d.SetId(*lb.LoadBalancerName) diff --git a/outscale/data_source_outscale_load_balancer_listener_rule.go b/outscale/data_source_outscale_load_balancer_listener_rule.go index 317c6de0a..72e79f2a8 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rule.go +++ b/outscale/data_source_outscale_load_balancer_listener_rule.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func attrLBListenerRule() map[string]*schema.Schema { diff --git a/outscale/data_source_outscale_load_balancer_listener_rules.go b/outscale/data_source_outscale_load_balancer_listener_rules.go index 8facece4f..d14ce14bd 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rules.go +++ b/outscale/data_source_outscale_load_balancer_listener_rules.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func attrLBListenerRules() map[string]*schema.Schema { diff --git a/outscale/data_source_outscale_load_balancer_tags.go b/outscale/data_source_outscale_load_balancer_tags.go index 39513bb3b..bdac20873 100644 --- a/outscale/data_source_outscale_load_balancer_tags.go +++ b/outscale/data_source_outscale_load_balancer_tags.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPILBUTags() *schema.Resource { diff --git a/outscale/data_source_outscale_load_balancer_tags_test.go b/outscale/data_source_outscale_load_balancer_tags_test.go index 7b44ef61a..9ce181a8b 100644 --- a/outscale/data_source_outscale_load_balancer_tags_test.go +++ b/outscale/data_source_outscale_load_balancer_tags_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -48,7 +48,7 @@ func testAccCheckODSutscaleOAPILBUDSTagsExists(n string) resource.TestCheckFunc func getTestAccDSODSutscaleOAPILBUDSTagsConfig(r string, zone string) string { return fmt.Sprintf(` - resource "outscale_load_balancer" "bar" { + resource "outscale_load_balancer" "barTags" { subregion_names = ["%sa"] load_balancer_name = "foobar-terraform-elb-%s" @@ -65,9 +65,8 @@ func getTestAccDSODSutscaleOAPILBUDSTagsConfig(r string, zone string) string { } } - data "outscale_load_balancer_tags" "testds" { - load_balancer_names = ["${outscale_load_balancer.bar.id}"] + load_balancer_names = [outscale_load_balancer.barTags.id] } `, zone, r) } diff --git a/outscale/data_source_outscale_load_balancer_test.go b/outscale/data_source_outscale_load_balancer_test.go index f9b9b4a44..2f7577d6c 100644 --- a/outscale/data_source_outscale_load_balancer_test.go +++ b/outscale/data_source_outscale_load_balancer_test.go @@ -7,7 +7,7 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_LBU_basic(t *testing.T) { @@ -32,11 +32,11 @@ func TestAccOthers_LBU_basic(t *testing.T) { { Config: testAccDSOutscaleOAPILBUConfig(zone, number), Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.bar", &conf), + testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.dataLb", &conf), resource.TestCheckResourceAttr( - "data.outscale_load_balancer.test", "subregion_names.#", "1"), + "data.outscale_load_balancer.dataTest", "subregion_names.#", "1"), resource.TestCheckResourceAttr( - "data.outscale_load_balancer.test", "subregion_names.0", zone), + "data.outscale_load_balancer.dataTest", "subregion_names.0", zone), )}, }, }) @@ -44,25 +44,25 @@ func TestAccOthers_LBU_basic(t *testing.T) { func testAccDSOutscaleOAPILBUConfig(zone string, number int) string { return fmt.Sprintf(` - resource "outscale_load_balancer" "bar" { + resource "outscale_load_balancer" "dataLb" { subregion_names = ["%s"] - load_balancer_name = "foobar-terraform-elb%d" + load_balancer_name = "data-terraform-elb-%v" listeners { backend_port = 8000 backend_protocol = "HTTP" - load_balancer_port = 80 + load_balancer_port = 80 load_balancer_protocol = "HTTP" } tags { - key = "name" + key = "name" value = "baz" } } - data "outscale_load_balancer" "test" { - load_balancer_name = outscale_load_balancer.bar.id + data "outscale_load_balancer" "dataTest" { + load_balancer_name = outscale_load_balancer.dataLb.id } `, zone, number) } diff --git a/outscale/data_source_outscale_load_balancer_vm_health.go b/outscale/data_source_outscale_load_balancer_vm_health.go index e471abe7c..591affde8 100644 --- a/outscale/data_source_outscale_load_balancer_vm_health.go +++ b/outscale/data_source_outscale_load_balancer_vm_health.go @@ -9,10 +9,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleLoadBalancerVmsHeals() *schema.Resource { diff --git a/outscale/data_source_outscale_load_balancer_vms.go b/outscale/data_source_outscale_load_balancer_vms.go index 333ce6b6e..647f340d3 100644 --- a/outscale/data_source_outscale_load_balancer_vms.go +++ b/outscale/data_source_outscale_load_balancer_vms.go @@ -1,7 +1,7 @@ package outscale import ( - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_load_balancers.go b/outscale/data_source_outscale_load_balancers.go index 898dfb588..5a5b34540 100644 --- a/outscale/data_source_outscale_load_balancers.go +++ b/outscale/data_source_outscale_load_balancers.go @@ -1,8 +1,8 @@ package outscale import ( - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -32,7 +32,7 @@ func attrLBSchema() map[string]*schema.Schema { Computed: true, }, "access_log": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -56,24 +56,24 @@ func attrLBSchema() map[string]*schema.Schema { }, }, "health_check": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "healthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "unhealthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, - "checked_vm": { + "path": { Type: schema.TypeString, Computed: true, }, "check_interval": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "port": { @@ -85,7 +85,7 @@ func attrLBSchema() map[string]*schema.Schema { Computed: true, }, "timeout": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, }, @@ -149,7 +149,7 @@ func attrLBSchema() map[string]*schema.Schema { Elem: &schema.Schema{Type: schema.TypeString}, }, "source_security_group": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -267,13 +267,14 @@ func dataSourceOutscaleOAPILoadBalancersRead(d *schema.ResourceData, meta interf l["load_balancer_type"] = v.LoadBalancerType l["security_groups"] = utils.StringSlicePtrToInterfaceSlice(v.SecurityGroups) - ssg := make(map[string]string) + ssg := make([]map[string]interface{}, 0) if v.SourceSecurityGroup != nil { - ssg["security_group_account_id"] = *v.SourceSecurityGroup.SecurityGroupAccountId - ssg["security_group_name"] = *v.SourceSecurityGroup.SecurityGroupName + l["source_security_group"] = flattenSource_sg(v.SourceSecurityGroup) + } else { + l["source_security_group"] = ssg + } - l["source_security_group"] = ssg l["subnet_id"] = utils.StringSlicePtrToInterfaceSlice(v.Subnets) l["public_ip"] = v.PublicIp l["secured_cookies"] = v.SecuredCookies diff --git a/outscale/data_source_outscale_load_balancers_test.go b/outscale/data_source_outscale_load_balancers_test.go index 5eea5fc5d..775d9ca57 100644 --- a/outscale/data_source_outscale_load_balancers_test.go +++ b/outscale/data_source_outscale_load_balancers_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -17,7 +17,7 @@ func TestAccOthers_LBUs_basic(t *testing.T) { PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "outscale_load_balancer.bar", + IDRefreshName: "outscale_load_balancer.bars", Providers: testAccProviders, CheckDestroy: testAccCheckOutscaleOAPILBUDestroy, Steps: []resource.TestStep{ @@ -32,7 +32,7 @@ func TestAccOthers_LBUs_basic(t *testing.T) { func testAccDSOutscaleOAPILBsUConfig(region string, numLbu int) string { return fmt.Sprintf(` - resource "outscale_load_balancer" "bar" { + resource "outscale_load_balancer" "bars" { subregion_names = ["%s"] load_balancer_name = "foobar-terraform-elb%d" @@ -52,7 +52,7 @@ func testAccDSOutscaleOAPILBsUConfig(region string, numLbu int) string { } data "outscale_load_balancers" "test" { - load_balancer_name = [outscale_load_balancer.bar.id] + load_balancer_name = [outscale_load_balancer.bars.id] } `, region, numLbu) } diff --git a/outscale/data_source_outscale_nat_service.go b/outscale/data_source_outscale_nat_service.go index 8a1031b52..27ee999d7 100644 --- a/outscale/data_source_outscale_nat_service.go +++ b/outscale/data_source_outscale_nat_service.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPINatService() *schema.Resource { diff --git a/outscale/data_source_outscale_nat_service_test.go b/outscale/data_source_outscale_nat_service_test.go index 3fd1d0e8b..508224dd6 100644 --- a/outscale/data_source_outscale_nat_service_test.go +++ b/outscale/data_source_outscale_nat_service_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithNatServiceDataSource_Instance(t *testing.T) { diff --git a/outscale/data_source_outscale_nat_services.go b/outscale/data_source_outscale_nat_services.go index e6f840b3a..fcefe4fdc 100644 --- a/outscale/data_source_outscale_nat_services.go +++ b/outscale/data_source_outscale_nat_services.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPINatServices() *schema.Resource { diff --git a/outscale/data_source_outscale_nat_services_test.go b/outscale/data_source_outscale_nat_services_test.go index c66181515..f81f6609e 100644 --- a/outscale/data_source_outscale_nat_services_test.go +++ b/outscale/data_source_outscale_nat_services_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_WithNatServicesDataSource_Instance(t *testing.T) { diff --git a/outscale/data_source_outscale_net.go b/outscale/data_source_outscale_net.go index 3711da381..b00d486e5 100644 --- a/outscale/data_source_outscale_net.go +++ b/outscale/data_source_outscale_net.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVpc() *schema.Resource { diff --git a/outscale/data_source_outscale_net_access_point.go b/outscale/data_source_outscale_net_access_point.go index 39c3ff11f..fb5dd815f 100644 --- a/outscale/data_source_outscale_net_access_point.go +++ b/outscale/data_source_outscale_net_access_point.go @@ -7,8 +7,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_net_access_point_services.go b/outscale/data_source_outscale_net_access_point_services.go index f782e4114..006768976 100644 --- a/outscale/data_source_outscale_net_access_point_services.go +++ b/outscale/data_source_outscale_net_access_point_services.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPINetAccessPointServices() *schema.Resource { diff --git a/outscale/data_source_outscale_net_access_point_services_test.go b/outscale/data_source_outscale_net_access_point_services_test.go index b3dc5da5b..40a6b12bd 100644 --- a/outscale/data_source_outscale_net_access_point_services_test.go +++ b/outscale/data_source_outscale_net_access_point_services_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_net_access_point_test.go b/outscale/data_source_outscale_net_access_point_test.go index 13511ac2a..306c3d794 100644 --- a/outscale/data_source_outscale_net_access_point_test.go +++ b/outscale/data_source_outscale_net_access_point_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_net_access_points.go b/outscale/data_source_outscale_net_access_points.go index ac47695c8..b8e7d466e 100644 --- a/outscale/data_source_outscale_net_access_points.go +++ b/outscale/data_source_outscale_net_access_points.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func napSchema() map[string]*schema.Schema { diff --git a/outscale/data_source_outscale_net_access_points_test.go b/outscale/data_source_outscale_net_access_points_test.go index 8807c42c4..414c79007 100644 --- a/outscale/data_source_outscale_net_access_points_test.go +++ b/outscale/data_source_outscale_net_access_points_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_net_attributes.go b/outscale/data_source_outscale_net_attributes.go index 9e77ec12a..98dde5073 100644 --- a/outscale/data_source_outscale_net_attributes.go +++ b/outscale/data_source_outscale_net_attributes.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVpcAttr() *schema.Resource { diff --git a/outscale/data_source_outscale_net_attributes_test.go b/outscale/data_source_outscale_net_attributes_test.go index dc3266fcb..fb1761cd3 100644 --- a/outscale/data_source_outscale_net_attributes_test.go +++ b/outscale/data_source_outscale_net_attributes_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_AttributesDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_net_peering.go b/outscale/data_source_outscale_net_peering.go index 26f1c588d..1ffcb21e9 100644 --- a/outscale/data_source_outscale_net_peering.go +++ b/outscale/data_source_outscale_net_peering.go @@ -8,12 +8,11 @@ import ( "reflect" "time" + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/errwrap" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func dataSourceOutscaleOAPILinPeeringConnection() *schema.Resource { @@ -29,7 +28,7 @@ func dataSourceOutscaleOAPILinPeeringConnection() *schema.Resource { }, "source_net": vpcOAPIPeeringConnectionOptionsSchema(), "state": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -113,33 +112,21 @@ func dataSourceOutscaleOAPILinPeeringConnectionRead(d *schema.ResourceData, meta log.Printf("[DEBUG] Net Peering Connection Source %s, Accepter %s", netPeering.SourceNet.GetAccountId(), netPeering.AccepterNet.GetAccountId()) - accepter := make(map[string]interface{}) - requester := make(map[string]interface{}) - stat := make(map[string]interface{}) - if !reflect.DeepEqual(netPeering.GetAccepterNet(), oscgo.AccepterNet{}) { - accepter["ip_range"] = netPeering.AccepterNet.GetIpRange() - accepter["account_id"] = netPeering.AccepterNet.GetAccountId() - accepter["net_id"] = netPeering.AccepterNet.GetNetId() + if err := d.Set("accepter_net", getOAPINetPeeringAccepterNet(*netPeering.AccepterNet)); err != nil { + return err + } } + if !reflect.DeepEqual(netPeering.SourceNet, oscgo.SourceNet{}) { - requester["ip_range"] = netPeering.SourceNet.GetIpRange() - requester["account_id"] = netPeering.SourceNet.GetAccountId() - requester["net_id"] = netPeering.SourceNet.GetNetId() + if err := d.Set("source_net", getOAPINetPeeringSourceNet(*netPeering.SourceNet)); err != nil { + return err + } } if netPeering.State.GetName() != "" { - stat["name"] = netPeering.State.GetName() - stat["message"] = netPeering.State.GetMessage() - } - - if err := d.Set("accepter_net", accepter); err != nil { - return err - } - if err := d.Set("source_net", requester); err != nil { - return err - } - if err := d.Set("state", stat); err != nil { - return err + if err := d.Set("state", getOAPINetPeeringState(netPeering.GetState())); err != nil { + return err + } } if err := d.Set("net_peering_id", netPeering.GetNetPeeringId()); err != nil { return err diff --git a/outscale/data_source_outscale_net_peering_test.go b/outscale/data_source_outscale_net_peering_test.go index 3c4904807..54d16dd30 100644 --- a/outscale/data_source_outscale_net_peering_test.go +++ b/outscale/data_source_outscale_net_peering_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_PeeringConnectionDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_net_peerings.go b/outscale/data_source_outscale_net_peerings.go index f4803e3ed..8da1774b1 100644 --- a/outscale/data_source_outscale_net_peerings.go +++ b/outscale/data_source_outscale_net_peerings.go @@ -4,13 +4,14 @@ import ( "context" "fmt" "log" + "reflect" "time" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPILinPeeringsConnection() *schema.Resource { @@ -31,11 +32,11 @@ func dataSourceOutscaleOAPILinPeeringsConnection() *schema.Resource { }, "source_net": vpcOAPIPeeringConnectionOptionsSchema(), "state": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "code": { + "name": { Type: schema.TypeString, Computed: true, }, @@ -85,56 +86,67 @@ func dataSourceOutscaleOAPILinPeeringsConnectionRead(d *schema.ResourceData, met if err != nil { return fmt.Errorf("Error reading the Net Peerings %s", err) } + peerings := resp.GetNetPeerings() - if resp.GetNetPeerings() == nil || len(resp.GetNetPeerings()) == 0 { + if peerings == nil || len(peerings) == 0 { return fmt.Errorf("Your query returned no results. Please change your search criteria and try again") } - - peerings := resp.GetNetPeerings() - return resourceDataAttrSetter(d, func(set AttributeSetter) error { d.SetId(resource.UniqueId()) - if err := set("net_peerings", getOAPINetPeerings(peerings)); err != nil { - log.Printf("[DEBUG] Net Peerings ERR %+v", err) + if err := set("net_peerings", setNetPeeringsAttributtes(peerings)); err != nil { return err } return nil }) } -func getOAPINetPeerings(peerings []oscgo.NetPeering) (res []map[string]interface{}) { +func setNetPeeringsAttributtes(peerings []oscgo.NetPeering) (res []map[string]interface{}) { + for _, p := range peerings { - res = append(res, map[string]interface{}{ - "accepter_net": getOAPINetPeeringAccepterNet(p.GetAccepterNet()), + netP := map[string]interface{}{ "net_peering_id": p.GetNetPeeringId(), - "source_net": getOAPINetPeeringSourceNet(p.GetSourceNet()), - "state": getOAPINetPeeringState(p.GetState()), - //"tags": getOapiTagSet(p.Tags), - }) + } + if p.HasAccepterNet() { + if !reflect.DeepEqual(p.GetAccepterNet(), oscgo.AccepterNet{}) { + netP["accepter_net"] = getOAPINetPeeringAccepterNet(p.GetAccepterNet()) + } + } + if p.HasSourceNet() { + if !reflect.DeepEqual(p.GetSourceNet(), oscgo.SourceNet{}) { + netP["source_net"] = getOAPINetPeeringSourceNet(p.GetSourceNet()) + } + } + if p.HasState() { + netP["state"] = getOAPINetPeeringState(p.GetState()) + } + if p.HasTags() { + netP["tags"] = getOapiTagSet(p.Tags) + } + res = append(res, netP) } - return res + return } -func getOAPINetPeeringAccepterNet(a oscgo.AccepterNet) map[string]interface{} { - return map[string]interface{}{ +func getOAPINetPeeringAccepterNet(a oscgo.AccepterNet) []map[string]interface{} { + return []map[string]interface{}{{ "ip_range": a.GetIpRange(), "account_id": a.GetAccountId(), "net_id": a.GetNetId(), - } + }} } -func getOAPINetPeeringSourceNet(a oscgo.SourceNet) map[string]interface{} { - return map[string]interface{}{ +func getOAPINetPeeringSourceNet(a oscgo.SourceNet) []map[string]interface{} { + return []map[string]interface{}{{ "ip_range": a.GetIpRange(), "account_id": a.GetAccountId(), "net_id": a.GetNetId(), - } + }} } -func getOAPINetPeeringState(a oscgo.NetPeeringState) map[string]interface{} { - return map[string]interface{}{ - "name": a.Name, - "message": a.Message, - } +func getOAPINetPeeringState(a oscgo.NetPeeringState) []map[string]interface{} { + return []map[string]interface{}{{ + "name": a.GetName(), + "message": a.GetMessage(), + }} } diff --git a/outscale/data_source_outscale_net_peerings_test.go b/outscale/data_source_outscale_net_peerings_test.go index 0717473ce..2cb2b133a 100644 --- a/outscale/data_source_outscale_net_peerings_test.go +++ b/outscale/data_source_outscale_net_peerings_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_PeeringsConnectionDataSource_basic(t *testing.T) { @@ -42,6 +42,11 @@ const testAccDataSourceOutscaleOAPILinPeeringsConnectionConfig = ` resource "outscale_net_peering" "outscale_net_peering" { accepter_net_id = "${outscale_net.outscale_net.net_id}" source_net_id = "${outscale_net.outscale_net2.net_id}" + tags { + key = "okht" + value = "testacc-peerings-ds" + } + } resource "outscale_net_peering" "outscale_net_peering2" { diff --git a/outscale/data_source_outscale_net_test.go b/outscale/data_source_outscale_net_test.go index e0c87da79..96ae58406 100644 --- a/outscale/data_source_outscale_net_test.go +++ b/outscale/data_source_outscale_net_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_nets.go b/outscale/data_source_outscale_nets.go index f9d25c6f4..eb83186d7 100644 --- a/outscale/data_source_outscale_nets.go +++ b/outscale/data_source_outscale_nets.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVpcs() *schema.Resource { diff --git a/outscale/data_source_outscale_nets_test.go b/outscale/data_source_outscale_nets_test.go index 0971f58ce..70849036f 100644 --- a/outscale/data_source_outscale_nets_test.go +++ b/outscale/data_source_outscale_nets_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_nic.go b/outscale/data_source_outscale_nic.go index 7ac511e96..7f38280e1 100644 --- a/outscale/data_source_outscale_nic.go +++ b/outscale/data_source_outscale_nic.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -27,7 +27,6 @@ func dataSourceOutscaleOAPINic() *schema.Resource { // Argument "nic_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, @@ -51,7 +50,7 @@ func dataSourceOutscaleOAPINic() *schema.Resource { }, // Attributes "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -75,7 +74,7 @@ func dataSourceOutscaleOAPINic() *schema.Resource { }, }, "link_nic": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -146,7 +145,7 @@ func dataSourceOutscaleOAPINic() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -217,21 +216,13 @@ func dataSourceOutscaleOAPINic() *schema.Resource { func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - nicID, okID := d.GetOk("nic_id") filters, okFilters := d.GetOk("filter") - if okID && okFilters { - return errors.New("nic_id and filter set") + if !okFilters { + return errors.New("filters must be assigned") } dnri := oscgo.ReadNicsRequest{} - - if okID { - dnri.Filters = &oscgo.FiltersNic{ - NicIds: &[]string{nicID.(string)}, - } - } - if okFilters { dnri.SetFilters(buildOutscaleOAPIDataSourceNicFilters(filters.(*schema.Set))) } @@ -250,7 +241,6 @@ func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) err }) if err != nil { - return fmt.Errorf("Error describing Network Interfaces : %s", err) } @@ -262,7 +252,6 @@ func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) err } return fmt.Errorf("Error retrieving ENI: %s", err) } - if err := utils.IsResponseEmptyOrMutiple(len(resp.GetNics()), "Nic"); err != nil { return err } @@ -281,33 +270,16 @@ func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) err if err := d.Set("subnet_id", eni.GetSubnetId()); err != nil { return err } - - b := make(map[string]interface{}) - - link := eni.GetLinkPublicIp() - b["public_ip_id"] = link.GetPublicIpId() - b["link_public_ip_id"] = link.GetLinkPublicIpId() - b["public_ip_account_id"] = link.GetPublicIpAccountId() - b["public_dns_name"] = link.GetPublicDnsName() - b["public_ip"] = link.GetPublicIp() - - if err := d.Set("link_public_ip", b); err != nil { - return err + if linkIp, ok := eni.GetLinkPublicIpOk(); ok { + if err := d.Set("link_public_ip", flattenLinkPublicIp(linkIp)); err != nil { + return err + } } - bb := make(map[string]interface{}) - - linkNic := eni.GetLinkNic() - - bb["link_nic_id"] = linkNic.GetLinkNicId() - bb["delete_on_vm_deletion"] = fmt.Sprintf("%t", linkNic.GetDeleteOnVmDeletion()) - bb["device_number"] = fmt.Sprintf("%d", linkNic.GetDeviceNumber()) - bb["vm_id"] = linkNic.GetVmId() - bb["vm_account_id"] = linkNic.GetVmAccountId() - bb["state"] = linkNic.GetState() - - if err := d.Set("link_nic", bb); err != nil { - return err + if linkNic, ok := eni.GetLinkNicOk(); ok { + if err := d.Set("link_nic", flattenLinkNic(linkNic)); err != nil { + return err + } } if err := d.Set("subregion_name", eni.GetSubregionName()); err != nil { @@ -321,7 +293,6 @@ func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) err b["security_group_name"] = v.GetSecurityGroupName() x[k] = b } - if err := d.Set("security_groups", x); err != nil { return err } @@ -343,23 +314,22 @@ func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) err if eni.PrivateIps != nil { for k, v := range eni.GetPrivateIps() { b := make(map[string]interface{}) - - d := make(map[string]interface{}) - assoc := v.GetLinkPublicIp() - d["public_ip_id"] = assoc.GetPublicIpId() - d["link_public_ip_id"] = assoc.GetLinkPublicIpId() - d["public_ip_account_id"] = assoc.GetPublicIpAccountId() - d["public_dns_name"] = assoc.GetPublicDnsName() - d["public_ip"] = assoc.GetPublicIp() - - b["link_public_ip"] = d + if assoc, ok := v.GetLinkPublicIpOk(); ok { + d := make(map[string]interface{}) + d["public_ip_id"] = assoc.GetPublicIpId() + d["link_public_ip_id"] = assoc.GetLinkPublicIpId() + d["public_ip_account_id"] = assoc.GetPublicIpAccountId() + d["public_dns_name"] = assoc.GetPublicDnsName() + d["public_ip"] = assoc.GetPublicIp() + b["link_public_ip"] = d + } b["private_dns_name"] = v.GetPrivateDnsName() b["private_ip"] = v.GetPrivateIp() b["is_primary"] = v.GetIsPrimary() - y[k] = b } } + if err := d.Set("private_ips", y); err != nil { return err } diff --git a/outscale/data_source_outscale_nic_test.go b/outscale/data_source_outscale_nic_test.go index 8e00238f5..9bbd6e27f 100644 --- a/outscale/data_source_outscale_nic_test.go +++ b/outscale/data_source_outscale_nic_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithNicDataSource_basic(t *testing.T) { @@ -142,7 +142,7 @@ func testAccOutscaleOAPIENIDataSourceConfig(subregion string) string { resource "outscale_subnet" "outscale_subnet" { subregion_name = "%sa" - ip_range = "10.0.0.0/24" + ip_range = "10.0.0.0/16" net_id = outscale_net.outscale_net.id } @@ -155,7 +155,10 @@ func testAccOutscaleOAPIENIDataSourceConfig(subregion string) string { } data "outscale_nic" "outscale_nic" { - nic_id = outscale_nic.outscale_nic.id + filter { + name = "nic_ids" + values = [outscale_nic.outscale_nic.nic_id] + } } `, subregion) } @@ -173,7 +176,7 @@ func testAccOutscaleOAPIENIDataSourceConfigFilter(subregion string) string { resource "outscale_subnet" "outscale_subnet" { subregion_name = "%sa" - ip_range = "10.0.0.0/24" + ip_range = "10.0.0.0/16" net_id = outscale_net.outscale_net.id } @@ -190,6 +193,6 @@ func testAccOutscaleOAPIENIDataSourceConfigFilter(subregion string) string { name = "nic_ids" values = [outscale_nic.outscale_nic.nic_id] } - } + } `, subregion) } diff --git a/outscale/data_source_outscale_nics.go b/outscale/data_source_outscale_nics.go index 96c6a9f9d..12080ab8b 100644 --- a/outscale/data_source_outscale_nics.go +++ b/outscale/data_source_outscale_nics.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) // Creates a network interface in the specified subnet @@ -42,7 +42,7 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { Computed: true, }, "link_nic": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -54,7 +54,7 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { Type: schema.TypeInt, Computed: true, }, - "nic_link_id": { + "link_nic_id": { Type: schema.TypeString, Computed: true, }, @@ -74,7 +74,7 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { }, }, "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -127,7 +127,7 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { Computed: true, }, "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -195,18 +195,15 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { }, "tags": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "key": { Type: schema.TypeString, - Optional: true, Computed: true, }, "value": { Type: schema.TypeString, - Optional: true, Computed: true, }, }, @@ -226,9 +223,6 @@ func dataSourceOutscaleOAPINicsRead(d *schema.ResourceData, meta interface{}) er conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") - if !filtersOk { - return fmt.Errorf("filters, or owner must be assigned, or nic_id must be provided") - } params := oscgo.ReadNicsRequest{} if filtersOk { @@ -258,7 +252,6 @@ func dataSourceOutscaleOAPINicsRead(d *schema.ResourceData, meta interface{}) er if len(resp.GetNics()) == 0 { return fmt.Errorf("Your query returned no results. Please change your search criteria and try again") } - nics := resp.GetNics() return resourceDataAttrSetter(d, func(set AttributeSetter) error { @@ -267,7 +260,6 @@ func dataSourceOutscaleOAPINicsRead(d *schema.ResourceData, meta interface{}) er if err := set("nics", getOAPIVMNetworkInterfaceSet(nics)); err != nil { return err } - return nil }) } diff --git a/outscale/data_source_outscale_nics_test.go b/outscale/data_source_outscale_nics_test.go index d5110bc98..92bc7cdb7 100644 --- a/outscale/data_source_outscale_nics_test.go +++ b/outscale/data_source_outscale_nics_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -37,12 +37,13 @@ func testAccCheckOutscaleOAPINicsDataSourceConfig(subregion string) string { resource "outscale_subnet" "outscale_subnet" { subregion_name = "%sa" - ip_range = "10.0.0.0/24" + ip_range = "10.0.0.0/16" net_id = outscale_net.outscale_net.net_id } resource "outscale_nic" "outscale_nic" { subnet_id = outscale_subnet.outscale_subnet.subnet_id + depends_on = [outscale_subnet.outscale_subnet] } data "outscale_nics" "outscale_nics" { @@ -50,6 +51,7 @@ func testAccCheckOutscaleOAPINicsDataSourceConfig(subregion string) string { name = "nic_ids" values = [outscale_nic.outscale_nic.id] } + depends_on = [outscale_nic.outscale_nic] } `, subregion) } diff --git a/outscale/data_source_outscale_product_type.go b/outscale/data_source_outscale_product_type.go index c426c17ae..b759f0fd5 100644 --- a/outscale/data_source_outscale_product_type.go +++ b/outscale/data_source_outscale_product_type.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIProductType() *schema.Resource { diff --git a/outscale/data_source_outscale_product_type_test.go b/outscale/data_source_outscale_product_type_test.go index 356afeaf3..d89d59945 100644 --- a/outscale/data_source_outscale_product_type_test.go +++ b/outscale/data_source_outscale_product_type_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceProductType(t *testing.T) { diff --git a/outscale/data_source_outscale_product_types.go b/outscale/data_source_outscale_product_types.go index 0fa9c353f..2d0184a54 100644 --- a/outscale/data_source_outscale_product_types.go +++ b/outscale/data_source_outscale_product_types.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIProductTypes() *schema.Resource { diff --git a/outscale/data_source_outscale_product_types_test.go b/outscale/data_source_outscale_product_types_test.go index 0a558edf8..1ef0203d7 100644 --- a/outscale/data_source_outscale_product_types_test.go +++ b/outscale/data_source_outscale_product_types_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceProductTypes(t *testing.T) { diff --git a/outscale/data_source_outscale_public_catalog.go b/outscale/data_source_outscale_public_catalog.go index cd2fdd8b5..16d054a44 100644 --- a/outscale/data_source_outscale_public_catalog.go +++ b/outscale/data_source_outscale_public_catalog.go @@ -6,8 +6,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_public_catalog_test.go b/outscale/data_source_outscale_public_catalog_test.go index dfdeec90f..1c18eeaf6 100644 --- a/outscale/data_source_outscale_public_catalog_test.go +++ b/outscale/data_source_outscale_public_catalog_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourcePublicCatalog_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_public_ip.go b/outscale/data_source_outscale_public_ip.go index 1d1f3f6f3..d3ab81989 100644 --- a/outscale/data_source_outscale_public_ip.go +++ b/outscale/data_source_outscale_public_ip.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_public_ip_test.go b/outscale/data_source_outscale_public_ip_test.go index bf8c0a5a4..e25df9640 100644 --- a/outscale/data_source_outscale_public_ip_test.go +++ b/outscale/data_source_outscale_public_ip_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_public_ips.go b/outscale/data_source_outscale_public_ips.go index 966a69f08..dfe52c969 100644 --- a/outscale/data_source_outscale_public_ips.go +++ b/outscale/data_source_outscale_public_ips.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIPublicIPS() *schema.Resource { diff --git a/outscale/data_source_outscale_public_ips_test.go b/outscale/data_source_outscale_public_ips_test.go index b765abed0..ed34a98e0 100644 --- a/outscale/data_source_outscale_public_ips_test.go +++ b/outscale/data_source_outscale_public_ips_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourcePublicIPS(t *testing.T) { diff --git a/outscale/data_source_outscale_quota.go b/outscale/data_source_outscale_quota.go index 86b947cf9..68054586c 100644 --- a/outscale/data_source_outscale_quota.go +++ b/outscale/data_source_outscale_quota.go @@ -3,14 +3,13 @@ package outscale import ( "context" "fmt" - "log" "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIQuota() *schema.Resource { @@ -61,7 +60,6 @@ func dataSourceOutscaleOAPIQuota() *schema.Resource { func dataSourceOutscaleOAPIQuotaRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - req := oscgo.ReadQuotasRequest{} filters, filtersOk := d.GetOk("filter") @@ -134,28 +132,3 @@ func dataSourceOutscaleOAPIQuotaRead(d *schema.ResourceData, meta interface{}) e return nil } - -func buildOutscaleOAPIQuotaDataSourceFilters(set *schema.Set) *oscgo.FiltersQuota { - var filters oscgo.FiltersQuota - for _, v := range set.List() { - m := v.(map[string]interface{}) - var filterValues []string - for _, e := range m["values"].([]interface{}) { - filterValues = append(filterValues, e.(string)) - } - - switch name := m["name"].(string); name { - case "quota_types": - filters.QuotaTypes = &filterValues - case "quota_names": - filters.QuotaNames = &filterValues - case "collections": - filters.Collections = &filterValues - case "short_descriptions": - filters.ShortDescriptions = &filterValues - default: - log.Printf("[Debug] Unknown Filter Name: %s.", name) - } - } - return &filters -} diff --git a/outscale/data_source_outscale_quota_test.go b/outscale/data_source_outscale_quota_test.go deleted file mode 100644 index 37633a6d2..000000000 --- a/outscale/data_source_outscale_quota_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package outscale - -import ( - "testing" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" -) - -func TestAccOthers_DataSourceQuota(t *testing.T) { - t.Parallel() - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccDataSourceOutscaleOAPIQuotaConfig, - Check: resource.ComposeTestCheckFunc(), - }, - }, - }) -} - -const testAccDataSourceOutscaleOAPIQuotaConfig = ` - data "outscale_quota" "lbu-quota" { - filter { - name = "quota_names" - values = ["lb_listeners_limit"] - } -} -` diff --git a/outscale/data_source_outscale_quotas.go b/outscale/data_source_outscale_quotas.go index b9254c41d..ec6f14fc3 100644 --- a/outscale/data_source_outscale_quotas.go +++ b/outscale/data_source_outscale_quotas.go @@ -3,13 +3,14 @@ package outscale import ( "context" "fmt" + "log" "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIQuotas() *schema.Resource { @@ -141,3 +142,28 @@ func dataSourceOutscaleOAPIQuotasRead(d *schema.ResourceData, meta interface{}) return nil } + +func buildOutscaleOAPIQuotaDataSourceFilters(set *schema.Set) *oscgo.FiltersQuota { + var filters oscgo.FiltersQuota + for _, v := range set.List() { + m := v.(map[string]interface{}) + var filterValues []string + for _, e := range m["values"].([]interface{}) { + filterValues = append(filterValues, e.(string)) + } + + switch name := m["name"].(string); name { + case "quota_types": + filters.QuotaTypes = &filterValues + case "quota_names": + filters.QuotaNames = &filterValues + case "collections": + filters.Collections = &filterValues + case "short_descriptions": + filters.ShortDescriptions = &filterValues + default: + log.Printf("[Debug] Unknown Filter Name: %s.", name) + } + } + return &filters +} diff --git a/outscale/data_source_outscale_quotas_test.go b/outscale/data_source_outscale_quotas_test.go index c8809dc2a..eb2143fd5 100644 --- a/outscale/data_source_outscale_quotas_test.go +++ b/outscale/data_source_outscale_quotas_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourcesQuotas(t *testing.T) { diff --git a/outscale/data_source_outscale_regions.go b/outscale/data_source_outscale_regions.go index 1eb351cff..b449a692e 100644 --- a/outscale/data_source_outscale_regions.go +++ b/outscale/data_source_outscale_regions.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_regions_test.go b/outscale/data_source_outscale_regions_test.go index 5c9f91e85..253f26eb6 100644 --- a/outscale/data_source_outscale_regions_test.go +++ b/outscale/data_source_outscale_regions_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_RegionsDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_route_table.go b/outscale/data_source_outscale_route_table.go index 983ecc4cd..baeba7056 100644 --- a/outscale/data_source_outscale_route_table.go +++ b/outscale/data_source_outscale_route_table.go @@ -11,8 +11,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIRouteTable() *schema.Resource { diff --git a/outscale/data_source_outscale_route_table_test.go b/outscale/data_source_outscale_route_table_test.go index a345dadbd..6af78f189 100644 --- a/outscale/data_source_outscale_route_table_test.go +++ b/outscale/data_source_outscale_route_table_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithRouteTableDataSource_basic(t *testing.T) { @@ -19,7 +19,6 @@ func TestAccNet_WithRouteTableDataSource_basic(t *testing.T) { testAccDataSourceOutscaleOAPIRouteTableCheck("data.outscale_route_table.by_filter"), testAccDataSourceOutscaleOAPIRouteTableCheck("data.outscale_route_table.by_id"), ), - ExpectNonEmptyPlan: true, }, }, }) @@ -96,7 +95,7 @@ const testAccDataSourceOutscaleOAPIRouteTableGroupConfig = ` resource "outscale_subnet" "test" { ip_range = "172.16.0.0/24" - net_id = "${outscale_net.test.id}" + net_id = outscale_net.test.id #tag { # Name = "terraform-testacc-data-source" @@ -104,7 +103,7 @@ const testAccDataSourceOutscaleOAPIRouteTableGroupConfig = ` } resource "outscale_route_table" "test" { - net_id = "${outscale_net.test.id}" + net_id = outscale_net.test.id tags { key = "Name" @@ -113,21 +112,21 @@ const testAccDataSourceOutscaleOAPIRouteTableGroupConfig = ` } resource "outscale_route_table_link" "a" { - subnet_id = "${outscale_subnet.test.id}" - route_table_id = "${outscale_route_table.test.id}" + subnet_id = outscale_subnet.test.id + route_table_id = outscale_route_table.test.id } data "outscale_route_table" "by_filter" { filter { name = "route_table_ids" - values = ["${outscale_route_table.test.id}"] + values = [outscale_route_table.test.id] } - depends_on = ["outscale_route_table_link.a"] + depends_on = [outscale_route_table_link.a] } data "outscale_route_table" "by_id" { - route_table_id = "${outscale_route_table.test.id}" - depends_on = ["outscale_route_table_link.a"] + route_table_id = outscale_route_table.test.id + depends_on = [outscale_route_table_link.a] } ` diff --git a/outscale/data_source_outscale_route_tables.go b/outscale/data_source_outscale_route_tables.go index b3060cb0e..cb70c94fb 100644 --- a/outscale/data_source_outscale_route_tables.go +++ b/outscale/data_source_outscale_route_tables.go @@ -5,10 +5,11 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIRouteTables() *schema.Resource { diff --git a/outscale/data_source_outscale_route_tables_test.go b/outscale/data_source_outscale_route_tables_test.go index 934239b37..5a7ade712 100644 --- a/outscale/data_source_outscale_route_tables_test.go +++ b/outscale/data_source_outscale_route_tables_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_WithRouteTablesDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_security_group.go b/outscale/data_source_outscale_security_group.go index c1ad10d72..0ebde0a43 100644 --- a/outscale/data_source_outscale_security_group.go +++ b/outscale/data_source_outscale_security_group.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_security_group_test.go b/outscale/data_source_outscale_security_group_test.go index 856159b2c..276a58b90 100644 --- a/outscale/data_source_outscale_security_group_test.go +++ b/outscale/data_source_outscale_security_group_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithSecurityGroupDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_security_groups.go b/outscale/data_source_outscale_security_groups.go index 5bace37c9..1a398e4c2 100644 --- a/outscale/data_source_outscale_security_groups.go +++ b/outscale/data_source_outscale_security_groups.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_security_groups_test.go b/outscale/data_source_outscale_security_groups_test.go index 8d8fbc528..91426df73 100644 --- a/outscale/data_source_outscale_security_groups_test.go +++ b/outscale/data_source_outscale_security_groups_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_WIthSecurityGroups_DataSource(t *testing.T) { diff --git a/outscale/data_source_outscale_server_certificate.go b/outscale/data_source_outscale_server_certificate.go index 205aaeaf6..34de402a1 100644 --- a/outscale/data_source_outscale_server_certificate.go +++ b/outscale/data_source_outscale_server_certificate.go @@ -6,10 +6,11 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOAPIServerCertificate() *schema.Resource { diff --git a/outscale/data_source_outscale_server_certificate_test.go b/outscale/data_source_outscale_server_certificate_test.go index b4b80e140..00e39559b 100644 --- a/outscale/data_source_outscale_server_certificate_test.go +++ b/outscale/data_source_outscale_server_certificate_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_ServerCertificateDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_server_certificates.go b/outscale/data_source_outscale_server_certificates.go index 4f17f8d84..47f1f7594 100644 --- a/outscale/data_source_outscale_server_certificates.go +++ b/outscale/data_source_outscale_server_certificates.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_server_certificates_test.go b/outscale/data_source_outscale_server_certificates_test.go index cf3cce28d..355f12771 100644 --- a/outscale/data_source_outscale_server_certificates_test.go +++ b/outscale/data_source_outscale_server_certificates_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_ServerCertificatesDatasource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_snapshot.go b/outscale/data_source_outscale_snapshot.go index fef3c2dc5..077499606 100644 --- a/outscale/data_source_outscale_snapshot.go +++ b/outscale/data_source_outscale_snapshot.go @@ -7,10 +7,11 @@ import ( "strconv" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/nav-inc/datetime" oscgo "github.com/outscale/osc-sdk-go/v2" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_snapshot_export_task.go b/outscale/data_source_outscale_snapshot_export_task.go index 77bfc3984..cfa586f64 100644 --- a/outscale/data_source_outscale_snapshot_export_task.go +++ b/outscale/data_source_outscale_snapshot_export_task.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_snapshot_export_task_test.go b/outscale/data_source_outscale_snapshot_export_task_test.go index 0896a71a9..fda93e274 100644 --- a/outscale/data_source_outscale_snapshot_export_task_test.go +++ b/outscale/data_source_outscale_snapshot_export_task_test.go @@ -4,11 +4,10 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" ) func TestAccOthers_SnapshotExportTaskDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_snapshot_export_tasks.go b/outscale/data_source_outscale_snapshot_export_tasks.go index 900512e46..39bcdc7a1 100644 --- a/outscale/data_source_outscale_snapshot_export_tasks.go +++ b/outscale/data_source_outscale_snapshot_export_tasks.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPISnapshotExportTasks() *schema.Resource { diff --git a/outscale/data_source_outscale_snapshot_export_tasks_test.go b/outscale/data_source_outscale_snapshot_export_tasks_test.go index 85e3f6bbf..43a109668 100644 --- a/outscale/data_source_outscale_snapshot_export_tasks_test.go +++ b/outscale/data_source_outscale_snapshot_export_tasks_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_snapshot_test.go b/outscale/data_source_outscale_snapshot_test.go index b25f7ce1f..b381daa29 100644 --- a/outscale/data_source_outscale_snapshot_test.go +++ b/outscale/data_source_outscale_snapshot_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_snapshots.go b/outscale/data_source_outscale_snapshots.go index 0dbb1702e..b11e70213 100644 --- a/outscale/data_source_outscale_snapshots.go +++ b/outscale/data_source_outscale_snapshots.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPISnapshots() *schema.Resource { diff --git a/outscale/data_source_outscale_snapshots_test.go b/outscale/data_source_outscale_snapshots_test.go index 9c2ee4647..e0da0f5c7 100644 --- a/outscale/data_source_outscale_snapshots_test.go +++ b/outscale/data_source_outscale_snapshots_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_subnet.go b/outscale/data_source_outscale_subnet.go index 93081eed0..90b86ed58 100644 --- a/outscale/data_source_outscale_subnet.go +++ b/outscale/data_source_outscale_subnet.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_subnet_test.go b/outscale/data_source_outscale_subnet_test.go index 8cbe32c90..de345dc62 100644 --- a/outscale/data_source_outscale_subnet_test.go +++ b/outscale/data_source_outscale_subnet_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_subnets.go b/outscale/data_source_outscale_subnets.go index ae74cf9ba..da058afd7 100644 --- a/outscale/data_source_outscale_subnets.go +++ b/outscale/data_source_outscale_subnets.go @@ -6,10 +6,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPISubnets() *schema.Resource { diff --git a/outscale/data_source_outscale_subnets_test.go b/outscale/data_source_outscale_subnets_test.go index c5219cee2..93f4cd565 100644 --- a/outscale/data_source_outscale_subnets_test.go +++ b/outscale/data_source_outscale_subnets_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_subregions.go b/outscale/data_source_outscale_subregions.go index 8fd8fd607..c9d4c2a9c 100644 --- a/outscale/data_source_outscale_subregions.go +++ b/outscale/data_source_outscale_subregions.go @@ -5,11 +5,10 @@ import ( "log" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_subregions_test.go b/outscale/data_source_outscale_subregions_test.go index 9df932512..6456f5363 100644 --- a/outscale/data_source_outscale_subregions_test.go +++ b/outscale/data_source_outscale_subregions_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_tag.go b/outscale/data_source_outscale_tag.go index 6485dc0a2..d795a4012 100644 --- a/outscale/data_source_outscale_tag.go +++ b/outscale/data_source_outscale_tag.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPITag() *schema.Resource { diff --git a/outscale/data_source_outscale_tag_test.go b/outscale/data_source_outscale_tag_test.go index 20c5e513e..cb712582d 100644 --- a/outscale/data_source_outscale_tag_test.go +++ b/outscale/data_source_outscale_tag_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVM_WithTagDataSource(t *testing.T) { diff --git a/outscale/data_source_outscale_tags.go b/outscale/data_source_outscale_tags.go index c476daa45..e85915801 100644 --- a/outscale/data_source_outscale_tags.go +++ b/outscale/data_source_outscale_tags.go @@ -5,10 +5,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPITags() *schema.Resource { diff --git a/outscale/data_source_outscale_tags_test.go b/outscale/data_source_outscale_tags_test.go index 559d63855..2f378531e 100644 --- a/outscale/data_source_outscale_tags_test.go +++ b/outscale/data_source_outscale_tags_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOutscaleOAPITagsDataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_virtual_gateway.go b/outscale/data_source_outscale_virtual_gateway.go index 315fab12a..c9bda9ede 100644 --- a/outscale/data_source_outscale_virtual_gateway.go +++ b/outscale/data_source_outscale_virtual_gateway.go @@ -10,8 +10,8 @@ import ( "github.com/terraform-providers/terraform-provider-outscale/utils" "github.com/aws/aws-sdk-go/aws" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVirtualGateway() *schema.Resource { diff --git a/outscale/data_source_outscale_virtual_gateway_test.go b/outscale/data_source_outscale_virtual_gateway_test.go index b2d47c83b..fca3d915f 100644 --- a/outscale/data_source_outscale_virtual_gateway_test.go +++ b/outscale/data_source_outscale_virtual_gateway_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceVirtualGateway_unattached(t *testing.T) { diff --git a/outscale/data_source_outscale_virtual_gateways.go b/outscale/data_source_outscale_virtual_gateways.go index d656fb874..f79f8cc0d 100644 --- a/outscale/data_source_outscale_virtual_gateways.go +++ b/outscale/data_source_outscale_virtual_gateways.go @@ -5,11 +5,10 @@ import ( "fmt" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func dataSourceOutscaleOAPIVirtualGateways() *schema.Resource { diff --git a/outscale/data_source_outscale_virtual_gateways_test.go b/outscale/data_source_outscale_virtual_gateways_test.go index f790b9214..5b5f386e1 100644 --- a/outscale/data_source_outscale_virtual_gateways_test.go +++ b/outscale/data_source_outscale_virtual_gateways_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccOthers_DataSourceVpnGateways_unattached(t *testing.T) { diff --git a/outscale/data_source_outscale_vm.go b/outscale/data_source_outscale_vm.go index c41ffde14..8a250bc5e 100644 --- a/outscale/data_source_outscale_vm.go +++ b/outscale/data_source_outscale_vm.go @@ -8,8 +8,8 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -92,9 +92,9 @@ func oapiVMDescriptionAttributes(set AttributeSetter, vm *oscgo.Vm) error { return err } if err := set("block_device_mappings_created", getOscAPIVMBlockDeviceMapping(vm.GetBlockDeviceMappings())); err != nil { - log.Printf("[DEBUG] BLOCKING DEVICE MAPPING ERR %+v", err) return err } + if err := set("bsu_optimized", vm.GetBsuOptimized()); err != nil { return err } @@ -199,21 +199,18 @@ func oapiVMDescriptionAttributes(set AttributeSetter, vm *oscgo.Vm) error { return set("vm_type", vm.GetVmType()) } -func getOscAPIVMBlockDeviceMapping(blockDeviceMappings []oscgo.BlockDeviceMappingCreated) []map[string]interface{} { - blockDeviceMapping := make([]map[string]interface{}, len(blockDeviceMappings)) - - for k, v := range blockDeviceMappings { - blockDeviceMapping[k] = map[string]interface{}{ - "device_name": aws.StringValue(v.DeviceName), - "bsu": map[string]interface{}{ - "delete_on_vm_deletion": fmt.Sprintf("%t", aws.BoolValue(v.GetBsu().DeleteOnVmDeletion)), - "volume_id": aws.StringValue(v.GetBsu().VolumeId), - "state": aws.StringValue(v.GetBsu().State), - "link_date": aws.StringValue(v.GetBsu().LinkDate), - }, +func getOscAPIVMBlockDeviceMapping(blkMappings []oscgo.BlockDeviceMappingCreated) []map[string]interface{} { + res := []map[string]interface{}{} + for _, v := range blkMappings { + blk := map[string]interface{}{ + "device_name": v.GetDeviceName(), + } + if bsu, ok := v.GetBsuOk(); ok { + blk["bsu"] = getOAPIBsuSet(*bsu) } + res = append(res, blk) } - return blockDeviceMapping + return res } func getOAPIVMSecurityGroups(groupSet []oscgo.SecurityGroupLight) []map[string]interface{} { @@ -291,13 +288,11 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "block_device_mappings_created": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bsu": { - Type: schema.TypeMap, - Optional: true, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -310,11 +305,11 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { Computed: true, }, "state": { - Type: schema.TypeInt, + Type: schema.TypeString, Computed: true, }, "volume_id": { - Type: schema.TypeFloat, + Type: schema.TypeString, Computed: true, }, }, @@ -329,7 +324,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "bsu_optimized": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "client_token": { @@ -342,7 +336,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "deletion_protection": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "hypervisor": { @@ -351,28 +344,24 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "image_id": { Type: schema.TypeString, - ForceNew: true, - Optional: true, Computed: true, }, "is_source_dest_checked": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "keypair_name": { Type: schema.TypeString, - Optional: true, Computed: true, }, "security_group_ids": { - Type: schema.TypeSet, - Optional: true, + Type: schema.TypeList, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "security_group_names": { Type: schema.TypeList, - Optional: true, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "launch_number": { @@ -471,7 +460,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "link_nic": { Type: schema.TypeList, - MaxItems: 1, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -557,39 +545,32 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "nics": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "delete_on_vm_deletion": { Type: schema.TypeBool, Computed: true, - Optional: true, }, "description": { Type: schema.TypeString, Computed: true, - Optional: true, }, "device_number": { Type: schema.TypeInt, Computed: true, - Optional: true, }, "nic_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_ips": { Type: schema.TypeSet, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "is_primary": { Type: schema.TypeBool, - Optional: true, Computed: true, }, "link_public_ip": { @@ -618,7 +599,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "private_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, }, @@ -626,12 +606,10 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "secondary_private_ip_count": { Type: schema.TypeInt, - Optional: true, Computed: true, }, "security_group_ids": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -648,12 +626,10 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { "subnet_id": { Type: schema.TypeString, Computed: true, - Optional: true, }, "link_nic": { - Type: schema.TypeList, + Type: schema.TypeSet, Computed: true, - MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "delete_on_vm_deletion": { @@ -710,7 +686,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "security_groups_names": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -747,12 +722,10 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "placement_subregion_name": { Type: schema.TypeString, - Optional: true, Computed: true, }, "placement_tenancy": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_dns_name": { @@ -814,8 +787,6 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "subnet_id": { Type: schema.TypeString, - ForceNew: true, - Optional: true, Computed: true, }, "tags": { @@ -836,22 +807,18 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "user_data": { Type: schema.TypeString, - Optional: true, Computed: true, }, "vm_id": { Type: schema.TypeString, Computed: true, - Optional: true, }, "vm_initiated_shutdown_behavior": { Type: schema.TypeString, - Optional: true, Computed: true, }, "vm_type": { Type: schema.TypeString, - Optional: true, Computed: true, }, "request_id": { @@ -860,7 +827,7 @@ func getOApiVMAttributesSchema() map[string]*schema.Schema { }, "private_ips": { Type: schema.TypeList, - Optional: true, + Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, } diff --git a/outscale/data_source_outscale_vm_state.go b/outscale/data_source_outscale_vm_state.go index b597af9dc..d8286b6d1 100644 --- a/outscale/data_source_outscale_vm_state.go +++ b/outscale/data_source_outscale_vm_state.go @@ -8,10 +8,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVMState() *schema.Resource { diff --git a/outscale/data_source_outscale_vm_state_test.go b/outscale/data_source_outscale_vm_state_test.go index 876105c18..c5f703969 100644 --- a/outscale/data_source_outscale_vm_state_test.go +++ b/outscale/data_source_outscale_vm_state_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccVM_StateDataSource(t *testing.T) { diff --git a/outscale/data_source_outscale_vm_states.go b/outscale/data_source_outscale_vm_states.go index 162b16723..8a7bbede7 100644 --- a/outscale/data_source_outscale_vm_states.go +++ b/outscale/data_source_outscale_vm_states.go @@ -7,10 +7,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleOAPIVMStates() *schema.Resource { diff --git a/outscale/data_source_outscale_vm_states_test.go b/outscale/data_source_outscale_vm_states_test.go index a5209f333..c6eed19df 100644 --- a/outscale/data_source_outscale_vm_states_test.go +++ b/outscale/data_source_outscale_vm_states_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVM_StatesDataSource(t *testing.T) { diff --git a/outscale/data_source_outscale_vm_test.go b/outscale/data_source_outscale_vm_test.go index 6b13a3383..013a1630b 100644 --- a/outscale/data_source_outscale_vm_test.go +++ b/outscale/data_source_outscale_vm_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_vm_types.go b/outscale/data_source_outscale_vm_types.go index 1a29b27e3..73cd4f046 100644 --- a/outscale/data_source_outscale_vm_types.go +++ b/outscale/data_source_outscale_vm_types.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" diff --git a/outscale/data_source_outscale_vm_types_test.go b/outscale/data_source_outscale_vm_types_test.go index 86e990399..99ddd5c5d 100644 --- a/outscale/data_source_outscale_vm_types_test.go +++ b/outscale/data_source_outscale_vm_types_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVM_TypesDataSource_basic(t *testing.T) { @@ -27,7 +27,7 @@ func TestAccVM_TypesDataSource_basic(t *testing.T) { func testAccDataSourceOutscaleOAPIVMTypesConfig(omi, vmType string) string { return fmt.Sprintf(` - resource "outscale_vm" "basic" { + resource "outscale_vm" "basicTypes" { image_id = "%s" vm_type = "%s" keypair_name = "terraform-basic" diff --git a/outscale/data_source_outscale_vms.go b/outscale/data_source_outscale_vms.go index 4cefb246d..cd1ec795d 100644 --- a/outscale/data_source_outscale_vms.go +++ b/outscale/data_source_outscale_vms.go @@ -7,8 +7,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_vms_test.go b/outscale/data_source_outscale_vms_test.go index 20cfa0d3d..6f45df301 100644 --- a/outscale/data_source_outscale_vms_test.go +++ b/outscale/data_source_outscale_vms_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccVMS_DataSource_basic(t *testing.T) { diff --git a/outscale/data_source_outscale_volume.go b/outscale/data_source_outscale_volume.go index 68d5e78da..bfcc16806 100644 --- a/outscale/data_source_outscale_volume.go +++ b/outscale/data_source_outscale_volume.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cast" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_volume_test.go b/outscale/data_source_outscale_volume_test.go index cfa21c497..2aba545a1 100644 --- a/outscale/data_source_outscale_volume_test.go +++ b/outscale/data_source_outscale_volume_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_volumes.go b/outscale/data_source_outscale_volumes.go index 16e57eafb..684fd881f 100644 --- a/outscale/data_source_outscale_volumes.go +++ b/outscale/data_source_outscale_volumes.go @@ -10,8 +10,8 @@ import ( "github.com/terraform-providers/terraform-provider-outscale/utils" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func datasourceOutscaleOAPIVolumes() *schema.Resource { diff --git a/outscale/data_source_outscale_volumes_test.go b/outscale/data_source_outscale_volumes_test.go index b2a6e8da0..529bee4e2 100644 --- a/outscale/data_source_outscale_volumes_test.go +++ b/outscale/data_source_outscale_volumes_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_vpn_connection.go b/outscale/data_source_outscale_vpn_connection.go index 323da2f34..0124e191e 100644 --- a/outscale/data_source_outscale_vpn_connection.go +++ b/outscale/data_source_outscale_vpn_connection.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func dataSourceOutscaleVPNConnection() *schema.Resource { diff --git a/outscale/data_source_outscale_vpn_connection_test.go b/outscale/data_source_outscale_vpn_connection_test.go index 44605d8b4..7be9d0fd7 100644 --- a/outscale/data_source_outscale_vpn_connection_test.go +++ b/outscale/data_source_outscale_vpn_connection_test.go @@ -4,8 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -41,30 +40,30 @@ func TestAccOthers_VPNConnectionDataSource_withFilters(t *testing.T) { func testAccOutscaleVPNConnectionDataSourceConfigBasic(publicIP string) string { return fmt.Sprintf(` - resource "outscale_virtual_gateway" "virtual_gateway" { + resource "outscale_virtual_gateway" "virtual_gateway1" { connection_type = "ipsec.1" } - resource "outscale_client_gateway" "customer_gateway" { + resource "outscale_client_gateway" "customer_gateway1" { bgp_asn = 3 public_ip = "%s" connection_type = "ipsec.1" } - resource "outscale_vpn_connection" "foo" { - client_gateway_id = "${outscale_client_gateway.customer_gateway.id}" - virtual_gateway_id = "${outscale_virtual_gateway.virtual_gateway.id}" + resource "outscale_vpn_connection" "foo1" { + client_gateway_id = outscale_client_gateway.customer_gateway1.id + virtual_gateway_id = outscale_virtual_gateway.virtual_gateway1.id connection_type = "ipsec.1" static_routes_only = true tags { - key = "Name" - value = "test-VPN" + key = "Name" + value = "test-VPN" } } data "outscale_vpn_connection" "test" { - vpn_connection_id = "${outscale_vpn_connection.foo.id}" + vpn_connection_id = outscale_vpn_connection.foo1.id } `, publicIP) } @@ -82,8 +81,8 @@ func testAccOutscaleVPNConnectionDataSourceConfigWithFilters(publicIP string) st } resource "outscale_vpn_connection" "foo" { - client_gateway_id = "${outscale_client_gateway.customer_gateway.id}" - virtual_gateway_id = "${outscale_virtual_gateway.virtual_gateway.id}" + client_gateway_id = outscale_client_gateway.customer_gateway.id + virtual_gateway_id = outscale_virtual_gateway.virtual_gateway.id connection_type = "ipsec.1" static_routes_only = true } @@ -91,7 +90,7 @@ func testAccOutscaleVPNConnectionDataSourceConfigWithFilters(publicIP string) st data "outscale_vpn_connection" "test" { filter { name = "vpn_connection_ids" - values = ["${outscale_vpn_connection.foo.id}"] + values = [outscale_vpn_connection.foo.id] } } `, publicIP) diff --git a/outscale/data_source_outscale_vpn_connections.go b/outscale/data_source_outscale_vpn_connections.go index 4f3b3802a..4320adc61 100644 --- a/outscale/data_source_outscale_vpn_connections.go +++ b/outscale/data_source_outscale_vpn_connections.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_outscale_vpn_connections_test.go b/outscale/data_source_outscale_vpn_connections_test.go index 187c76a76..f659f7e71 100644 --- a/outscale/data_source_outscale_vpn_connections_test.go +++ b/outscale/data_source_outscale_vpn_connections_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/data_source_quota.go b/outscale/data_source_quota.go new file mode 100644 index 000000000..78c97039c --- /dev/null +++ b/outscale/data_source_quota.go @@ -0,0 +1,306 @@ +package outscale + +import ( + "context" + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-go/tftypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + oscgo "github.com/outscale/osc-sdk-go/v2" + "github.com/terraform-providers/terraform-provider-outscale/utils" +) + +var ( + _ datasource.DataSource = &dataSourceQuota{} + _ datasource.DataSourceWithConfigure = &dataSourceQuota{} +) + +func NewDataSourceQuota() datasource.DataSource { + return &dataSourceQuota{} +} + +func (d *dataSourceQuota) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + + if req.ProviderData == nil { + return + } + client := req.ProviderData.(OutscaleClient_fw) + d.Client = client.OSCAPI +} + +// ExampleDataSource defines the data source implementation. +type dataSourceQuota struct { + Client *oscgo.APIClient +} + +// ExampleDataSourceModel describes the data source data model. +type quotaModel struct { + //ConfigurableAttribute types.String `tfsdk:"configurable_attribute"` + Id types.String `tfsdk:"id"` + Filter types.Set `tfsdk:"filter"` + Name types.String `tfsdk:"name"` + Description types.String `tfsdk:"description"` + MaxValue types.Int64 `tfsdk:"max_value"` + UsedValue types.Int64 `tfsdk:"used_value"` + QuotaType types.String `tfsdk:"quota_type"` + QuotaCollection types.String `tfsdk:"quota_collection"` + ShortDescription types.String `tfsdk:"short_description"` + AccountId types.String `tfsdk:"account_id"` + RequestId types.String `tfsdk:"request_id"` +} + +func FwDataSourceFiltersSchema() *schema.SetNestedBlock { + return &schema.SetNestedBlock{ + Validators: []validator.Set{ + setvalidator.IsRequired(), + }, + NestedObject: schema.NestedBlockObject{ + Attributes: map[string]schema.Attribute{ + "name": schema.StringAttribute{ + Required: true, + }, + "values": schema.SetAttribute{ + ElementType: types.StringType, + Required: true, + Validators: []validator.Set{ + setvalidator.SizeAtLeast(1), + }, + }, + }, + }, + } +} + +func (d *dataSourceQuota) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_quota" +} + +func (d *dataSourceQuota) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = schema.Schema{ + Blocks: map[string]schema.Block{ + "filter": FwDataSourceFiltersSchema(), + }, + Attributes: map[string]schema.Attribute{ + "name": schema.StringAttribute{ + Computed: true, + }, + "description": schema.StringAttribute{ + Computed: true, + }, + "max_value": schema.Int64Attribute{ + Computed: true, + }, + "used_value": schema.Int64Attribute{ + Computed: true, + }, + "quota_type": schema.StringAttribute{ + Computed: true, + }, + "quota_collection": schema.StringAttribute{ + Computed: true, + }, + "short_description": schema.StringAttribute{ + Computed: true, + }, + "id": schema.StringAttribute{ + Computed: true, + }, + "request_id": schema.StringAttribute{ + Computed: true, + }, + "account_id": schema.StringAttribute{ + Computed: true, + }, + }, + } +} + +func (d *dataSourceQuota) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + reqApi := oscgo.ReadQuotasRequest{} + mapTftypes := map[string]tftypes.Value{} + var respApi oscgo.ReadQuotasResponse + var quota oscgo.Quota + var quotaType oscgo.QuotaTypes + var dataState quotaModel + var filters *oscgo.FiltersQuota + var listFilters []tftypes.Value + var diags diag.Diagnostics + var flatenFilters basetypes.SetValue + + err := req.Config.Raw.As(&mapTftypes) + if err != nil { + goto CHECK_ERR + } + err = mapTftypes["filter"].As(&listFilters) + if err != nil { + goto CHECK_ERR + } + filters, err = buildOutscaleQuotaDataSourceFilters(listFilters) + if err != nil { + goto CHECK_ERR + } + reqApi.Filters = filters + + err = resource.Retry(120*time.Second, func() *resource.RetryError { + var err error + rp, httpResp, err := d.Client.QuotaApi.ReadQuotas(context.Background()).ReadQuotasRequest(reqApi).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + respApi = rp + return nil + }) + if err != nil { + goto CHECK_ERR + } + if len(respApi.GetQuotaTypes()) == 0 { + err = fmt.Errorf("no matching quotas type found") + goto CHECK_ERR + } + if len(respApi.GetQuotaTypes()) > 1 { + err = fmt.Errorf("multiple quotas type matched; use additional constraints to reduce matches to a single quotaType") + goto CHECK_ERR + } + quotaType = respApi.GetQuotaTypes()[0] + if len(quotaType.GetQuotas()) == 0 { + err = fmt.Errorf("no matching quotas found") + goto CHECK_ERR + } + + if len(quotaType.GetQuotas()) > 1 { + err = fmt.Errorf("multiple quotas matched; use additional constraints to reduce matches to a single quotaType") + goto CHECK_ERR + } + + flatenFilters, diags = flatenQuotaDataSourceFilters(listFilters) + resp.Diagnostics.Append(diags...) + + if resp.Diagnostics.HasError() { + return + } + + quota = quotaType.GetQuotas()[0] + dataState.QuotaType = types.StringValue(quotaType.GetQuotaType()) + dataState.Name = types.StringValue(quota.GetName()) + dataState.Description = types.StringValue(quota.GetDescription()) + dataState.MaxValue = types.Int64Value(int64(quota.GetMaxValue())) + dataState.UsedValue = types.Int64Value(int64(quota.GetUsedValue())) + dataState.QuotaCollection = types.StringValue(quota.GetQuotaCollection()) + dataState.ShortDescription = types.StringValue(quota.GetShortDescription()) + dataState.AccountId = types.StringValue(quota.GetAccountId()) + dataState.Filter = flatenFilters + dataState.Id = types.StringValue(resource.UniqueId()) + dataState.RequestId = types.StringValue(respApi.ResponseContext.GetRequestId()) + diags = resp.State.Set(ctx, &dataState) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + +CHECK_ERR: + if err != nil { // resp.Diagnostics.HasError() { + resp.Diagnostics.AddError( + "Unable to Read Outscale Quotas", + "If the error is not clear, please contact the provider developers.\n\n"+ + "Outscale Client Error: "+err.Error(), + ) + + //resp.Diagnostics.Append(err...) + if resp.Diagnostics.HasError() { + return + } + } +} + +func buildOutscaleQuotaDataSourceFilters(listFilters []tftypes.Value) (*oscgo.FiltersQuota, error) { + var filters oscgo.FiltersQuota + + for _, val := range listFilters { + var mapFilters map[string]tftypes.Value + val.As(&mapFilters) + var name string + mapFilters["name"].As(&name) + var listValues []tftypes.Value + mapFilters["values"].As(&listValues) + var filterValues []string + for _, val := range listValues { + var value string + val.As(&value) + filterValues = append(filterValues, value) + } + switch name { + case "quota_types": + filters.QuotaTypes = &filterValues + case "quota_names": + filters.QuotaNames = &filterValues + case "collections": + filters.Collections = &filterValues + case "short_descriptions": + filters.ShortDescriptions = &filterValues + default: + log.Printf("[Debug] Unknown Filter Name: %s.", name) + } + } + return &filters, nil +} + +func flatenQuotaDataSourceFilters(listFilters []tftypes.Value) (basetypes.SetValue, diag.Diagnostics) { + var setfil []attr.Value + var setValue basetypes.SetValue + var diags diag.Diagnostics + + filtersValuesType := basetypes.ObjectType{ + AttrTypes: map[string]attr.Type{ + "name": basetypes.StringType{}, + "values": basetypes.SetType{ElemType: basetypes.StringType{}}, + }, + } + mapObjectType := make(map[string]attr.Type) + mapObjectType["values"] = basetypes.SetType{ElemType: basetypes.StringType{}} + mapObjectType["name"] = basetypes.StringType{} + + for _, val := range listFilters { + var mapFilters map[string]tftypes.Value + val.As(&mapFilters) + mapObject := make(map[string]attr.Value) + var name string + mapFilters["name"].As(&name) + mapObject["name"] = types.StringValue(name) + + var listValues []tftypes.Value + mapFilters["values"].As(&listValues) + var nSet []attr.Value + for _, val := range listValues { + var value string + val.As(&value) + + nSet = append(nSet, types.StringValue(value)) + } + filtersNameType := basetypes.StringType{} + obt, diag := types.SetValue(filtersNameType, nSet) + if diag != nil { + return setValue, diag + } + mapObject["values"] = obt + retOK, diag := types.ObjectValue(mapObjectType, mapObject) + if diag != nil { + return setValue, diag + } + setfil = append(setfil, retOK) + } + setValue, diags = types.SetValue(filtersValuesType, setfil) + if diags != nil { + return setValue, diags + } + return setValue, nil +} diff --git a/outscale/data_source_quota_test.go b/outscale/data_source_quota_test.go new file mode 100644 index 000000000..8b80e609f --- /dev/null +++ b/outscale/data_source_quota_test.go @@ -0,0 +1,36 @@ +package outscale + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/terraform-providers/terraform-provider-outscale/version" +) + +func TestAccFwOthers_DataSourceQuota(t *testing.T) { + + t.Parallel() + resource.Test(t, resource.TestCase{ + ProtoV5ProviderFactories: map[string]func() (tfprotov5.ProviderServer, error){ + // new() is an example function that returns a provider.Provider + "outscale": providerserver.NewProtocol5WithError(New(version.GetVersion())), + }, + PreCheck: func() { TestAccFwPreCheck(t) }, + Steps: []resource.TestStep{ + { + Config: testAccFwDataSourceOutscaleOAPIQuotaConfig, + Check: resource.ComposeTestCheckFunc(), + }, + }, + }) +} + +const testAccFwDataSourceOutscaleOAPIQuotaConfig = ` + data "outscale_quota" "lbuQuota1" { + filter { + name = "quota_names" + values = ["lb_listeners_limit"] + } + }` diff --git a/outscale/framework_config.go b/outscale/framework_config.go new file mode 100644 index 000000000..55abdc3ed --- /dev/null +++ b/outscale/framework_config.go @@ -0,0 +1,104 @@ +package outscale + +import ( + "context" + "crypto/tls" + "fmt" + "net/http" + + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + oscgo "github.com/outscale/osc-sdk-go/v2" + "github.com/terraform-providers/terraform-provider-outscale/utils" + "github.com/terraform-providers/terraform-provider-outscale/version" +) + +// OutscaleClient client +type OutscaleClient_fw struct { + OSCAPI *oscgo.APIClient +} + +// Client ... +func (c *frameworkProvider) Client_fw(ctx context.Context, data *ProviderModel, diags *diag.Diagnostics) (*OutscaleClient_fw, error) { + + //setdefaut environnemant varibles + setDefaultEnv(data) + tlsconfig := &tls.Config{InsecureSkipVerify: c.insecure} + cert, err := tls.LoadX509KeyPair(data.X509CertPath.ValueString(), data.X509KeyPath.ValueString()) + if err == nil { + tlsconfig = &tls.Config{ + InsecureSkipVerify: false, + Certificates: []tls.Certificate{cert}, + } + } + + skipClient := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: tlsconfig, + Proxy: http.ProxyFromEnvironment, + }, + } + + skipClient.Transport = logging.NewTransport("Outscale", skipClient.Transport) + + skipClient.Transport = NewTransport(data.AccessKeyId.ValueString(), data.SecretKeyId.ValueString(), data.Region.ValueString(), skipClient.Transport) + + basePath := fmt.Sprintf("api.%s.outscale.com", data.Region.ValueString()) + fmt.Printf("\n CONF_CLI: basePath= %##++v\n", basePath) + if endpoint, ok := data.Endpoints["api"]; ok { + basePath = endpoint.(string) + } + fmt.Printf("\n APRES CONF_CLI: basePath= %##++v\n", basePath) + + oscConfig := oscgo.NewConfiguration() + oscConfig.Debug = true + oscConfig.HTTPClient = skipClient + oscConfig.Host = basePath + oscConfig.UserAgent = fmt.Sprintf("terraform-provider-outscale/%s", version.GetVersion()) + + oscClient := oscgo.NewAPIClient(oscConfig) + + client := &OutscaleClient_fw{ + OSCAPI: oscClient, + } + return client, nil +} + +func setDefaultEnv(data *ProviderModel) { + if data.AccessKeyId.IsNull() { + if accessKeyId := utils.GetEnvVariableValue([]string{"OSC_ACCESS_KEY", "OUTSCALE_ACCESSKEYID"}); accessKeyId != "" { + data.AccessKeyId = types.StringValue(accessKeyId) + } + } + if data.SecretKeyId.IsNull() { + if secretKeyId := utils.GetEnvVariableValue([]string{"OSC_SECRET_KEY", "OUTSCALE_SECRETKEYID"}); secretKeyId != "" { + data.SecretKeyId = types.StringValue(secretKeyId) + } + } + + if data.Region.IsNull() { + if region := utils.GetEnvVariableValue([]string{"OSC_REGION", "OUTSCALE_REGION"}); region != "" { + data.Region = types.StringValue(region) + } + } + + if data.X509CertPath.IsNull() { + if x509Cert := utils.GetEnvVariableValue([]string{"OSC_X509_CLIENT_CERT", "OUTSCALE_X509CERT"}); x509Cert != "" { + data.X509CertPath = types.StringValue(x509Cert) + } + } + + if data.X509KeyPath.IsNull() { + if x509Key := utils.GetEnvVariableValue([]string{"OSC_X509_CLIENT_KEY", "OUTSCALE_X509KEY"}); x509Key != "" { + data.X509KeyPath = types.StringValue(x509Key) + } + } + /* + if data.Endpoints.IsNull() { + if endpoints := getEnvVariableValue([]string{"OSC_ENDPOINT_API", "OUTSCALE_OAPI_URL"}); endpoints != "" { + data.Endpoints = types.StringValue(endpoints) + } + } + */ +} diff --git a/outscale/framework_provider.go b/outscale/framework_provider.go new file mode 100644 index 000000000..d6e125dcc --- /dev/null +++ b/outscale/framework_provider.go @@ -0,0 +1,204 @@ +package outscale + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/provider/schema" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +var ( + _ provider.Provider = &frameworkProvider{} + endpointFwServiceNames []string +) + +func init() { + endpointFwServiceNames = []string{ + "api", + } +} + +func New(version string) provider.Provider { + return &frameworkProvider{ + version: version, + } +} + +type frameworkProvider struct { + accessKeyId types.String + secretKeyId types.String + region types.String + endpoints map[string]interface{} + x509CertPath string + x509KeyPath string + insecure bool + version string +} + +type ProviderModel struct { + AccessKeyId types.String `tfsdk:"access_key_id"` + SecretKeyId types.String `tfsdk:"secret_key_id"` + Region types.String `tfsdk:"region"` + Endpoints map[string]interface{} `tfsdk:"endpoints"` + X509CertPath types.String `tfsdk:"x509_cert_path"` + X509KeyPath types.String `tfsdk:"x509_key_path"` + Insecure types.Bool `tfsdk:"insecure"` +} + +func (p *frameworkProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse) { + resp.TypeName = "outscale" + resp.Version = p.version +} + +func (p *frameworkProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "access_key_id": schema.StringAttribute{ + Optional: true, + Description: "The Access Key ID for API operations.", + }, + "secret_key_id": schema.StringAttribute{ + Optional: true, + Description: "The Secret Key ID for API operations.", + }, + "region": schema.StringAttribute{ + Optional: true, + Description: "The Region for API operations.", + }, + "x509_cert_path": schema.StringAttribute{ + Optional: true, + Description: "The path to your x509 cert", + }, + "x509_key_path": schema.StringAttribute{ + Optional: true, + Description: "The path to your x509 key", + }, + "insecure": schema.BoolAttribute{ + Optional: true, + Description: "tls insecure connection", + }, + }, + Blocks: map[string]schema.Block{ + "endpoints": endpointsFwSchema(), + }, + } +} + +/* + func (p *frameworkProvider) MetaSchema(_ context.Context, _ provider.MetaSchemaRequest, resp *provider.MetaSchemaResponse) { + resp.Schema = metaschema.Schema{ + Attributes: map[string]metaschema.Attribute{ + "module_name": metaschema.StringAttribute{ + Optional: true, + }, + }, + } + } +*/ +func (p *frameworkProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { + + var config ProviderModel + + diags := req.Config.Get(ctx, &config) + resp.Diagnostics.Append(diags...) + + if resp.Diagnostics.HasError() { + return + } + + // If practitioner provided a configuration value for any of the + // attributes, it must be a known value. + + if config.AccessKeyId.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("access_key_id"), + "Unknown Outscale API AccessKeyId", + "The provider cannot create the Outscale API client as there is an unknown configuration value for the Outscale API access_key_id. "+ + "Either target apply the source Outscale of the value first, set the value statically in the configuration, or use the 'OSC_ACCESS_KEY or OUTSCALE_ACCESSKEYID' environment variable.", + ) + } + + if config.SecretKeyId.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("secret_key_id"), + "Unknown HashiCups API SecretKeyId", + "The provider cannot create the Outscale API client as there is an unknown configuration value for the Outscale API secret_key_id. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the 'OSC_SECRET_KEY or OUTSCALE_SECRETKEYID' environment variable.", + ) + } + + if config.Region.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("region"), + "Unknown Outscale API Region", + "The provider cannot create the Outscale API client as there is an unknown configuration value for the Outscale API region. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the 'OSC_REGION or OUTSCALE_REGION' environment variable.", + ) + } + if config.X509CertPath.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("x509_cert_path"), + "Unknown Outscale API X509CertPath", + "The provider cannot create the Outscale API client as there is an unknown configuration value for the Outscale API x509_cert_path. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the 'OSC_X509_CLIENT_CERT or OUTSCALE_X509CERT' environment variable.", + ) + } + + if config.X509KeyPath.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("x509_key_path"), + "Unknown Outscale API X509KeyPath", + "The provider cannot create the Outscale API client as there is an unknown configuration value for the Outscale API x509_key_path. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the 'OSC_X509_CLIENT_KEY or OUTSCALE_X509KEY' environment variable.", + ) + } + + if resp.Diagnostics.HasError() { + return + } + client, err := p.Client_fw(ctx, &config, &diags) + if err != nil { + resp.Diagnostics.AddError( + "Unable to Create Outscale API Client", + "An unexpected error occurred when creating the Outscale API client. "+ + "If the error is not clear, please contact the provider developers.\n\n"+ + "Outscale Client Error: "+err.Error(), + ) + return + } + resp.DataSourceData = *client + resp.ResourceData = *client +} + +func (p *frameworkProvider) DataSources(ctx context.Context) []func() datasource.DataSource { + return []func() datasource.DataSource{ + NewDataSourceQuota, + } +} + +func (p *frameworkProvider) Resources(ctx context.Context) []func() resource.Resource { + /*return []func() resource.Resource{ + NewResource, + }*/ + return nil +} + +func endpointsFwSchema() schema.SetNestedBlock { + endpointsAttributes := make(map[string]schema.Attribute) + + for _, serviceKey := range endpointFwServiceNames { + endpointsAttributes[serviceKey] = schema.StringAttribute{ + Optional: true, + Description: "Use this to override the default service endpoint URL", + } + } + return schema.SetNestedBlock{ + NestedObject: schema.NestedBlockObject{ + Attributes: endpointsAttributes, + }, + } +} diff --git a/outscale/framework_provider_test.go b/outscale/framework_provider_test.go new file mode 100644 index 000000000..e8bec1a8b --- /dev/null +++ b/outscale/framework_provider_test.go @@ -0,0 +1,100 @@ +package outscale + +import ( + "context" + "os" + "testing" + + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + vers "github.com/terraform-providers/terraform-provider-outscale/version" +) + +func TestFwProvider_impl(t *testing.T) { + var _ provider.Provider = New(vers.GetVersion()) +} + +func TestAccFwPreCheck(t *testing.T) { + if os.Getenv("OUTSCALE_ACCESSKEYID") == "" || + os.Getenv("OUTSCALE_REGION") == "" || + os.Getenv("OUTSCALE_SECRETKEYID") == "" || + os.Getenv("OUTSCALE_IMAGEID") == "" || + os.Getenv("OUTSCALE_ACCOUNT") == "" { + t.Fatal("`OUTSCALE_ACCESSKEYID`, `OUTSCALE_SECRETKEYID`, `OUTSCALE_REGION`, `OUTSCALE_ACCOUNT` and `OUTSCALE_IMAGEID` must be set for acceptance testing") + } +} + +func TestMuxServer(t *testing.T) { + resource.Test(t, resource.TestCase{ + ProtoV5ProviderFactories: map[string]func() (tfprotov5.ProviderServer, error){ + "outscale": func() (tfprotov5.ProviderServer, error) { + ctx := context.Background() + providers := []func() tfprotov5.ProviderServer{ + providerserver.NewProtocol5(New(vers.GetVersion())), // Example terraform-plugin-framework provider + Provider().GRPCProvider, // Example terraform-plugin-sdk provider + } + + muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil + }, + }, + Steps: []resource.TestStep{ + { + Config: fwtestAccDataSourceOutscaleOAPIQuotaConfig, + }, + }, + }) +} + +func TestDataSource_UpgradeFromVersion(t *testing.T) { + resource.Test(t, resource.TestCase{ + Steps: []resource.TestStep{ + { + ExternalProviders: map[string]resource.ExternalProvider{ + "outscale": { + VersionConstraint: "0.10.0", + Source: "outscale/outscale", + }, + }, + Config: fwtestAccDataSourceOutscaleOAPIQuotaConfig, + }, + { + ProtoV5ProviderFactories: map[string]func() (tfprotov5.ProviderServer, error){ + "outscale": func() (tfprotov5.ProviderServer, error) { + ctx := context.Background() + providers := []func() tfprotov5.ProviderServer{ + providerserver.NewProtocol5(New(vers.GetVersion())), // Example terraform-plugin-framework provider + Provider().GRPCProvider, // Example terraform-plugin-sdk provider + } + + muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil + }, + }, + Config: fwtestAccDataSourceOutscaleOAPIQuotaConfig, + PlanOnly: true, + }, + }, + }) +} + +const fwtestAccDataSourceOutscaleOAPIQuotaConfig = ` + data "outscale_quota" "lbuquota1" { + filter { + name = "quota_names" + values = ["lb_listeners_limit"] + } +} +` diff --git a/outscale/import_outscale_net_attributes_test.go b/outscale/import_outscale_net_attributes_test.go index 4ab74b0f8..a6b5333be 100644 --- a/outscale/import_outscale_net_attributes_test.go +++ b/outscale/import_outscale_net_attributes_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_Attr_import(t *testing.T) { diff --git a/outscale/instance_set_set.go b/outscale/instance_set_set.go index ac97cf57c..899a1d233 100644 --- a/outscale/instance_set_set.go +++ b/outscale/instance_set_set.go @@ -3,11 +3,10 @@ package outscale import ( "bytes" "fmt" - "strconv" - "github.com/hashicorp/terraform-plugin-sdk/helper/hashcode" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" + "github.com/terraform-providers/terraform-provider-outscale/utils" ) func getOAPISecurityGroups(groups []oscgo.SecurityGroupLight) (SecurityGroup []map[string]interface{}, SecurityGroupIds []string) { @@ -30,15 +29,24 @@ func getOAPILinkNicLight(l oscgo.LinkNicLight) []map[string]interface{} { }} } -func getOAPILinkNic(l oscgo.LinkNic) map[string]interface{} { - return map[string]interface{}{ - "delete_on_vm_deletion": strconv.FormatBool(l.GetDeleteOnVmDeletion()), - "device_number": fmt.Sprintf("%d", l.GetDeviceNumber()), +func getOAPILinkNic(l oscgo.LinkNic) []map[string]interface{} { + return []map[string]interface{}{{ + "delete_on_vm_deletion": l.GetDeleteOnVmDeletion(), + "device_number": l.GetDeviceNumber(), "link_nic_id": l.GetLinkNicId(), "state": l.GetState(), "vm_account_id": l.GetVmAccountId(), "vm_id": l.GetVmId(), - } + }} +} + +func getOAPIBsuSet(bsu oscgo.BsuCreated) []map[string]interface{} { + return []map[string]interface{}{{ + "delete_on_vm_deletion": bsu.GetDeleteOnVmDeletion(), + "link_date": bsu.GetLinkDate(), + "state": bsu.GetState(), + "volume_id": bsu.GetVolumeId(), + }} } func getOAPILinkPublicIPLight(l oscgo.LinkPublicIpLightForVm) *schema.Set { @@ -48,7 +56,7 @@ func getOAPILinkPublicIPLight(l oscgo.LinkPublicIpLightForVm) *schema.Set { m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["public_ip"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["public_ip_account_id"].(string))) - return hashcode.String(buf.String()) + return utils.String(buf.String()) }, } @@ -77,7 +85,7 @@ func getOAPIPrivateIPsLight(privateIPs []oscgo.PrivateIpLightForVm) *schema.Set m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["private_ip"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["private_dns_name"].(string))) - return hashcode.String(buf.String()) + return utils.String(buf.String()) }, } @@ -99,12 +107,15 @@ func getOAPIPrivateIPsLight(privateIPs []oscgo.PrivateIpLightForVm) *schema.Set func getOAPIPrivateIPs(privateIPs []oscgo.PrivateIp) (res []map[string]interface{}) { for _, p := range privateIPs { - res = append(res, map[string]interface{}{ + r := map[string]interface{}{ "is_primary": p.GetIsPrimary(), - "link_public_ip": getOAPILinkPublicIP(p.GetLinkPublicIp()), "private_dns_name": p.GetPrivateDnsName(), "private_ip": p.GetPrivateIp(), - }) + } + if _, ok := p.GetLinkPublicIpOk(); ok { + r["link_public_ip"] = getOAPILinkPublicIP(p.GetLinkPublicIp()) + } + res = append(res, r) } return } @@ -152,14 +163,13 @@ func getOAPIVMNetworkInterfaceLightSet(nics []oscgo.NicLight) (primaryNic []map[ } func getOAPIVMNetworkInterfaceSet(nics []oscgo.Nic) (res []map[string]interface{}) { + for _, nic := range nics { securityGroups, _ := getOAPISecurityGroups(*nic.SecurityGroups) - res = append(res, map[string]interface{}{ + r := map[string]interface{}{ "account_id": nic.GetAccountId(), "description": nic.GetDescription(), "is_source_dest_checked": nic.GetIsSourceDestChecked(), - "link_nic": getOAPILinkNic(nic.GetLinkNic()), - "link_public_ip": getOAPILinkPublicIP(nic.GetLinkPublicIp()), "mac_address": nic.GetMacAddress(), "net_id": nic.GetNetId(), "nic_id": nic.GetNicId(), @@ -170,7 +180,15 @@ func getOAPIVMNetworkInterfaceSet(nics []oscgo.Nic) (res []map[string]interface{ "subnet_id": nic.GetSubnetId(), "subregion_name": nic.GetSubregionName(), "tags": getOapiTagSet(nic.Tags), - }) + } + if _, ok := nic.GetLinkNicOk(); ok { + r["link_nic"] = getOAPILinkNic(nic.GetLinkNic()) + } + if _, ok := nic.GetLinkPublicIpOk(); ok { + r["link_public_ip"] = getOAPILinkPublicIP(nic.GetLinkPublicIp()) + } + res = append(res, r) } + return } diff --git a/outscale/oapi_tags.go b/outscale/oapi_tags.go index ae7530e0a..ebf38757b 100644 --- a/outscale/oapi_tags.go +++ b/outscale/oapi_tags.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/provider.go b/outscale/provider.go index 7ed82e53c..d456fdb63 100644 --- a/outscale/provider.go +++ b/outscale/provider.go @@ -1,8 +1,8 @@ package outscale import ( - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/terraform-providers/terraform-provider-outscale/utils" ) var endpointServiceNames []string @@ -14,38 +14,33 @@ func init() { } // Provider ... -func Provider() terraform.ResourceProvider { +func Provider() *schema.Provider { return &schema.Provider{ Schema: map[string]*schema.Schema{ "access_key_id": { Type: schema.TypeString, - Required: true, - DefaultFunc: schema.EnvDefaultFunc("OUTSCALE_ACCESSKEYID", nil), + Optional: true, Description: "The Access Key ID for API operations.", }, "secret_key_id": { Type: schema.TypeString, - Required: true, - DefaultFunc: schema.EnvDefaultFunc("OUTSCALE_SECRETKEYID", nil), + Optional: true, Description: "The Secret Key ID for API operations.", }, "region": { Type: schema.TypeString, - Required: true, - DefaultFunc: schema.EnvDefaultFunc("OUTSCALE_REGION", nil), + Optional: true, Description: "The Region for API operations.", }, "endpoints": endpointsSchema(), "x509_cert_path": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("OUTSCALE_X509CERT", nil), Description: "The path to your x509 cert", }, "x509_key_path": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("OUTSCALE_X509KEY", nil), Description: "The path to your x509 key", }, "insecure": { @@ -169,7 +164,6 @@ func Provider() terraform.ResourceProvider { "outscale_flexible_gpu_catalog": dataSourceOutscaleOAPIFlexibleGpuCatalog(), "outscale_product_type": dataSourceOutscaleOAPIProductType(), "outscale_product_types": dataSourceOutscaleOAPIProductTypes(), - "outscale_quota": dataSourceOutscaleOAPIQuota(), "outscale_quotas": dataSourceOutscaleOAPIQuotas(), "outscale_image_export_task": dataSourceOutscaleOAPIImageExportTask(), "outscale_image_export_tasks": dataSourceOutscaleOAPIImageExportTasks(), @@ -202,6 +196,7 @@ func providerConfigureClient(d *schema.ResourceData) (interface{}, error) { Insecure: d.Get("insecure").(bool), } + setProviderDefaultEnv(&config) endpointsSet := d.Get("endpoints").(*schema.Set) for _, endpointsSetI := range endpointsSet.List() { @@ -210,7 +205,6 @@ func providerConfigureClient(d *schema.ResourceData) (interface{}, error) { config.Endpoints[endpointServiceName] = endpoints[endpointServiceName].(string) } } - return config.Client() } @@ -234,3 +228,42 @@ func endpointsSchema() *schema.Schema { }, } } + +func setProviderDefaultEnv(conf *Config) { + if conf.AccessKeyID == "" { + if accessKeyId := utils.GetEnvVariableValue([]string{"OSC_ACCESS_KEY", "OUTSCALE_ACCESSKEYID"}); accessKeyId != "" { + conf.AccessKeyID = accessKeyId + } + } + if conf.SecretKeyID == "" { + if secretKeyId := utils.GetEnvVariableValue([]string{"OSC_SECRET_KEY", "OUTSCALE_SECRETKEYID"}); secretKeyId != "" { + conf.SecretKeyID = secretKeyId + } + } + + if conf.Region == "" { + if region := utils.GetEnvVariableValue([]string{"OSC_REGION", "OUTSCALE_REGION"}); region != "" { + conf.Region = region + } + } + + if conf.X509cert == "" { + if x509Cert := utils.GetEnvVariableValue([]string{"OSC_X509_CLIENT_CERT", "OUTSCALE_X509CERT"}); x509Cert != "" { + conf.X509cert = x509Cert + } + } + + if conf.X509key == "" { + if x509Key := utils.GetEnvVariableValue([]string{"OSC_X509_CLIENT_KEY", "OUTSCALE_X509KEY"}); x509Key != "" { + conf.X509key = x509Key + } + } + + /* + if data.Endpoints.IsNull() { + if endpoints := getEnvVariableValue([]string{"OSC_ENDPOINT_API", "OUTSCALE_OAPI_URL"}); endpoints != "" { + data.Endpoints = types.StringValue(endpoints) + } + } + */ +} diff --git a/outscale/provider_test.go b/outscale/provider_test.go index 0b60b43a5..8534956ff 100644 --- a/outscale/provider_test.go +++ b/outscale/provider_test.go @@ -4,32 +4,31 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/terraform-providers/terraform-provider-outscale/utils" ) -var testAccProviders map[string]terraform.ResourceProvider +var testAccProviders map[string]*schema.Provider var testAccProvider *schema.Provider func init() { - testAccProvider = Provider().(*schema.Provider) + testAccProvider = Provider() - testAccProviders = map[string]terraform.ResourceProvider{ + testAccProviders = map[string]*schema.Provider{ "outscale": testAccProvider, } } func TestProvider(t *testing.T) { - if err := Provider().(*schema.Provider).InternalValidate(); err != nil { + if err := Provider().InternalValidate(); err != nil { t.Fatalf("err: %s", err) } } func TestProvider_impl(t *testing.T) { - var _ terraform.ResourceProvider = Provider() + var _ *schema.Provider = Provider() } func testAccPreCheck(t *testing.T) { @@ -41,3 +40,13 @@ func testAccPreCheck(t *testing.T) { t.Fatal("`OUTSCALE_ACCESSKEYID`, `OUTSCALE_SECRETKEYID`, `OUTSCALE_REGION`, `OUTSCALE_ACCOUNT` and `OUTSCALE_IMAGEID` must be set for acceptance testing") } } + +func testAccPreCheckValues(t *testing.T) { + if utils.GetEnvVariableValue([]string{"OSC_ACCESS_KEY", "OUTSCALE_ACCESSKEYID"}) == "" || + utils.GetEnvVariableValue([]string{"OSC_SECRET_KEY", "OUTSCALE_SECRETKEYID"}) == "" || + utils.GetEnvVariableValue([]string{"OSC_REGION", "OUTSCALE_REGION"}) == "" || + utils.GetEnvVariableValue([]string{"OSC_ACCOUNT_ID", "OUTSCALE_ACCOUNT"}) == "" || + utils.GetEnvVariableValue([]string{"OSC_IMAGE_ID", "OUTSCALE_IMAGEID"}) == "" { + t.Fatal("`OSC_ACCESS_KEY`, `OSC_SECRET_KEY`, `OSC_REGION`, `OSC_ACCOUNT_ID` and `OUTSCALE_IMAGEID` must be set for acceptance testing") + } +} diff --git a/outscale/resource_outscale_access_key.go b/outscale/resource_outscale_access_key.go index f93be0d72..12bfa6984 100644 --- a/outscale/resource_outscale_access_key.go +++ b/outscale/resource_outscale_access_key.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" "github.com/nav-inc/datetime" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" diff --git a/outscale/resource_outscale_access_key_test.go b/outscale/resource_outscale_access_key_test.go index c2ddfbd46..8f04a74b7 100644 --- a/outscale/resource_outscale_access_key_test.go +++ b/outscale/resource_outscale_access_key_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_api_access_policy.go b/outscale/resource_outscale_api_access_policy.go index a05df2bef..d36836ab4 100644 --- a/outscale/resource_outscale_api_access_policy.go +++ b/outscale/resource_outscale_api_access_policy.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_api_access_rule.go b/outscale/resource_outscale_api_access_rule.go index 7bfecf1b4..794fda7e3 100644 --- a/outscale/resource_outscale_api_access_rule.go +++ b/outscale/resource_outscale_api_access_rule.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" diff --git a/outscale/resource_outscale_api_access_rule_test.go b/outscale/resource_outscale_api_access_rule_test.go index d041fd27b..83f11377a 100644 --- a/outscale/resource_outscale_api_access_rule_test.go +++ b/outscale/resource_outscale_api_access_rule_test.go @@ -3,19 +3,20 @@ package outscale import ( "context" "fmt" + "os" "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccOthers_AccessRule_basic(t *testing.T) { t.Parallel() resourceName := "outscale_api_access_rule.rule_test" + ca_path := os.Getenv("CA_PATH") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,7 +24,7 @@ func TestAccOthers_AccessRule_basic(t *testing.T) { CheckDestroy: testAccCheckOutscaleApiAccessRuleDestroy, Steps: []resource.TestStep{ { - Config: testAccOutscaleOAPIApiAccessRuleConfig(), + Config: testAccOutscaleOAPIApiAccessRuleConfig(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleApiAccessRuleExists(resourceName), ), @@ -116,10 +117,10 @@ func testAccCheckOutscaleApiAccessRuleDestroy(s *terraform.State) error { return nil } -func testAccOutscaleOAPIApiAccessRuleConfig() string { +func testAccOutscaleOAPIApiAccessRuleConfig(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_rule" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%q) description = "Ca testacc create" } @@ -127,6 +128,5 @@ resource "outscale_api_access_rule" "rule_test" { ca_ids = [outscale_ca.ca_rule.id] ip_ranges = ["192.0.2.0/16"] description = "testing api access rule" -} - `) +}`, path) } diff --git a/outscale/resource_outscale_ca.go b/outscale/resource_outscale_ca.go index dbf61326b..d8b87e7fc 100644 --- a/outscale/resource_outscale_ca.go +++ b/outscale/resource_outscale_ca.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" diff --git a/outscale/resource_outscale_ca_test.go b/outscale/resource_outscale_ca_test.go index 6d0dfdc1e..e0f223047 100644 --- a/outscale/resource_outscale_ca_test.go +++ b/outscale/resource_outscale_ca_test.go @@ -3,19 +3,20 @@ package outscale import ( "context" "fmt" + "os" "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccOthers_Ca_basic(t *testing.T) { t.Parallel() resourceName := "outscale_ca.ca_test" + ca_path := os.Getenv("CA_PATH") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -23,13 +24,13 @@ func TestAccOthers_Ca_basic(t *testing.T) { CheckDestroy: testAccCheckOutscaleCaDestroy, Steps: []resource.TestStep{ { - Config: testAccOutscaleOAPICaConfig(), + Config: testAccOutscaleOAPICaConfig(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleCaExists(resourceName), ), }, { - Config: testAccOutscaleOAPICaConfigUpdateDescription(), + Config: testAccOutscaleOAPICaConfigUpdateDescription(ca_path), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleCaExists(resourceName), ), @@ -121,20 +122,18 @@ func testAccCheckOutscaleCaDestroy(s *terraform.State) error { return nil } -func testAccOutscaleOAPICaConfig() string { +func testAccOutscaleOAPICaConfig(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_test" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%q) description = "Ca testacc create" -} - `) +}`, path) } -func testAccOutscaleOAPICaConfigUpdateDescription() string { +func testAccOutscaleOAPICaConfigUpdateDescription(path string) string { return fmt.Sprintf(` resource "outscale_ca" "ca_test" { - ca_pem = file("./test-cert.pem") + ca_pem = file(%q) description = "Ca testacc update" -} - `) +}`, path) } diff --git a/outscale/resource_outscale_client_gateway.go b/outscale/resource_outscale_client_gateway.go index e5ae75a66..e2765ff6a 100644 --- a/outscale/resource_outscale_client_gateway.go +++ b/outscale/resource_outscale_client_gateway.go @@ -9,8 +9,8 @@ import ( "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" ) diff --git a/outscale/resource_outscale_client_gateway_test.go b/outscale/resource_outscale_client_gateway_test.go index 817758211..2a4447429 100644 --- a/outscale/resource_outscale_client_gateway_test.go +++ b/outscale/resource_outscale_client_gateway_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" diff --git a/outscale/resource_outscale_dhcp_option.go b/outscale/resource_outscale_dhcp_option.go index 6c6cf1ee8..63cb467f0 100644 --- a/outscale/resource_outscale_dhcp_option.go +++ b/outscale/resource_outscale_dhcp_option.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleDHCPOption() *schema.Resource { @@ -162,7 +162,6 @@ func resourceOutscaleDHCPOptionUpdate(d *schema.ResourceData, meta interface{}) if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleDHCPOptionRead(d, meta) } diff --git a/outscale/resource_outscale_dhcp_option_test.go b/outscale/resource_outscale_dhcp_option_test.go index 311688b92..d41ba942d 100644 --- a/outscale/resource_outscale_dhcp_option_test.go +++ b/outscale/resource_outscale_dhcp_option_test.go @@ -11,9 +11,9 @@ import ( "github.com/openlyinc/pointy" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" ) diff --git a/outscale/resource_outscale_flexible_gpu.go b/outscale/resource_outscale_flexible_gpu.go index ebb5837a6..d546999c7 100644 --- a/outscale/resource_outscale_flexible_gpu.go +++ b/outscale/resource_outscale_flexible_gpu.go @@ -6,8 +6,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_flexible_gpu_link.go b/outscale/resource_outscale_flexible_gpu_link.go index 4ee4d43d4..e664e328a 100644 --- a/outscale/resource_outscale_flexible_gpu_link.go +++ b/outscale/resource_outscale_flexible_gpu_link.go @@ -7,8 +7,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -16,6 +16,7 @@ func resourceOutscaleOAPIFlexibleGpuLink() *schema.Resource { return &schema.Resource{ Create: resourceOutscaleOAPIFlexibleGpuLinkCreate, Read: resourceOutscaleOAPIFlexibleGpuLinkRead, + Update: resourceFlexibleGpuLinkUpdate, Delete: resourceOutscaleOAPIFlexibleGpuLinkDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -28,10 +29,13 @@ func resourceOutscaleOAPIFlexibleGpuLink() *schema.Resource { }, Schema: map[string]*schema.Schema{ - "flexible_gpu_id": { - Type: schema.TypeString, + "flexible_gpu_ids": { + Type: schema.TypeSet, Required: true, - ForceNew: true, + MinItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, }, "vm_id": { Type: schema.TypeString, @@ -48,61 +52,31 @@ func resourceOutscaleOAPIFlexibleGpuLink() *schema.Resource { func resourceOutscaleOAPIFlexibleGpuLinkCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - - flexGpuID := d.Get("flexible_gpu_id").(string) vmId := d.Get("vm_id").(string) + GpuIdsList := utils.SetToStringSlice(d.Get("flexible_gpu_ids").(*schema.Set)) - filter := &oscgo.FiltersFlexibleGpu{ - FlexibleGpuIds: &[]string{flexGpuID}, - } - reqFlex := &oscgo.ReadFlexibleGpusRequest{ - Filters: filter, - } - reqLink := oscgo.LinkFlexibleGpuRequest{ - FlexibleGpuId: flexGpuID, - VmId: vmId, - } - var resp oscgo.LinkFlexibleGpuResponse - err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { - var err error - rp, httpResp, err := conn.FlexibleGpuApi.LinkFlexibleGpu( - context.Background()).LinkFlexibleGpuRequest(reqLink).Execute() - if err != nil { - return utils.CheckThrottling(httpResp, err) + for _, flexGpuID := range GpuIdsList { + var resp oscgo.LinkFlexibleGpuResponse + reqLink := oscgo.LinkFlexibleGpuRequest{ + FlexibleGpuId: flexGpuID, + VmId: vmId, } - resp = rp - return nil - }) - - if err != nil { - return fmt.Errorf("Error Link flexibe gpu: %s", err.Error()) - } - - if !resp.HasResponseContext() { - return fmt.Errorf("Error there is not Link flexible gpu (%s)", err) - } - - var respV oscgo.ReadFlexibleGpusResponse - err = resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { - rp, httpResp, err := conn.FlexibleGpuApi.ReadFlexibleGpus(context.Background()). - ReadFlexibleGpusRequest(*reqFlex).Execute() + err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { + var err error + rp, httpResp, err := conn.FlexibleGpuApi.LinkFlexibleGpu( + context.Background()).LinkFlexibleGpuRequest(reqLink).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + resp = rp + return nil + }) if err != nil { - return utils.CheckThrottling(httpResp, err) + return fmt.Errorf("Error Link flexibe gpu: %s", err.Error()) + } + if !resp.HasResponseContext() { + return fmt.Errorf("Error there is not Link flexible gpu (%s)", err) } - respV = rp - return nil - }) - - if err != nil { - return fmt.Errorf("error reading the FlexibleGpu %s", err) - } - - if err := utils.IsResponseEmptyOrMutiple(len(respV.GetFlexibleGpus()), "FlexibleGpu"); err != nil { - return err - } - - if (*respV.FlexibleGpus)[0].GetState() != "attaching" { - return fmt.Errorf("Unable to link Flexible GPU") } if err := changeShutdownBehavior(conn, vmId, d.Timeout(schema.TimeoutDelete)); err != nil { @@ -114,17 +88,12 @@ func resourceOutscaleOAPIFlexibleGpuLinkCreate(d *schema.ResourceData, meta inte func resourceOutscaleOAPIFlexibleGpuLinkRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - - flexGpuID := d.Get("flexible_gpu_id").(string) - if flexGpuID == "" { - flexGpuID = d.Id() - } + vmId := d.Get("vm_id").(string) req := &oscgo.ReadFlexibleGpusRequest{ Filters: &oscgo.FiltersFlexibleGpu{ - FlexibleGpuIds: &[]string{flexGpuID}, + VmIds: &[]string{vmId}, }, } - var resp oscgo.ReadFlexibleGpusResponse var err error err = resource.Retry(d.Timeout(schema.TimeoutRead), func() *resource.RetryError { @@ -145,69 +114,69 @@ func resourceOutscaleOAPIFlexibleGpuLinkRead(d *schema.ResourceData, meta interf d.SetId("") return nil } - - fg := (*resp.FlexibleGpus)[0] - if err := d.Set("flexible_gpu_id", fg.GetFlexibleGpuId()); err != nil { + flexGpus := resp.GetFlexibleGpus()[:] + readGpuIdsLink := make([]string, len(flexGpus)) + for k, flexGpu := range flexGpus { + readGpuIdsLink[k] = flexGpu.GetFlexibleGpuId() + } + if err := d.Set("flexible_gpu_ids", readGpuIdsLink); err != nil { return err } - if err := d.Set("vm_id", fg.GetVmId()); err != nil { + if err := d.Set("vm_id", vmId); err != nil { return err } - d.SetId(fg.GetFlexibleGpuId()) - + d.SetId(resource.UniqueId()) return nil } func resourceOutscaleOAPIFlexibleGpuLinkDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - - flexGpuID := d.Get("flexible_gpu_id").(string) + GpuIdsList := utils.SetToStringSlice(d.Get("flexible_gpu_ids").(*schema.Set)) vmId := d.Get("vm_id").(string) - - filter := &oscgo.FiltersFlexibleGpu{ - FlexibleGpuIds: &[]string{flexGpuID}, - } - reqFlex := &oscgo.ReadFlexibleGpusRequest{ - Filters: filter, - } - - req := &oscgo.UnlinkFlexibleGpuRequest{ - FlexibleGpuId: flexGpuID, - } - var err error - err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - _, httpResp, err := conn.FlexibleGpuApi.UnlinkFlexibleGpu( - context.Background()).UnlinkFlexibleGpuRequest(*req).Execute() + + for _, flexGpuID := range GpuIdsList { + req := &oscgo.UnlinkFlexibleGpuRequest{ + FlexibleGpuId: flexGpuID, + } + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + _, httpResp, err := conn.FlexibleGpuApi.UnlinkFlexibleGpu( + context.Background()).UnlinkFlexibleGpuRequest(*req).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + return nil + }) if err != nil { - return utils.CheckThrottling(httpResp, err) + return err } - return nil - }) - - if err != nil { - return err - } - var resp oscgo.ReadFlexibleGpusResponse - err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { - rp, httpResp, err := conn.FlexibleGpuApi.ReadFlexibleGpus(context.Background()). - ReadFlexibleGpusRequest(*reqFlex).Execute() + var resp oscgo.ReadFlexibleGpusResponse + reqFlex := &oscgo.ReadFlexibleGpusRequest{ + Filters: &oscgo.FiltersFlexibleGpu{ + FlexibleGpuIds: &[]string{flexGpuID}, + }, + } + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + rp, httpResp, err := conn.FlexibleGpuApi.ReadFlexibleGpus(context.Background()). + ReadFlexibleGpusRequest(*reqFlex).Execute() + + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + resp = rp + return nil + }) if err != nil { - return utils.CheckThrottling(httpResp, err) + return fmt.Errorf("error reading the FlexibleGpu %s", err) } - resp = rp - return nil - }) - if err != nil { - return fmt.Errorf("error reading the FlexibleGpu %s", err) - } - if len(*resp.FlexibleGpus) != 1 { - return fmt.Errorf("Unable to find Flexible GPU") - } - if (*resp.FlexibleGpus)[0].GetState() != "detaching" { - return fmt.Errorf("Unable to unlink Flexible GPU") + if len(*resp.FlexibleGpus) != 1 { + return fmt.Errorf("Unable to find Flexible GPU") + } + if (*resp.FlexibleGpus)[0].GetState() != "detaching" { + return fmt.Errorf("Unable to unlink Flexible GPU") + } } if err := changeShutdownBehavior(conn, vmId, d.Timeout(schema.TimeoutDelete)); err != nil { @@ -216,11 +185,63 @@ func resourceOutscaleOAPIFlexibleGpuLinkDelete(d *schema.ResourceData, meta inte d.SetId("") return nil +} + +func resourceFlexibleGpuLinkUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*OutscaleClient).OSCAPI + vmId := d.Get("vm_id").(string) + oldIds, newIds := d.GetChange("flexible_gpu_ids") + + interIds := oldIds.(*schema.Set).Intersection(newIds.(*schema.Set)) + toCreate := newIds.(*schema.Set).Difference(interIds) + toRemove := oldIds.(*schema.Set).Difference(interIds) + var err error + + if toRemove.Len() > 0 { + for _, flexGpuID := range utils.SetToStringSlice(toRemove) { + req := &oscgo.UnlinkFlexibleGpuRequest{ + FlexibleGpuId: flexGpuID, + } + err = resource.Retry(20*time.Second, func() *resource.RetryError { + _, httpResp, err := conn.FlexibleGpuApi.UnlinkFlexibleGpu( + context.Background()).UnlinkFlexibleGpuRequest(*req).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + return nil + }) + if err != nil { + return err + } + } + } + if toCreate.Len() > 0 { + for _, flexGpuID := range utils.SetToStringSlice(toCreate) { + req := &oscgo.LinkFlexibleGpuRequest{ + FlexibleGpuId: flexGpuID, + VmId: vmId, + } + err = resource.Retry(20*time.Second, func() *resource.RetryError { + _, httpResp, err := conn.FlexibleGpuApi.LinkFlexibleGpu( + context.Background()).LinkFlexibleGpuRequest(*req).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + return nil + }) + if err != nil { + return err + } + } + } + if err := changeShutdownBehavior(conn, vmId, d.Timeout(schema.TimeoutUpdate)); err != nil { + return fmt.Errorf("Unable to change ShutdownBehavior: %s\n", err) + } + return resourceOutscaleOAPIFlexibleGpuLinkRead(d, meta) } func changeShutdownBehavior(conn *oscgo.APIClient, vmId string, timeOut time.Duration) error { - var resp oscgo.ReadVmsResponse err := resource.Retry(timeOut, func() *resource.RetryError { rp, httpResp, err := conn.VmApi.ReadVms(context.Background()).ReadVmsRequest(oscgo.ReadVmsRequest{ diff --git a/outscale/resource_outscale_flexible_gpu_link_test.go b/outscale/resource_outscale_flexible_gpu_link_test.go index 54e15238f..b1c4403bc 100644 --- a/outscale/resource_outscale_flexible_gpu_link_test.go +++ b/outscale/resource_outscale_flexible_gpu_link_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -35,17 +35,21 @@ func testAccOutscaleOAPIFlexibleGpuLinkConfig(omi, vmType, region string) string } - resource "outscale_flexible_gpu" "fGPU-1" { + resource "outscale_flexible_gpu" "fGPU-1" { + model_name = "nvidia-p6" + generation = "v5" + subregion_name = "%[3]sa" + delete_on_vm_deletion = true + } + resource "outscale_flexible_gpu" "fGPU-2" { model_name = "nvidia-p6" generation = "v5" subregion_name = "%[3]sa" delete_on_vm_deletion = true } - resource "outscale_flexible_gpu_link" "link_fGPU" { - flexible_gpu_id = outscale_flexible_gpu.fGPU-1.flexible_gpu_id + flexible_gpu_ids = [outscale_flexible_gpu.fGPU-1.flexible_gpu_id,outscale_flexible_gpu.fGPU-2.flexible_gpu_id] vm_id = outscale_vm.basic.vm_id } - `, omi, vmType, region) } diff --git a/outscale/resource_outscale_flexible_gpu_test.go b/outscale/resource_outscale_flexible_gpu_test.go index d7016b4e2..d08be3418 100644 --- a/outscale/resource_outscale_flexible_gpu_test.go +++ b/outscale/resource_outscale_flexible_gpu_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_image.go b/outscale/resource_outscale_image.go index 6fe0e70b4..3c34679bc 100644 --- a/outscale/resource_outscale_image.go +++ b/outscale/resource_outscale_image.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) const ( @@ -415,7 +415,6 @@ func resourceOAPIImageUpdate(d *schema.ResourceData, meta interface{}) error { if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOAPIImageRead(d, meta) } diff --git a/outscale/resource_outscale_image_export_task.go b/outscale/resource_outscale_image_export_task.go index bdccbf476..ff967a13e 100644 --- a/outscale/resource_outscale_image_export_task.go +++ b/outscale/resource_outscale_image_export_task.go @@ -13,8 +13,8 @@ import ( "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIIMageExportTask() *schema.Resource { @@ -281,7 +281,6 @@ func resourceOAPIImageExportTaskUpdate(d *schema.ResourceData, meta interface{}) if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOAPIImageExportTaskRead(d, meta) } diff --git a/outscale/resource_outscale_image_export_task_test.go b/outscale/resource_outscale_image_export_task_test.go index 5aa84df40..6e3d4ec71 100644 --- a/outscale/resource_outscale_image_export_task_test.go +++ b/outscale/resource_outscale_image_export_task_test.go @@ -5,11 +5,10 @@ import ( "os" "testing" - "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccVM_withImageExportTask_basic(t *testing.T) { diff --git a/outscale/resource_outscale_image_launch_permission.go b/outscale/resource_outscale_image_launch_permission.go index d790523b5..cefb39c52 100644 --- a/outscale/resource_outscale_image_launch_permission.go +++ b/outscale/resource_outscale_image_launch_permission.go @@ -13,8 +13,8 @@ import ( "github.com/spf13/cast" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIImageLaunchPermission() *schema.Resource { @@ -82,9 +82,8 @@ func resourceOutscaleOAPIImageLaunchPermission() *schema.Resource { Computed: true, }, "permissions_to_launch": { - Type: schema.TypeList, + Type: schema.TypeSet, Computed: true, - MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "global_permission": { diff --git a/outscale/resource_outscale_image_launch_permission_test.go b/outscale/resource_outscale_image_launch_permission_test.go index bb56df987..245d1d8c6 100644 --- a/outscale/resource_outscale_image_launch_permission_test.go +++ b/outscale/resource_outscale_image_launch_permission_test.go @@ -7,14 +7,12 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/terraform-providers/terraform-provider-outscale/utils" - - oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/aws/aws-sdk-go/aws" - r "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + r "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + oscgo "github.com/outscale/osc-sdk-go/v2" + "github.com/terraform-providers/terraform-provider-outscale/utils" ) func TestAccNet_WithImageLaunchPermission_Basic(t *testing.T) { diff --git a/outscale/resource_outscale_image_test.go b/outscale/resource_outscale_image_test.go index 1ec51e562..a4b8b3d50 100644 --- a/outscale/resource_outscale_image_test.go +++ b/outscale/resource_outscale_image_test.go @@ -10,9 +10,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_Image_basic(t *testing.T) { diff --git a/outscale/resource_outscale_internet_service.go b/outscale/resource_outscale_internet_service.go index 259b73f03..e580ca3cf 100644 --- a/outscale/resource_outscale_internet_service.go +++ b/outscale/resource_outscale_internet_service.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -125,7 +125,6 @@ func resourceOutscaleOAPIInternetServiceUpdate(d *schema.ResourceData, meta inte if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPIInternetServiceRead(d, meta) } diff --git a/outscale/resource_outscale_internet_service_link.go b/outscale/resource_outscale_internet_service_link.go index e05b2d3e3..631b8a198 100644 --- a/outscale/resource_outscale_internet_service_link.go +++ b/outscale/resource_outscale_internet_service_link.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIInternetServiceLink() *schema.Resource { diff --git a/outscale/resource_outscale_internet_service_link_test.go b/outscale/resource_outscale_internet_service_link_test.go index afe46a240..e449d6405 100644 --- a/outscale/resource_outscale_internet_service_link_test.go +++ b/outscale/resource_outscale_internet_service_link_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithInternetServiceLink_basic(t *testing.T) { diff --git a/outscale/resource_outscale_internet_service_test.go b/outscale/resource_outscale_internet_service_test.go index c5a7388b1..66fcfd284 100644 --- a/outscale/resource_outscale_internet_service_test.go +++ b/outscale/resource_outscale_internet_service_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_InternetService_basic(t *testing.T) { diff --git a/outscale/resource_outscale_keypair.go b/outscale/resource_outscale_keypair.go index 42e2eef81..a6509e546 100644 --- a/outscale/resource_outscale_keypair.go +++ b/outscale/resource_outscale_keypair.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIKeyPair() *schema.Resource { diff --git a/outscale/resource_outscale_keypair_test.go b/outscale/resource_outscale_keypair_test.go index 1800ca16f..e4aff2f57 100644 --- a/outscale/resource_outscale_keypair_test.go +++ b/outscale/resource_outscale_keypair_test.go @@ -11,9 +11,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_Keypair_basic(t *testing.T) { diff --git a/outscale/resource_outscale_load_balancer.go b/outscale/resource_outscale_load_balancer.go index c62fb4c26..aba3fc5a5 100644 --- a/outscale/resource_outscale_load_balancer.go +++ b/outscale/resource_outscale_load_balancer.go @@ -11,14 +11,14 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) func lb_sg_schema() *schema.Schema { return &schema.Schema{ - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -84,7 +84,7 @@ func resourceOutscaleOAPILoadBalancer() *schema.Resource { Computed: true, }, "access_log": { - Type: schema.TypeMap, + Type: schema.TypeList, Optional: true, Computed: true, Elem: &schema.Resource{ @@ -109,16 +109,16 @@ func resourceOutscaleOAPILoadBalancer() *schema.Resource { }, }, "health_check": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "healthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "unhealthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "path": { @@ -126,11 +126,11 @@ func resourceOutscaleOAPILoadBalancer() *schema.Resource { Computed: true, }, "check_interval": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "port": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "protocol": { @@ -138,7 +138,7 @@ func resourceOutscaleOAPILoadBalancer() *schema.Resource { Computed: true, }, "timeout": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, }, @@ -567,14 +567,11 @@ func resourceOutscaleOAPILoadBalancerRead(d *schema.ResourceData, meta interface } else { d.Set("security_groups", make([]map[string]interface{}, 0)) } - ssg := make(map[string]string) + if lb.SourceSecurityGroup != nil { - ssg["security_group_name"] = *lb.SourceSecurityGroup.SecurityGroupName - ssg["security_group_account_id"] = *lb.SourceSecurityGroup.SecurityGroupAccountId + d.Set("source_security_group", flattenSource_sg(lb.SourceSecurityGroup)) } - d.Set("source_security_group", ssg) d.Set("subnets", utils.StringSlicePtrToInterfaceSlice(lb.Subnets)) - d.Set("public_ip", lb.PublicIp) d.Set("secured_cookies", lb.SecuredCookies) @@ -875,27 +872,6 @@ func resourceOutscaleOAPILoadBalancerUpdate(d *schema.ResourceData, meta interfa } } - if d.HasChange("public_ip") { - req := oscgo.UpdateLoadBalancerRequest{ - LoadBalancerName: d.Id(), - } - req.SetPublicIp(d.Get("public_ip").(string)) - - var err error - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, httpResp, err := conn.LoadBalancerApi.UpdateLoadBalancer( - context.Background()).UpdateLoadBalancerRequest(req).Execute() - if err != nil { - return utils.CheckThrottling(httpResp, err) - } - return nil - }) - - if err != nil { - return fmt.Errorf("Failure updating PublicIp: %s", err) - } - } - if d.HasChange("secured_cookies") { req := oscgo.UpdateLoadBalancerRequest{ LoadBalancerName: d.Id(), @@ -970,39 +946,43 @@ func resourceOutscaleOAPILoadBalancerDelete(d *schema.ResourceData, meta interfa return nil } -func flattenOAPIHealthCheck(check *oscgo.HealthCheck) map[string]interface{} { - chk := make(map[string]interface{}) - - if check != nil { - h := utils.I32toa(check.HealthyThreshold) - i := utils.I32toa(check.CheckInterval) - pa := check.Path - po := utils.I32toa(check.Port) - pr := check.Protocol - ti := utils.I32toa(check.Timeout) - u := utils.I32toa(check.UnhealthyThreshold) - - chk["healthy_threshold"] = h - chk["check_interval"] = i - chk["path"] = pa - chk["port"] = po - chk["protocol"] = pr - chk["timeout"] = ti - chk["unhealthy_threshold"] = u +// Expands an array of String Instance IDs into a []Instances +func expandInstanceString(list []interface{}) []string { + result := make([]string, 0, len(list)) + for _, i := range list { + result = append(result, i.(string)) } + return result +} - return chk +func formatInt32(n int32) string { + return strconv.FormatInt(int64(n), 10) } -func flattenOAPIAccessLog(aclog *oscgo.AccessLog) map[string]interface{} { - accl := make(map[string]interface{}) +func flattenOAPIHealthCheck(check *oscgo.HealthCheck) []map[string]interface{} { + return []map[string]interface{}{{ + "healthy_threshold": check.GetHealthyThreshold(), + "unhealthy_threshold": check.GetUnhealthyThreshold(), + "path": check.GetPath(), + "check_interval": check.GetCheckInterval(), + "port": check.GetPort(), + "protocol": check.GetProtocol(), + "timeout": check.GetTimeout(), + }} +} - if aclog != nil { - accl["is_enabled"] = strconv.FormatBool(*aclog.IsEnabled) - accl["osu_bucket_name"] = aclog.OsuBucketName - accl["osu_bucket_prefix"] = aclog.OsuBucketPrefix - accl["publication_interval"] = strconv.Itoa(int(*aclog.PublicationInterval)) - } +func flattenOAPIAccessLog(aclog *oscgo.AccessLog) []map[string]interface{} { + return []map[string]interface{}{{ + "is_enabled": aclog.GetIsEnabled(), + "osu_bucket_name": aclog.GetOsuBucketName(), + "osu_bucket_prefix": aclog.GetOsuBucketPrefix(), + "publication_interval": aclog.GetPublicationInterval(), + }} +} - return accl +func flattenSource_sg(ssg *oscgo.SourceSecurityGroup) []map[string]interface{} { + return []map[string]interface{}{{ + "security_group_name": ssg.GetSecurityGroupName(), + "security_group_account_id": ssg.GetSecurityGroupAccountId(), + }} } diff --git a/outscale/resource_outscale_load_balancer_attributes.go b/outscale/resource_outscale_load_balancer_attributes.go index 6903edeb9..4d0128e21 100644 --- a/outscale/resource_outscale_load_balancer_attributes.go +++ b/outscale/resource_outscale_load_balancer_attributes.go @@ -11,8 +11,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPILoadBalancerAttributes() *schema.Resource { @@ -69,7 +69,8 @@ func resourceOutscaleOAPILoadBalancerAttributes() *schema.Resource { Schema: map[string]*schema.Schema{ "healthy_threshold": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { htVal := val.(int) @@ -81,7 +82,8 @@ func resourceOutscaleOAPILoadBalancerAttributes() *schema.Resource { }, "unhealthy_threshold": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { uhtVal := val.(int) @@ -121,7 +123,8 @@ func resourceOutscaleOAPILoadBalancerAttributes() *schema.Resource { }, "check_interval": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { ciVal := val.(int) @@ -133,7 +136,8 @@ func resourceOutscaleOAPILoadBalancerAttributes() *schema.Resource { }, "timeout": { Type: schema.TypeInt, - Required: true, + Optional: true, + Computed: true, ForceNew: true, ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) { tVal := val.(int) @@ -422,12 +426,11 @@ func resourceOutscaleOAPILoadBalancerAttributesRead(d *schema.ResourceData, meta d.Set("access_log", make([]interface{}, 0)) } - sgr := make(map[string]string) if lb.SourceSecurityGroup != nil { - sgr["security_group_name"] = *lb.SourceSecurityGroup.SecurityGroupName - sgr["security_group_account_id"] = *lb.SourceSecurityGroup.SecurityGroupAccountId + d.Set("source_security_group", flattenSource_sg(lb.SourceSecurityGroup)) + } else { + d.Set("security_groups", make([]map[string]interface{}, 0)) } - d.Set("source_security_group", sgr) if lb.SecurityGroups != nil { d.Set("security_groups", utils.StringSlicePtrToInterfaceSlice(lb.SecurityGroups)) @@ -484,9 +487,7 @@ func resourceOutscaleOAPILoadBalancerAttributesRead(d *schema.ResourceData, meta d.Set("load_balancer_sticky_cookie_policies", lbc) } - hls := make([]interface{}, 1) - hls[0] = flattenOAPIHealthCheck(lb.HealthCheck) - d.Set("health_check", hls) + d.Set("health_check", flattenOAPIHealthCheck(lb.HealthCheck)) d.Set("listeners", flattenOAPIListeners(lb.Listeners)) d.Set("dns_name", lb.DnsName) diff --git a/outscale/resource_outscale_load_balancer_attributes_test.go b/outscale/resource_outscale_load_balancer_attributes_test.go index 1f41b247c..b7fc85407 100644 --- a/outscale/resource_outscale_load_balancer_attributes_test.go +++ b/outscale/resource_outscale_load_balancer_attributes_test.go @@ -7,8 +7,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_LBUAttr_basic(t *testing.T) { @@ -50,7 +50,7 @@ func testAccCheckOutscaleOAPILBUAttrExists(n string, res *oscgo.AccessLog) resou func testAccOutscaleOAPILBUAttrConfig(region string, r int) string { return fmt.Sprintf(` -resource "outscale_load_balancer" "bar" { +resource "outscale_load_balancer" "barAtt" { subregion_names = ["%sa"] load_balancer_name = "foobar-terraform-elb-%d" listeners { @@ -70,7 +70,7 @@ resource "outscale_load_balancer_attributes" "bar2" { is_enabled = "false" osu_bucket_prefix = "donustestbucket" } - load_balancer_name = outscale_load_balancer.bar.id + load_balancer_name = outscale_load_balancer.barAtt.id } `, region, r) } diff --git a/outscale/resource_outscale_load_balancer_listener_rule.go b/outscale/resource_outscale_load_balancer_listener_rule.go index 08bc41e27..5c1cc119f 100644 --- a/outscale/resource_outscale_load_balancer_listener_rule.go +++ b/outscale/resource_outscale_load_balancer_listener_rule.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleLoadBalancerListenerRule() *schema.Resource { diff --git a/outscale/resource_outscale_load_balancer_policy.go b/outscale/resource_outscale_load_balancer_policy.go index 7a283b1d8..acf5702f8 100644 --- a/outscale/resource_outscale_load_balancer_policy.go +++ b/outscale/resource_outscale_load_balancer_policy.go @@ -10,8 +10,8 @@ import ( "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { @@ -35,7 +35,8 @@ func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { }, }, "access_log": { - Type: schema.TypeMap, + Type: schema.TypeList, + Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -59,16 +60,16 @@ func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { }, }, "health_check": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "healthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "unhealthy_threshold": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "path": { @@ -76,11 +77,11 @@ func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { Computed: true, }, "check_interval": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "port": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, "protocol": { @@ -88,7 +89,7 @@ func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { Computed: true, }, "timeout": { - Type: schema.TypeString, + Type: schema.TypeInt, Computed: true, }, }, @@ -130,7 +131,7 @@ func resourceOutscaleAppCookieStickinessPolicy() *schema.Resource { }, }, "source_security_group": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -340,12 +341,10 @@ func resourceOutscaleAppCookieStickinessPolicyCreate(d *schema.ResourceData, met } d.Set("load_balancer_sticky_cookie_policies", lbc) } - ssg := make(map[string]string) + if lb.SourceSecurityGroup != nil { - ssg["security_group_name"] = *lb.SourceSecurityGroup.SecurityGroupName - ssg["security_group_account_id"] = *lb.SourceSecurityGroup.SecurityGroupAccountId + d.Set("source_security_group", flattenSource_sg(lb.SourceSecurityGroup)) } - d.Set("source_security_group", ssg) d.Set("public_ip", lb.PublicIp) d.Set("secured_cookies", lb.SecuredCookies) d.Set("net_id", lb.NetId) diff --git a/outscale/resource_outscale_load_balancer_policy_test.go b/outscale/resource_outscale_load_balancer_policy_test.go index 0788c10d6..4cbfb3a9e 100644 --- a/outscale/resource_outscale_load_balancer_policy_test.go +++ b/outscale/resource_outscale_load_balancer_policy_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_load_balancer_test.go b/outscale/resource_outscale_load_balancer_test.go index c15a74430..b4abc6b70 100644 --- a/outscale/resource_outscale_load_balancer_test.go +++ b/outscale/resource_outscale_load_balancer_test.go @@ -11,15 +11,15 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_LBUBasic(t *testing.T) { t.Parallel() var conf oscgo.LoadBalancer - resourceName := "outscale_load_balancer.bar" + resourceName := "outscale_load_balancer.barRes" r := utils.RandIntRange(0, 10) zone := fmt.Sprintf("%sa", utils.GetRegion()) @@ -49,7 +49,7 @@ func TestAccOthers_LBUPublicIp(t *testing.T) { t.Parallel() var conf oscgo.LoadBalancer - resourceName := "outscale_load_balancer.bar" + resourceName := "outscale_load_balancer.barIp" r := utils.RandIntRange(10, 20) @@ -179,7 +179,7 @@ func testAccCheckOutscaleOAPILBUExists(n string, res *oscgo.LoadBalancer) resour func testAccOutscaleOAPILBUConfig(r int) string { return fmt.Sprintf(` -resource "outscale_load_balancer" "bar" { +resource "outscale_load_balancer" "barRes" { subregion_names = ["%sa"] load_balancer_name = "foobar-terraform-elb-%d" @@ -207,7 +207,7 @@ func testAccOutscaleOAPILBUPublicIpConfig(r int) string { resource "outscale_public_ip" "my_public_ip" { } - resource "outscale_load_balancer" "bar" { + resource "outscale_load_balancer" "barIp" { subregion_names = ["%[1]sa"] load_balancer_name = "foobar-terraform-elb-%[2]d" diff --git a/outscale/resource_outscale_load_balancer_vms.go b/outscale/resource_outscale_load_balancer_vms.go index db2a6b39a..c984328e4 100644 --- a/outscale/resource_outscale_load_balancer_vms.go +++ b/outscale/resource_outscale_load_balancer_vms.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceLBUAttachment() *schema.Resource { diff --git a/outscale/resource_outscale_load_balancer_vms_test.go b/outscale/resource_outscale_load_balancer_vms_test.go index d67d5bf19..8d857b417 100644 --- a/outscale/resource_outscale_load_balancer_vms_test.go +++ b/outscale/resource_outscale_load_balancer_vms_test.go @@ -5,8 +5,9 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" oscgo "github.com/outscale/osc-sdk-go/v2" @@ -16,7 +17,7 @@ func TestAccVM_WithLBUAttachment_basic(t *testing.T) { t.Parallel() var conf oscgo.LoadBalancer omi := os.Getenv("OUTSCALE_IMAGEID") - region := utils.GetRegion() + rand := acctest.RandIntRange(0, 50) testCheckInstanceAttached := func(count int) resource.TestCheckFunc { return func(*terraform.State) error { if conf.BackendVmIds != nil { @@ -30,29 +31,15 @@ func TestAccVM_WithLBUAttachment_basic(t *testing.T) { } resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - IDRefreshName: "outscale_load_balancer.bar", + PreCheck: func() { testAccPreCheckValues(t) }, + IDRefreshName: "outscale_load_balancer.barTach", Providers: testAccProviders, CheckDestroy: testAccCheckOutscaleOAPILBUDestroy, Steps: []resource.TestStep{ { - Config: testAcc_ConfigLBUAttachmentBasic(omi, region), + Config: testAccOutscaleOAPILBUAttachmentConfig1(rand, omi, utils.GetRegion()), Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.bar", &conf), - testCheckInstanceAttached(1), - ), - }, - { - Config: testAcc_ConfigLBUAttachmentAddUpdate(omi, region), - Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.bar", &conf), - testCheckInstanceAttached(2), - ), - }, - { - Config: testAcc_ConfigLBUAttachmentRemoveUpdate(omi, region), - Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.bar", &conf), + testAccCheckOutscaleOAPILBUExists("outscale_load_balancer.barTach", &conf), testCheckInstanceAttached(1), ), }, @@ -61,12 +48,12 @@ func TestAccVM_WithLBUAttachment_basic(t *testing.T) { } // add one attachment -func testAcc_ConfigLBUAttachmentBasic(omi, region string) string { +func testAccOutscaleOAPILBUAttachmentConfig1(num int, omi, region string) string { return fmt.Sprintf(` -resource "outscale_load_balancer" "bar" { - load_balancer_name = "load-test12" - subregion_names = ["%sa"] - listeners { +resource "outscale_load_balancer" "barTach" { + load_balancer_name = "load-test-%d" + subregion_names = ["%[2]sa"] + listeners { backend_port = 8000 backend_protocol = "HTTP" load_balancer_port = 80 @@ -75,27 +62,27 @@ resource "outscale_load_balancer" "bar" { } resource "outscale_vm" "foo1" { - image_id = "%[2]s" + image_id = "%[3]s" vm_type = "tinav4.c1r1p1" } resource "outscale_vm" "foo2" { - image_id = "%[2]s" + image_id = "%[3]s" vm_type = "tinav4.c1r1p1" } resource "outscale_load_balancer_vms" "foo1" { - load_balancer_name = outscale_load_balancer.bar.id + load_balancer_name = outscale_load_balancer.barTach.id backend_vm_ids = [outscale_vm.foo1.id] } -`, region, omi) +`, num, region, omi) } func testAcc_ConfigLBUAttachmentAddUpdate(omi, region string) string { return fmt.Sprintf(` -resource "outscale_load_balancer" "bar" { +resource "outscale_load_balancer" "barTach" { load_balancer_name = "load-test12" - subregion_names = ["%sa"] + subregion_names = ["%[1]sa"] listeners { backend_port = 8000 backend_protocol = "HTTP" @@ -115,7 +102,7 @@ resource "outscale_vm" "foo2" { } resource "outscale_load_balancer_vms" "foo1" { - load_balancer_name = outscale_load_balancer.bar.id + load_balancer_name = outscale_load_balancer.barTach.id backend_vm_ids = [outscale_vm.foo1.id, outscale_vm.foo2.id] } `, region, omi) @@ -123,7 +110,7 @@ resource "outscale_load_balancer_vms" "foo1" { func testAcc_ConfigLBUAttachmentRemoveUpdate(omi, region string) string { return fmt.Sprintf(` -resource "outscale_load_balancer" "bar" { +resource "outscale_load_balancer" "barTach" { load_balancer_name = "load-test12" subregion_names = ["%sa"] listeners { @@ -145,7 +132,7 @@ resource "outscale_vm" "foo2" { } resource "outscale_load_balancer_vms" "foo1" { - load_balancer_name = outscale_load_balancer.bar.id + load_balancer_name = outscale_load_balancer.barTach.id backend_vm_ids = [outscale_vm.foo2.id] } `, region, omi) diff --git a/outscale/resource_outscale_nat_service.go b/outscale/resource_outscale_nat_service.go index bc105ff63..159155fec 100644 --- a/outscale/resource_outscale_nat_service.go +++ b/outscale/resource_outscale_nat_service.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPINatService() *schema.Resource { @@ -202,7 +202,6 @@ func resourceOutscaleOAPINatServiceUpdate(d *schema.ResourceData, meta interface if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOAPINatServiceRead(d, meta) } diff --git a/outscale/resource_outscale_nat_service_test.go b/outscale/resource_outscale_nat_service_test.go index c54b8a63b..b4323ee54 100644 --- a/outscale/resource_outscale_nat_service_test.go +++ b/outscale/resource_outscale_nat_service_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithNatService_basic(t *testing.T) { @@ -135,32 +135,32 @@ const testAccOAPINatGatewayConfig = ` resource "outscale_public_ip" "outscale_public_ip" {} resource "outscale_nat_service" "outscale_nat_service" { - depends_on = ["outscale_route.outscale_route"] + depends_on = [outscale_route.outscale_route] subnet_id = outscale_subnet.outscale_subnet.subnet_id public_ip_id = outscale_public_ip.outscale_public_ip.public_ip_id } resource "outscale_route_table" "outscale_route_table" { - net_id = "${outscale_net.outscale_net.net_id}" + net_id = outscale_net.outscale_net.net_id } resource "outscale_route" "outscale_route" { depends_on = [outscale_route_table_link.outscale_route_table_link] destination_ip_range = "0.0.0.0/0" - gateway_id = "${outscale_internet_service_link.outscale_internet_service_link.internet_service_id}" - route_table_id = "${outscale_route_table.outscale_route_table.route_table_id}" + gateway_id = outscale_internet_service_link.outscale_internet_service_link.internet_service_id + route_table_id = outscale_route_table.outscale_route_table.route_table_id } resource "outscale_route_table_link" "outscale_route_table_link" { - subnet_id = "${outscale_subnet.outscale_subnet.subnet_id}" - route_table_id = "${outscale_route_table.outscale_route_table.id}" + subnet_id = outscale_subnet.outscale_subnet.subnet_id + route_table_id = outscale_route_table.outscale_route_table.id } resource "outscale_internet_service" "outscale_internet_service" {} resource "outscale_internet_service_link" "outscale_internet_service_link" { - net_id = "${outscale_net.outscale_net.net_id}" - internet_service_id = "${outscale_internet_service.outscale_internet_service.id}" + net_id = outscale_net.outscale_net.net_id + internet_service_id = outscale_internet_service.outscale_internet_service.id } ` diff --git a/outscale/resource_outscale_net.go b/outscale/resource_outscale_net.go index 1ba48e041..44a22b4dd 100644 --- a/outscale/resource_outscale_net.go +++ b/outscale/resource_outscale_net.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPINet() *schema.Resource { @@ -137,7 +137,6 @@ func resourceOutscaleOAPINetUpdate(d *schema.ResourceData, meta interface{}) err if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPINetRead(d, meta) } diff --git a/outscale/resource_outscale_net_access_point.go b/outscale/resource_outscale_net_access_point.go index 2aa81856f..4aafef869 100644 --- a/outscale/resource_outscale_net_access_point.go +++ b/outscale/resource_outscale_net_access_point.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -114,11 +114,9 @@ func resourceOutscaleNetAccessPointUpdate(d *schema.ResourceData, meta interface } if d.HasChange("tags") { - if err := setOSCAPITags(conn, d); err != nil { return err } - } return resourceOutscaleNetAccessPointRead(d, meta) } diff --git a/outscale/resource_outscale_net_access_point_test.go b/outscale/resource_outscale_net_access_point_test.go index ba4f9f63f..c0ca7bb7e 100644 --- a/outscale/resource_outscale_net_access_point_test.go +++ b/outscale/resource_outscale_net_access_point_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_net_attributes.go b/outscale/resource_outscale_net_attributes.go index ac81fc0b5..4b96eba2c 100644 --- a/outscale/resource_outscale_net_attributes.go +++ b/outscale/resource_outscale_net_attributes.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPILinAttributes() *schema.Resource { diff --git a/outscale/resource_outscale_net_attributes_test.go b/outscale/resource_outscale_net_attributes_test.go index 6d2a9e08d..0071d8b7f 100644 --- a/outscale/resource_outscale_net_attributes_test.go +++ b/outscale/resource_outscale_net_attributes_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_Attributes_basic(t *testing.T) { @@ -70,8 +70,8 @@ const testAccOutscaleOAPILinAttrConfig = ` } resource "outscale_net_attributes" "outscale_net_attributes" { - net_id = "${outscale_net.vpc.id}" - dhcp_options_set_id = "${outscale_net.vpc2.dhcp_options_set_id}" + net_id = outscale_net.vpc.id + dhcp_options_set_id = outscale_net.vpc2.dhcp_options_set_id } ` @@ -97,7 +97,6 @@ func testAccOutscaleOAPILinAttrConfigwithoutDHCPID(vpc string) string { resource "outscale_net_attributes" "outscale_net_attributes" { net_id = %s - depends_on = ["outscale_net.vpc", "outscale_net.vpc2"] } `, vpc) diff --git a/outscale/resource_outscale_net_peering.go b/outscale/resource_outscale_net_peering.go index dce7e526f..f46955aa1 100644 --- a/outscale/resource_outscale_net_peering.go +++ b/outscale/resource_outscale_net_peering.go @@ -13,8 +13,8 @@ import ( "github.com/terraform-providers/terraform-provider-outscale/utils" "github.com/hashicorp/errwrap" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPILinPeeringConnection() *schema.Resource { @@ -49,7 +49,7 @@ func resourceOutscaleOAPILinPeeringConnection() *schema.Resource { Computed: true, }, "state": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -187,23 +187,21 @@ func resourceOutscaleOAPILinPeeringRead(d *schema.ResourceData, meta interface{} log.Printf("[DEBUG] VPC PeerConn Source %s, Accepter %s", pc.SourceNet.GetAccountId(), pc.AccepterNet.GetAccountId()) - accepter := make(map[string]interface{}) - requester := make(map[string]interface{}) - stat := make(map[string]interface{}) - if !reflect.DeepEqual(pc.GetAccepterNet(), oscgo.AccepterNet{}) { - accepter["ip_range"] = pc.AccepterNet.GetIpRange() - accepter["account_id"] = pc.AccepterNet.GetAccountId() - accepter["net_id"] = pc.AccepterNet.GetNetId() + if err := d.Set("accepter_net", getOAPINetPeeringAccepterNet(pc.GetAccepterNet())); err != nil { + return err + } } - if !reflect.DeepEqual(pc.GetSourceNet(), oscgo.SourceNet{}) { - requester["ip_range"] = pc.SourceNet.GetIpRange() - requester["account_id"] = pc.SourceNet.GetAccountId() - requester["net_id"] = pc.SourceNet.GetNetId() + if !reflect.DeepEqual(pc.SourceNet, oscgo.SourceNet{}) { + if err := d.Set("source_net", getOAPINetPeeringSourceNet(pc.GetSourceNet())); err != nil { + return err + } } + if pc.State.GetName() != "" { - stat["name"] = pc.State.GetName() - stat["message"] = pc.State.GetMessage() + if err := d.Set("state", getOAPINetPeeringState(pc.GetState())); err != nil { + return err + } } if err := d.Set("accepter_net_id", pc.GetAccepterNet().NetId); err != nil { @@ -212,15 +210,6 @@ func resourceOutscaleOAPILinPeeringRead(d *schema.ResourceData, meta interface{} if err := d.Set("source_net_id", pc.GetSourceNet().NetId); err != nil { return err } - if err := d.Set("accepter_net", accepter); err != nil { - return err - } - if err := d.Set("source_net", requester); err != nil { - return err - } - if err := d.Set("state", stat); err != nil { - return err - } if err := d.Set("net_peering_id", pc.GetNetPeeringId()); err != nil { return err } @@ -237,7 +226,6 @@ func resourceOutscaleOAPINetPeeringUpdate(d *schema.ResourceData, meta interface if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPILinPeeringRead(d, meta) } @@ -307,7 +295,7 @@ func resourceOutscaleOAPILinPeeringConnectionStateRefreshFunc(conn *oscgo.APICli func vpcOAPIPeeringConnectionOptionsSchema() *schema.Schema { return &schema.Schema{ - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ diff --git a/outscale/resource_outscale_net_peering_acceptation.go b/outscale/resource_outscale_net_peering_acceptation.go index 94b86724e..1a8cd24df 100644 --- a/outscale/resource_outscale_net_peering_acceptation.go +++ b/outscale/resource_outscale_net_peering_acceptation.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPILinPeeringConnectionAccepter() *schema.Resource { @@ -29,7 +29,7 @@ func resourceOutscaleOAPILinPeeringConnectionAccepter() *schema.Resource { ForceNew: true, }, "state": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ diff --git a/outscale/resource_outscale_net_peering_acceptation_test.go b/outscale/resource_outscale_net_peering_acceptation_test.go index 05818862d..f7c6dda94 100644 --- a/outscale/resource_outscale_net_peering_acceptation_test.go +++ b/outscale/resource_outscale_net_peering_acceptation_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_PeeringConnectionAccepter_sameAccount(t *testing.T) { diff --git a/outscale/resource_outscale_net_peering_test.go b/outscale/resource_outscale_net_peering_test.go index 4de1c2f5f..c3cffebda 100644 --- a/outscale/resource_outscale_net_peering_test.go +++ b/outscale/resource_outscale_net_peering_test.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_PeeringConnection_basic(t *testing.T) { diff --git a/outscale/resource_outscale_net_test.go b/outscale/resource_outscale_net_test.go index 24a0c9b06..0ba750f8b 100644 --- a/outscale/resource_outscale_net_test.go +++ b/outscale/resource_outscale_net_test.go @@ -9,13 +9,13 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -func TestAccNet_basic(t *testing.T) { - var conf1 oscgo.Net - var conf2 oscgo.Net +func TestAccOutscaleOAPILin_basic(t *testing.T) { + t.Parallel() + var conf oscgo.Net resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -25,12 +25,9 @@ func TestAccNet_basic(t *testing.T) { { Config: testAccOutscaleOAPILinConfig, Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPILinExists("outscale_net.vpc.0", &conf1), - testAccCheckOutscaleOAPILinExists("outscale_net.vpc.1", &conf2), - resource.TestCheckResourceAttr( - "outscale_net.vpc.0", "ip_range", "10.0.0.0/16"), + testAccCheckOutscaleOAPILinExists("outscale_net.vpc", &conf), resource.TestCheckResourceAttr( - "outscale_net.vpc.1", "ip_range", "10.0.0.0/16"), + "outscale_net.vpc", "ip_range", "10.0.0.0/16"), ), }, }, @@ -97,8 +94,6 @@ func testAccCheckOutscaleOAPILinExists(n string, res *oscgo.Net) resource.TestCh const testAccOutscaleOAPILinConfig = ` resource "outscale_net" "vpc" { ip_range = "10.0.0.0/16" - count = 2 - tags { key = "Name" value = "testacc-net-rs" diff --git a/outscale/resource_outscale_nic.go b/outscale/resource_outscale_nic.go index 43ecc1375..863528324 100644 --- a/outscale/resource_outscale_nic.go +++ b/outscale/resource_outscale_nic.go @@ -13,8 +13,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/openlyinc/pointy" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -61,7 +61,7 @@ func getOAPINicSchema() map[string]*schema.Schema { }, // Attributes "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -89,7 +89,7 @@ func getOAPINicSchema() map[string]*schema.Schema { }, }, "link_nic": { - Type: schema.TypeMap, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -159,14 +159,14 @@ func getOAPINicSchema() map[string]*schema.Schema { }, "private_ips": { - Type: schema.TypeSet, + Type: schema.TypeList, Computed: true, Optional: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "link_public_ip": { - Type: schema.TypeMap, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -257,7 +257,7 @@ func resourceOutscaleOAPINicCreate(d *schema.ResourceData, meta interface{}) err } if v, ok := d.GetOk("private_ips"); ok { - request.SetPrivateIps(expandPrivateIPLight(v.(*schema.Set).List())) + request.SetPrivateIps(expandPrivateIPLight(v.([]interface{}))) } log.Printf("[DEBUG] Creating network interface") @@ -311,7 +311,6 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error var resp oscgo.ReadNicsResponse var err error err = resource.Retry(5*time.Minute, func() *resource.RetryError { - rp, httpResp, err := conn.NicApi.ReadNics(context.Background()).ReadNicsRequest(dnir).Execute() if err != nil { return utils.CheckThrottling(httpResp, err) @@ -321,7 +320,6 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error }) if err != nil { - return fmt.Errorf("Error describing Network Interfaces : %s", err) } @@ -341,40 +339,19 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("description", eni.GetDescription()); err != nil { return err } - if err := d.Set("subnet_id", eni.GetSubnetId()); err != nil { return err } - - b := make(map[string]interface{}) - link := eni.GetLinkPublicIp() - b["public_ip_id"] = link.GetPublicIpId() - b["link_public_ip_id"] = link.GetLinkPublicIpId() - b["public_ip_account_id"] = link.GetPublicIpAccountId() - b["public_dns_name"] = link.GetPublicDnsName() - b["public_ip"] = link.GetPublicIp() - - if err := d.Set("link_public_ip", b); err != nil { - return err + if linkIp, ok := eni.GetLinkPublicIpOk(); ok { + if err := d.Set("link_public_ip", flattenLinkPublicIp(linkIp)); err != nil { + return err + } } - //aa := make([]map[string]interface{}, 1) - bb := make(map[string]interface{}) - att := eni.GetLinkNic() - bb["link_nic_id"] = att.GetLinkNicId() - bb["delete_on_vm_deletion"] = strconv.FormatBool(att.GetDeleteOnVmDeletion()) - bb["device_number"] = fmt.Sprintf("%d", att.GetDeviceNumber()) - bb["vm_id"] = att.GetVmId() - bb["vm_account_id"] = att.GetVmAccountId() - bb["state"] = att.GetState() - - //aa[0] = bb - // if err := d.Set("link_nic", aa); err != nil { - // return err - // } - - if err := d.Set("link_nic", bb); err != nil { - return err + if linkNic, ok := eni.GetLinkNicOk(); ok { + if err := d.Set("link_nic", flattenLinkNic(linkNic)); err != nil { + return err + } } if err := d.Set("subregion_name", eni.GetSubregionName()); err != nil { @@ -404,7 +381,6 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("private_dns_name", eni.GetPrivateDnsName()); err != nil { return err } - //d.Set("private_ip", eni.) y := make([]map[string]interface{}, len(eni.GetPrivateIps())) if eni.PrivateIps != nil { @@ -412,14 +388,14 @@ func resourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error b := make(map[string]interface{}) d := make(map[string]interface{}) - assoc := v.GetLinkPublicIp() - d["public_ip_id"] = assoc.GetPublicIpId() - d["link_public_ip_id"] = assoc.GetLinkPublicIpId() - d["public_ip_account_id"] = assoc.GetPublicIpAccountId() - d["public_dns_name"] = assoc.GetPublicDnsName() - d["public_ip"] = assoc.GetPublicIp() - - b["link_public_ip"] = d + if assoc, ok := v.GetLinkPublicIpOk(); ok { + d["public_ip_id"] = assoc.GetPublicIpId() + d["link_public_ip_id"] = assoc.GetLinkPublicIpId() + d["public_ip_account_id"] = assoc.GetPublicIpAccountId() + d["public_dns_name"] = assoc.GetPublicDnsName() + d["public_ip"] = assoc.GetPublicIp() + b["link_public_ip"] = d + } b["private_dns_name"] = v.GetPrivateDnsName() b["private_ip"] = v.GetPrivateIp() b["is_primary"] = v.GetIsPrimary() @@ -624,7 +600,6 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err NicId: d.Id(), SecondaryPrivateIpCount: pointy.Int32(dif), } - // _, err := conn.VM.AssignPrivateIpAddresses(input) err := resource.Retry(5*time.Minute, func() *resource.RetryError { var err error @@ -677,7 +652,6 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err if err != nil { return fmt.Errorf("Failure updating ENI: %s", err) } - } if d.HasChange("description") { @@ -703,7 +677,6 @@ func resourceOutscaleOAPINicUpdate(d *schema.ResourceData, meta interface{}) err if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPINicRead(d, meta) } @@ -730,3 +703,24 @@ func flattenPrivateIPLightToStringSlice(pIPs []interface{}) []string { } return privateIPs } + +func flattenLinkPublicIp(linkIp *oscgo.LinkPublicIp) []map[string]interface{} { + return []map[string]interface{}{{ + "public_ip_id": linkIp.GetPublicIpId(), + "link_public_ip_id": linkIp.GetLinkPublicIpId(), + "public_ip_account_id": linkIp.GetPublicIpAccountId(), + "public_dns_name": linkIp.GetPublicDnsName(), + "public_ip": linkIp.GetPublicIp(), + }} +} + +func flattenLinkNic(linkNic *oscgo.LinkNic) []map[string]interface{} { + return []map[string]interface{}{{ + "link_nic_id": linkNic.GetLinkNicId(), + "delete_on_vm_deletion": strconv.FormatBool(linkNic.GetDeleteOnVmDeletion()), + "device_number": linkNic.GetDeviceNumber(), + "vm_id": linkNic.GetVmId(), + "vm_account_id": linkNic.GetVmAccountId(), + "state": linkNic.GetState(), + }} +} diff --git a/outscale/resource_outscale_nic_link.go b/outscale/resource_outscale_nic_link.go index 9e97d2821..f3476383f 100644 --- a/outscale/resource_outscale_nic_link.go +++ b/outscale/resource_outscale_nic_link.go @@ -12,8 +12,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPINetworkInterfaceAttachment() *schema.Resource { diff --git a/outscale/resource_outscale_nic_link_test.go b/outscale/resource_outscale_nic_link_test.go index 56525d554..dbb82927d 100644 --- a/outscale/resource_outscale_nic_link_test.go +++ b/outscale/resource_outscale_nic_link_test.go @@ -9,13 +9,12 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/terraform-providers/terraform-provider-outscale/utils" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccNet_withNicLink_Basic(t *testing.T) { diff --git a/outscale/resource_outscale_nic_private_ip.go b/outscale/resource_outscale_nic_private_ip.go index 510cdd17f..6b482bbf0 100644 --- a/outscale/resource_outscale_nic_private_ip.go +++ b/outscale/resource_outscale_nic_private_ip.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPINetworkInterfacePrivateIP() *schema.Resource { diff --git a/outscale/resource_outscale_nic_private_ip_test.go b/outscale/resource_outscale_nic_private_ip_test.go index 492f55905..0f16a4867 100644 --- a/outscale/resource_outscale_nic_private_ip_test.go +++ b/outscale/resource_outscale_nic_private_ip_test.go @@ -7,7 +7,7 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestAccNet_NICPrivateIPBasic(t *testing.T) { diff --git a/outscale/resource_outscale_nic_test.go b/outscale/resource_outscale_nic_test.go index ecd92e06a..1c45783de 100644 --- a/outscale/resource_outscale_nic_test.go +++ b/outscale/resource_outscale_nic_test.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithNic_basic(t *testing.T) { diff --git a/outscale/resource_outscale_public_ip.go b/outscale/resource_outscale_public_ip.go index 7d98ff32a..bcc5184be 100644 --- a/outscale/resource_outscale_public_ip.go +++ b/outscale/resource_outscale_public_ip.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) @@ -185,7 +185,6 @@ func resourceOutscaleOAPIPublicIPUpdate(d *schema.ResourceData, meta interface{} if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPIPublicIPRead(d, meta) } diff --git a/outscale/resource_outscale_public_ip_link.go b/outscale/resource_outscale_public_ip_link.go index 1b3230ee4..ade6c5fb6 100644 --- a/outscale/resource_outscale_public_ip_link.go +++ b/outscale/resource_outscale_public_ip_link.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIPublicIPLink() *schema.Resource { diff --git a/outscale/resource_outscale_public_ip_link_test.go b/outscale/resource_outscale_public_ip_link_test.go index 38293b2e5..790e5a359 100644 --- a/outscale/resource_outscale_public_ip_link_test.go +++ b/outscale/resource_outscale_public_ip_link_test.go @@ -13,8 +13,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithPublicIPLink_basic(t *testing.T) { diff --git a/outscale/resource_outscale_public_ip_test.go b/outscale/resource_outscale_public_ip_test.go index 77ada4b67..10756154e 100644 --- a/outscale/resource_outscale_public_ip_test.go +++ b/outscale/resource_outscale_public_ip_test.go @@ -3,6 +3,7 @@ package outscale import ( "context" "fmt" + "net/http" "os" "strings" "testing" @@ -11,8 +12,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_PublicIP_basic(t *testing.T) { @@ -146,18 +147,22 @@ func testAccCheckOutscaleOAPIPublicIPDestroy(s *terraform.State) error { } var response oscgo.ReadPublicIpsResponse + var statusCode int err := resource.Retry(60*time.Second, func() *resource.RetryError { - var err error - response, _, err = conn.OSCAPI.PublicIpApi.ReadPublicIps(context.Background()).ReadPublicIpsRequest(req).Execute() - return resource.RetryableError(err) + rp, httpResp, err := conn.OSCAPI.PublicIpApi.ReadPublicIps(context.Background()).ReadPublicIpsRequest(req).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + response = rp + statusCode = httpResp.StatusCode + return nil }) if err != nil { // Verify the error is what we want - if e := fmt.Sprint(err); strings.Contains(e, "InvalidAllocationID.NotFound") || strings.Contains(e, "InvalidPublicIps.NotFound") { + if statusCode == http.StatusNotFound { return nil } - return err } diff --git a/outscale/resource_outscale_route.go b/outscale/resource_outscale_route.go index 45f82c04a..644f6597f 100644 --- a/outscale/resource_outscale_route.go +++ b/outscale/resource_outscale_route.go @@ -13,8 +13,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) var errOAPIRoute = errors.New("Error: more than 1 target specified. Only 1 of gateway_id, " + @@ -142,6 +142,7 @@ func resourceOutscaleOAPIRouteCreate(d *schema.ResourceData, meta interface{}) e _, httpResp, err := conn.RouteApi.CreateRoute(context.Background()).CreateRouteRequest(createOpts).Execute() if err != nil { if strings.Contains(fmt.Sprint(err), utils.InvalidState) { + log.Printf("[OKHT] === ERROR: %v ====\n", err) log.Printf("[DEBUG] Trying to create route again: %q", err) return resource.RetryableError(err) } @@ -168,7 +169,10 @@ func resourceOutscaleOAPIRouteCreate(d *schema.ResourceData, meta interface{}) e return resource.RetryableError(fmt.Errorf("still await route to be active")) } } - return resource.RetryableError(err) + if err != nil { + return resource.NonRetryableError(err) + } + return nil }) if err != nil { return fmt.Errorf("Error finding route after creating it: %s", err) diff --git a/outscale/resource_outscale_route_table.go b/outscale/resource_outscale_route_table.go index d56a60f6d..8c3073f8a 100644 --- a/outscale/resource_outscale_route_table.go +++ b/outscale/resource_outscale_route_table.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIRouteTable() *schema.Resource { @@ -236,7 +236,6 @@ func resourceOutscaleOAPIRouteTableUpdate(d *schema.ResourceData, meta interface if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPIRouteTableRead(d, meta) } diff --git a/outscale/resource_outscale_route_table_link.go b/outscale/resource_outscale_route_table_link.go index b974155bb..cbc958ccc 100644 --- a/outscale/resource_outscale_route_table_link.go +++ b/outscale/resource_outscale_route_table_link.go @@ -12,8 +12,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) const ( diff --git a/outscale/resource_outscale_route_table_link_test.go b/outscale/resource_outscale_route_table_link_test.go index 1ce60de2d..273838855 100644 --- a/outscale/resource_outscale_route_table_link_test.go +++ b/outscale/resource_outscale_route_table_link_test.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithLinkRouteTable_basic(t *testing.T) { diff --git a/outscale/resource_outscale_route_table_test.go b/outscale/resource_outscale_route_table_test.go index d39bf54bf..65c53360e 100644 --- a/outscale/resource_outscale_route_table_test.go +++ b/outscale/resource_outscale_route_table_test.go @@ -12,8 +12,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithRouteTable_basic(t *testing.T) { diff --git a/outscale/resource_outscale_route_test.go b/outscale/resource_outscale_route_test.go index ebebe6ce5..106297980 100644 --- a/outscale/resource_outscale_route_test.go +++ b/outscale/resource_outscale_route_test.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_OutscaleOAPIRoute_noopdiff(t *testing.T) { diff --git a/outscale/resource_outscale_security_group.go b/outscale/resource_outscale_security_group.go index 7ceb45fb6..1f6b687f1 100644 --- a/outscale/resource_outscale_security_group.go +++ b/outscale/resource_outscale_security_group.go @@ -8,10 +8,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPISecurityGroup() *schema.Resource { @@ -216,7 +216,6 @@ func resourceOutscaleOAPISecurityGroupCreate(d *schema.ResourceData, meta interf return err } } - return resourceOutscaleOAPISecurityGroupRead(d, meta) } @@ -301,7 +300,6 @@ func resourceOutscaleOAPISecurityGroupUpdate(d *schema.ResourceData, meta interf if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPISecurityGroupRead(d, meta) } diff --git a/outscale/resource_outscale_security_group_rule.go b/outscale/resource_outscale_security_group_rule.go index 20463c54c..813bd25b5 100644 --- a/outscale/resource_outscale_security_group_rule.go +++ b/outscale/resource_outscale_security_group_rule.go @@ -14,9 +14,9 @@ import ( "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func resourceOutscaleOAPIOutboundRule() *schema.Resource { diff --git a/outscale/resource_outscale_security_group_rule_test.go b/outscale/resource_outscale_security_group_rule_test.go index cad29646b..670f4b129 100644 --- a/outscale/resource_outscale_security_group_rule_test.go +++ b/outscale/resource_outscale_security_group_rule_test.go @@ -11,9 +11,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_SecurityGroupRule_basic(t *testing.T) { diff --git a/outscale/resource_outscale_security_group_test.go b/outscale/resource_outscale_security_group_test.go index 73fdeaaa2..9b56b9144 100644 --- a/outscale/resource_outscale_security_group_test.go +++ b/outscale/resource_outscale_security_group_test.go @@ -6,9 +6,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithSecurityGroup(t *testing.T) { diff --git a/outscale/resource_outscale_server_certificate.go b/outscale/resource_outscale_server_certificate.go index 6be8fbed8..b9cd2a05a 100644 --- a/outscale/resource_outscale_server_certificate.go +++ b/outscale/resource_outscale_server_certificate.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" diff --git a/outscale/resource_outscale_server_certificate_test.go b/outscale/resource_outscale_server_certificate_test.go index f153dab6a..35f66c91c 100644 --- a/outscale/resource_outscale_server_certificate_test.go +++ b/outscale/resource_outscale_server_certificate_test.go @@ -6,12 +6,11 @@ import ( "testing" "time" - "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccOthers_ServerCertificate_basic(t *testing.T) { diff --git a/outscale/resource_outscale_snapshot.go b/outscale/resource_outscale_snapshot.go index b7258b8fc..ab0c84325 100644 --- a/outscale/resource_outscale_snapshot.go +++ b/outscale/resource_outscale_snapshot.go @@ -8,10 +8,10 @@ import ( "time" oscgo "github.com/outscale/osc-sdk-go/v2" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/terraform-providers/terraform-provider-outscale/utils" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPISnapshot() *schema.Resource { @@ -265,7 +265,6 @@ func resourceOutscaleOAPISnapshotUpdate(d *schema.ResourceData, meta interface{} if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleOAPISnapshotRead(d, meta) } diff --git a/outscale/resource_outscale_snapshot_attributes.go b/outscale/resource_outscale_snapshot_attributes.go index d8cbfc38a..f29668fb3 100644 --- a/outscale/resource_outscale_snapshot_attributes.go +++ b/outscale/resource_outscale_snapshot_attributes.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourcedOutscaleOAPISnapshotAttributes() *schema.Resource { diff --git a/outscale/resource_outscale_snapshot_attributes_test.go b/outscale/resource_outscale_snapshot_attributes_test.go index 1ce168180..e0e2324ee 100644 --- a/outscale/resource_outscale_snapshot_attributes_test.go +++ b/outscale/resource_outscale_snapshot_attributes_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_snapshot_export_task.go b/outscale/resource_outscale_snapshot_export_task.go index 617be5a0c..7a38824ec 100644 --- a/outscale/resource_outscale_snapshot_export_task.go +++ b/outscale/resource_outscale_snapshot_export_task.go @@ -11,8 +11,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPISnapshotExportTask() *schema.Resource { @@ -267,7 +267,6 @@ func resourceOAPISnapshotExportTaskUpdate(d *schema.ResourceData, meta interface if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOAPISnapshotExportTaskRead(d, meta) } diff --git a/outscale/resource_outscale_snapshot_export_task_test.go b/outscale/resource_outscale_snapshot_export_task_test.go index 6af4a48fe..6702710c5 100644 --- a/outscale/resource_outscale_snapshot_export_task_test.go +++ b/outscale/resource_outscale_snapshot_export_task_test.go @@ -4,9 +4,9 @@ import ( "fmt" "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" - "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_snapshot_test.go b/outscale/resource_outscale_snapshot_test.go index c0209e4d6..c6cfef16a 100644 --- a/outscale/resource_outscale_snapshot_test.go +++ b/outscale/resource_outscale_snapshot_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_Snapshot_basic(t *testing.T) { diff --git a/outscale/resource_outscale_subnet.go b/outscale/resource_outscale_subnet.go index c12f26c1c..a561dbeac 100644 --- a/outscale/resource_outscale_subnet.go +++ b/outscale/resource_outscale_subnet.go @@ -6,8 +6,8 @@ import ( "log" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_subnet_test.go b/outscale/resource_outscale_subnet_test.go index 83bfe6ebc..a67d9ad2f 100644 --- a/outscale/resource_outscale_subnet_test.go +++ b/outscale/resource_outscale_subnet_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" ) diff --git a/outscale/resource_outscale_tags.go b/outscale/resource_outscale_tags.go index 5016abdf7..e721b1dec 100644 --- a/outscale/resource_outscale_tags.go +++ b/outscale/resource_outscale_tags.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPITags() *schema.Resource { diff --git a/outscale/resource_outscale_tags_test.go b/outscale/resource_outscale_tags_test.go index 080039f1d..b4fcf9675 100644 --- a/outscale/resource_outscale_tags_test.go +++ b/outscale/resource_outscale_tags_test.go @@ -13,9 +13,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccVM_tags(t *testing.T) { diff --git a/outscale/resource_outscale_virtual_gateway.go b/outscale/resource_outscale_virtual_gateway.go index 69045fa2b..c7314fc76 100644 --- a/outscale/resource_outscale_virtual_gateway.go +++ b/outscale/resource_outscale_virtual_gateway.go @@ -7,12 +7,11 @@ import ( "net/http" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/aws/aws-sdk-go/aws" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceOutscaleOAPIVirtualGateway() *schema.Resource { @@ -113,7 +112,6 @@ func resourceOutscaleOAPIVirtualGatewayCreate(d *schema.ResourceData, meta inter return err } } - return resourceOutscaleOAPIVirtualGatewayRead(d, meta) } @@ -153,26 +151,20 @@ func resourceOutscaleOAPIVirtualGatewayRead(d *schema.ResourceData, meta interfa d.SetId("") return nil } - vpnLink := oapiVpnGatewayGetLink(virtualGateway) - if len(virtualGateway.GetNetToVirtualGatewayLinks()) == 0 || vpnLink.GetState() == "detached" { - d.Set("net_id", "") - } else { - d.Set("net_id", vpnLink.GetNetId()) - } - - vs := make([]map[string]interface{}, len(virtualGateway.GetNetToVirtualGatewayLinks())) - - for k, v := range virtualGateway.GetNetToVirtualGatewayLinks() { - vp := make(map[string]interface{}) - vp["state"] = v.GetState() - vp["net_id"] = v.GetNetId() - - vs[k] = vp + if virtualGateway.HasNetToVirtualGatewayLinks() { + vs := make([]map[string]interface{}, len(virtualGateway.GetNetToVirtualGatewayLinks())) + for k, v := range virtualGateway.GetNetToVirtualGatewayLinks() { + vp := make(map[string]interface{}) + vp["state"] = v.GetState() + vp["net_id"] = v.GetNetId() + vs[k] = vp + } + d.Set("net_to_virtual_gateway_links", vs) } d.Set("connection_type", virtualGateway.GetConnectionType()) d.Set("virtual_gateway_id", virtualGateway.GetVirtualGatewayId()) - d.Set("net_to_virtual_gateway_links", vs) + d.Set("state", virtualGateway.State) d.Set("tags", tagsOSCAPIToMap(virtualGateway.GetTags())) @@ -184,7 +176,6 @@ func resourceOutscaleOAPIVirtualGatewayUpdate(d *schema.ResourceData, meta inter if err := setOSCAPITags(conn, d); err != nil { return err } - return nil } diff --git a/outscale/resource_outscale_virtual_gateway_link.go b/outscale/resource_outscale_virtual_gateway_link.go index eb4e8d396..e2108e954 100644 --- a/outscale/resource_outscale_virtual_gateway_link.go +++ b/outscale/resource_outscale_virtual_gateway_link.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIVirtualGatewayLink() *schema.Resource { diff --git a/outscale/resource_outscale_virtual_gateway_link_test.go b/outscale/resource_outscale_virtual_gateway_link_test.go index e93f39095..15d461a82 100644 --- a/outscale/resource_outscale_virtual_gateway_link_test.go +++ b/outscale/resource_outscale_virtual_gateway_link_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_withpnGatewayAttachment_basic(t *testing.T) { @@ -23,6 +23,7 @@ func TestAccNet_withpnGatewayAttachment_basic(t *testing.T) { }, IDRefreshName: "outscale_virtual_gateway_link.test", Providers: testAccProviders, + CheckDestroy: testAccCheckOAPIVpnGatewayAttachmentDestroy, Steps: []resource.TestStep{ { Config: testAccOAPIVpnGatewayAttachmentConfig, @@ -33,6 +34,8 @@ func TestAccNet_withpnGatewayAttachment_basic(t *testing.T) { testAccCheckOAPIVirtualGatewayExists( "outscale_virtual_gateway.test", &vgw), + testAccCheckOAPIVpnGatewayAttachmentExists( + "outscale_virtual_gateway_link.test"), ), }, }, @@ -73,8 +76,8 @@ func testAccCheckVpnGatewayAttachmentImportStateIDFunc(resourceName string) reso func TestAccNet_WithVpnGatewayAttachment_deleted(t *testing.T) { t.Parallel() - var vgw oscgo.VirtualGateway var vpc oscgo.Net + var vgw oscgo.VirtualGateway testDeleted := func(n string) resource.TestCheckFunc { return func(s *terraform.State) error { @@ -104,8 +107,7 @@ func TestAccNet_WithVpnGatewayAttachment_deleted(t *testing.T) { "outscale_virtual_gateway.test", &vgw), testAccCheckOAPIVpnGatewayAttachmentExists( - "outscale_virtual_gateway_link.test", - &vgw), + "outscale_virtual_gateway_link.test"), ), }, { @@ -118,8 +120,9 @@ func TestAccNet_WithVpnGatewayAttachment_deleted(t *testing.T) { }) } -func testAccCheckOAPIVpnGatewayAttachmentExists(n string, vgw *oscgo.VirtualGateway) resource.TestCheckFunc { +func testAccCheckOAPIVpnGatewayAttachmentExists(n string) resource.TestCheckFunc { return func(s *terraform.State) error { + conn := testAccProvider.Meta().(*OutscaleClient).OSCAPI rs, ok := s.RootModule().Resources[n] if !ok { return fmt.Errorf("Not found: %s", n) @@ -129,23 +132,36 @@ func testAccCheckOAPIVpnGatewayAttachmentExists(n string, vgw *oscgo.VirtualGate return fmt.Errorf("No ID is set") } - vpcID := rs.Primary.Attributes["net_id"] - vgwID := rs.Primary.Attributes["virtual_gateway_id"] + var resp oscgo.ReadVirtualGatewaysResponse + var err error - if len(vgw.GetNetToVirtualGatewayLinks()) == 0 { - return fmt.Errorf("vpn gateway %q has no attachments", vgwID) + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + rp, httpResp, err := conn.VirtualGatewayApi.ReadVirtualGateways(context.Background()).ReadVirtualGatewaysRequest(oscgo.ReadVirtualGatewaysRequest{ + Filters: &oscgo.FiltersVirtualGateway{VirtualGatewayIds: &[]string{rs.Primary.ID}}, + }).Execute() + if err != nil { + return utils.CheckThrottling(httpResp, err) + } + resp = rp + return nil + }) + if err != nil { + return err } + if len(resp.GetVirtualGateways()) == 0 { + return fmt.Errorf("Virtual gateway has no attachments") + } + vgw := resp.GetVirtualGateways()[0] if vgw.GetNetToVirtualGatewayLinks()[0].GetState() != "attached" { - return fmt.Errorf("Expected VPN Gateway %q to be in attached state, but got: %q", - vgwID, vgw.GetNetToVirtualGatewayLinks()[0].GetState()) + return fmt.Errorf("Expected Virtual Gateway to be in attached state, but got: %q", + vgw.GetNetToVirtualGatewayLinks()[0].GetState()) } - if vgw.GetNetToVirtualGatewayLinks()[0].GetNetId() != vpcID { - return fmt.Errorf("Expected VPN Gateway %q to be attached to VPC %q, but got: %q", - vgwID, vpcID, vgw.GetNetToVirtualGatewayLinks()[0].GetNetId()) + if vgw.GetNetToVirtualGatewayLinks()[0].GetNetId() == "" { + return fmt.Errorf("Expected Virtual Gateway to be attached to VPC, but got: %q", + vgw.GetNetToVirtualGatewayLinks()[0].GetNetId()) } - return nil } } @@ -158,8 +174,7 @@ func testAccCheckOAPIVpnGatewayAttachmentDestroy(s *terraform.State) error { continue } - vgwID := rs.Primary.Attributes["vpn_gateway_id"] - + vgwID := rs.Primary.Attributes["virtual_gateway_id"] var resp oscgo.ReadVirtualGatewaysResponse var err error diff --git a/outscale/resource_outscale_virtual_gateway_route_propagation.go b/outscale/resource_outscale_virtual_gateway_route_propagation.go index 4ad80fb43..56170c568 100644 --- a/outscale/resource_outscale_virtual_gateway_route_propagation.go +++ b/outscale/resource_outscale_virtual_gateway_route_propagation.go @@ -6,11 +6,10 @@ import ( "log" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceOutscaleOAPIVirtualGatewayRoutePropagation() *schema.Resource { diff --git a/outscale/resource_outscale_virtual_gateway_route_propagation_test.go b/outscale/resource_outscale_virtual_gateway_route_propagation_test.go index 391b1ad03..1a6307d18 100644 --- a/outscale/resource_outscale_virtual_gateway_route_propagation_test.go +++ b/outscale/resource_outscale_virtual_gateway_route_propagation_test.go @@ -9,8 +9,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccNet_WithVirtualRoutePropagation_basic(t *testing.T) { diff --git a/outscale/resource_outscale_virtual_gateway_test.go b/outscale/resource_outscale_virtual_gateway_test.go index a8572cee7..52a06c000 100644 --- a/outscale/resource_outscale_virtual_gateway_test.go +++ b/outscale/resource_outscale_virtual_gateway_test.go @@ -8,11 +8,10 @@ import ( "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccNet_WithVirtualGateway_basic(t *testing.T) { diff --git a/outscale/resource_outscale_vm.go b/outscale/resource_outscale_vm.go index abf3f51ed..039b0f4fe 100644 --- a/outscale/resource_outscale_vm.go +++ b/outscale/resource_outscale_vm.go @@ -9,8 +9,8 @@ import ( "net/http" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" @@ -41,7 +41,7 @@ func resourceOutscaleOApiVM() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bsu": { - Type: schema.TypeList, + Type: schema.TypeSet, Optional: true, Computed: true, MaxItems: 1, @@ -50,6 +50,7 @@ func resourceOutscaleOApiVM() *schema.Resource { "delete_on_vm_deletion": { Type: schema.TypeBool, Optional: true, + Computed: true, }, "iops": { Type: schema.TypeInt, @@ -244,7 +245,6 @@ func resourceOutscaleOApiVM() *schema.Resource { }, "link_nic": { Type: schema.TypeList, - MaxItems: 1, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -431,8 +431,7 @@ func resourceOutscaleOApiVM() *schema.Resource { ForceNew: true, }, "link_nic": { - Type: schema.TypeList, - MaxItems: 1, + Type: schema.TypeSet, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -571,13 +570,11 @@ func resourceOutscaleOApiVM() *schema.Resource { }, "block_device_mappings_created": { Type: schema.TypeList, - Optional: true, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bsu": { - Type: schema.TypeMap, - Optional: true, + Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -590,11 +587,11 @@ func resourceOutscaleOApiVM() *schema.Resource { Computed: true, }, "state": { - Type: schema.TypeInt, + Type: schema.TypeString, Computed: true, }, "volume_id": { - Type: schema.TypeFloat, + Type: schema.TypeString, Computed: true, }, }, @@ -894,7 +891,6 @@ func getOAPIVMAdminPassword(VMID string, conn *oscgo.APIClient) (string, error) func resourceOAPIVMUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI - id := d.Get("vm_id").(string) nothingToDo := true @@ -1225,7 +1221,7 @@ func expandBlockDeviceOApiMappings(d *schema.ResourceData) ([]oscgo.BlockDeviceM blockDevice := oscgo.BlockDeviceMappingVmCreation{} value := v.(map[string]interface{}) - if bsu, ok := value["bsu"].([]interface{}); ok && len(bsu) > 0 { + if bsu := value["bsu"].(*schema.Set).List(); len(bsu) > 0 { expandBSU, err := expandBlockDeviceBSU(bsu[0].(map[string]interface{})) if err != nil { return nil, err diff --git a/outscale/resource_outscale_vm_test.go b/outscale/resource_outscale_vm_test.go index a9178afb5..17d1711b5 100644 --- a/outscale/resource_outscale_vm_test.go +++ b/outscale/resource_outscale_vm_test.go @@ -11,9 +11,9 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccVM_Basic(t *testing.T) { @@ -133,7 +133,7 @@ func testAccCheckOutscaleVMImportStateIDFunc(resourceName string) resource.Impor func TestAccNet_VM_withNicAttached(t *testing.T) { var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" resourceName := "outscale_vm.basic" resource.Test(t, resource.TestCase{ @@ -158,7 +158,8 @@ func TestAccVM_withTags(t *testing.T) { t.Parallel() var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" + tagsValue := "test_tags1" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -166,7 +167,7 @@ func TestAccVM_withTags(t *testing.T) { CheckDestroy: testAccCheckOutscaleOAPIVMDestroy, Steps: []resource.TestStep{ { - Config: testAccVmsConfigUpdateOAPIVMTags(omi, "tinav4.c2r2p2", utils.GetRegion(), "Terraform-VM", keypair), + Config: testAccVmsConfigUpdateOAPIVMTags(omi, "tinav4.c2r2p2", utils.GetRegion(), tagsValue, keypair), Check: resource.ComposeTestCheckFunc( testAccCheckOutscaleOAPIVMExists("outscale_vm.basic", &server), testAccCheckOutscaleOAPIVMAttributes(t, &server, omi), @@ -183,7 +184,7 @@ func TestAccVM_withTags(t *testing.T) { func TestAccNet_VM_withNics(t *testing.T) { var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -205,46 +206,10 @@ func TestAccNet_VM_withNics(t *testing.T) { }) } -func TestAccVM_UpdateKeypair(t *testing.T) { - t.Parallel() - omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") - sgId := os.Getenv("OUTSCALE_SECURITYGROUPID") - region := utils.GetRegion() - - var before oscgo.Vm - var after oscgo.Vm - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckOutscaleOAPIVMDestroy, - Steps: []resource.TestStep{ - { - Config: testAccVmsConfigUpdateOAPIVMKey(omi, "tinav4.c2r2p2", region, keypair, sgId), - Check: resource.ComposeTestCheckFunc( - testAccCheckOutscaleOAPIVMExists("outscale_vm.basic", &before), - testAccCheckOutscaleOAPIVMAttributes(t, &before, omi), - resource.TestCheckResourceAttr("outscale_vm.basic", "image_id", omi), - resource.TestCheckResourceAttr("outscale_vm.basic", "vm_type", "tinav4.c2r2p2"), - ), - }, - { - Config: testAccVmsConfigUpdateOAPIVMKey(omi, "tinav4.c2r2p2", region, keypair, sgId), - Check: resource.ComposeTestCheckFunc( - testAccCheckOAPIVMExists("outscale_vm.basic", &after), - testAccCheckOAPIVMNotRecreated(t, &before, &after), - resource.TestCheckResourceAttr("outscale_vm.basic", "vm_type", "tinav4.c2r2p2"), - ), - }, - }, - }) -} - -func TestAccNet_VM_WithSubnet(t *testing.T) { +func TestAccOutscaleOAPIVM_WithSubnet(t *testing.T) { var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -269,7 +234,7 @@ func TestAccNet_VM_WithSubnet(t *testing.T) { func TestAccVM_UpdateDeletionProtection(t *testing.T) { t.Parallel() omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -277,15 +242,15 @@ func TestAccVM_UpdateDeletionProtection(t *testing.T) { CheckDestroy: testAccCheckOutscaleOAPIVMDestroy, Steps: []resource.TestStep{ { - Config: testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, "true", keypair), + Config: testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, keypair, true), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("outscale_vm.outscale_vm", "deletion_protection", "true"), + resource.TestCheckResourceAttr("outscale_vm.outscale_vm1", "deletion_protection", "true"), ), }, { - Config: testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, "false", keypair), + Config: testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, keypair, false), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("outscale_vm.outscale_vm", "deletion_protection", "false"), + resource.TestCheckResourceAttr("outscale_vm.outscale_vm1", "deletion_protection", "false"), ), }, }, @@ -295,7 +260,8 @@ func TestAccVM_UpdateDeletionProtection(t *testing.T) { func TestAccVM_UpdateTags(t *testing.T) { t.Parallel() omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" + tagsValue := "test_tags1" //TODO: check tags resource.Test(t, resource.TestCase{ @@ -304,7 +270,7 @@ func TestAccVM_UpdateTags(t *testing.T) { CheckDestroy: testAccCheckOutscaleOAPIVMDestroy, Steps: []resource.TestStep{ { - Config: testAccVmsConfigUpdateOAPIVMTags(omi, "tinav4.c2r2p2", utils.GetRegion(), "Terraform-VM", keypair), + Config: testAccVmsConfigUpdateOAPIVMTags(omi, "tinav4.c2r2p2", utils.GetRegion(), tagsValue, keypair), //Check: resource.ComposeTestCheckFunc(), }, { @@ -318,7 +284,7 @@ func TestAccVM_UpdateTags(t *testing.T) { func TestAccNet_WithVM_PublicIp_Link(t *testing.T) { var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" vmType := "tinav4.c2r2p2" resource.Test(t, resource.TestCase{ @@ -345,10 +311,10 @@ func TestAccVM_multiBlockDeviceMapping(t *testing.T) { t.Parallel() var server oscgo.Vm omi := os.Getenv("OUTSCALE_IMAGEID") - keypair := os.Getenv("OUTSCALE_KEYPAIR") + keypair := "terraform-basic" resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheckValues(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckOutscaleOAPIVMDestroy, Steps: []resource.TestStep{ @@ -417,15 +383,15 @@ func testAccCheckOutscaleVMWithMultiBlockDeviceMapping(region, omi, keypair stri `, region, omi, keypair) } -func testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, deletionProtection, keypair string) string { +func testAccCheckOutscaleDeletionProtectionUpdateBasic(omi, keypair string, deletionProtection bool) string { return fmt.Sprintf(` - resource "outscale_vm" "outscale_vm" { + resource "outscale_vm" "outscale_vm1" { image_id = "%[1]s" vm_type = "tinav4.c2r2p2" - keypair_name = "%[3]s" - deletion_protection = %[2]s + keypair_name = "%[2]s" + deletion_protection = %[3]t } - `, omi, deletionProtection, keypair) + `, omi, keypair, deletionProtection) } //TODO: check if is needed @@ -636,12 +602,6 @@ func testAccCheckOutscaleOAPIVMConfigBasic(omi, vmType, region, keypair string) vm_type = "%[2]s" keypair_name = "%[4]s" placement_subregion_name = "%[3]s" - #placement_tenancy = "dedicated" - #nested_virtualization = true - tags { - key = "name" - value = "Terraform-VM" - } }`, omi, vmType, region, keypair) } @@ -756,31 +716,8 @@ func testAccCheckOutscaleOAPIVMConfigBasicWithNics(omi, vmType, keypair, region }`, omi, vmType, keypair, region) } -func testAccVmsConfigUpdateOAPIVMKey(omi, vmType, region, keypair, sgId string) string { - return fmt.Sprintf(` - resource "outscale_security_group" "sg" { - security_group_name = "%[4]s" - description = "Used in the terraform acceptance tests" - - tags { - key = "Name" - value = "tf-acc-test" - } - } - - resource "outscale_vm" "basic" { - image_id = "%[1]s" - vm_type = "%[2]s" - keypair_name = "%[4]s" - security_group_ids = ["%[5]s"] - placement_subregion_name = "%[3]sb" - } - `, omi, vmType, region, keypair, sgId) -} - func testAccVmsConfigUpdateOAPIVMTags(omi, vmType, region, value, keypair string) string { return fmt.Sprintf(` - resource "outscale_vm" "basic" { image_id = "%[1]s" vm_type = "%[2]s" @@ -830,6 +767,46 @@ func testAccCheckOutscaleOAPIVMConfigWithSubnet(omi, vmType, region, keypair str `, omi, vmType, region, keypair) } +func testAccCheckOutscaleOAPIVMConfigWithBlockDeviceMappings(omi, vmType, region, keypair string) string { + return fmt.Sprintf(` + resource "outscale_volume" "external1" { + subregion_name = "%[3]sa" + size = 1 + } + + resource "outscale_snapshot" "snapshot" { + volume_id = outscale_volume.external1.id + } + + resource "outscale_vm" "basic" { + image_id = "%[1]s" + vm_type = "%[2]s" + keypair_name = "%[4]s" + + block_device_mappings { + device_name = "/dev/sdb" + no_device = "/dev/xvdb" + bsu { + volume_size = 15 + volume_type = "standard" + snapshot_id = outscale_snapshot.snapshot.id + delete_on_vm_deletion = true + } + } + + block_device_mappings { + device_name = "/dev/sdc" + bsu { + volume_size = 22 + #volume_type = "io1" + #iops = 150 + delete_on_vm_deletion = true + } + } + } + `, omi, vmType, region, keypair) +} + func testAccCheckOutscaleOAPIVMConfigWithNet(omi, vmType, region, keypair string) string { return fmt.Sprintf(` resource "outscale_net" "outscale_net" { diff --git a/outscale/resource_outscale_volume.go b/outscale/resource_outscale_volume.go index 39e779382..43e3d490b 100644 --- a/outscale/resource_outscale_volume.go +++ b/outscale/resource_outscale_volume.go @@ -11,8 +11,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) func resourceOutscaleOAPIVolume() *schema.Resource { @@ -189,7 +189,6 @@ func resourceOAPIVolumeCreate(d *schema.ResourceData, meta interface{}) error { return err } } - return resourceOAPIVolumeRead(d, meta) } @@ -246,7 +245,6 @@ func resourceOAPIVolumeUpdate(d *schema.ResourceData, meta interface{}) error { if err != nil { return fmt.Errorf("Error waiting for Volume (%s) to update: %s", d.Id(), err) } - return resourceOAPIVolumeRead(d, meta) } diff --git a/outscale/resource_outscale_volume_test.go b/outscale/resource_outscale_volume_test.go index 6a9f5e1a4..b302d3b34 100644 --- a/outscale/resource_outscale_volume_test.go +++ b/outscale/resource_outscale_volume_test.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_Volume_basic(t *testing.T) { diff --git a/outscale/resource_outscale_volumes_link.go b/outscale/resource_outscale_volumes_link.go index cb515ed2c..ec49441bd 100644 --- a/outscale/resource_outscale_volumes_link.go +++ b/outscale/resource_outscale_volumes_link.go @@ -7,13 +7,12 @@ import ( "net/http" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/openlyinc/pointy" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" - - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func resourceOutscaleOAPIVolumeLink() *schema.Resource { diff --git a/outscale/resource_outscale_volumes_link_test.go b/outscale/resource_outscale_volumes_link_test.go index 264f5571e..66b6211f8 100644 --- a/outscale/resource_outscale_volumes_link_test.go +++ b/outscale/resource_outscale_volumes_link_test.go @@ -8,8 +8,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccVM_WithVolumeAttachment_basic(t *testing.T) { @@ -49,7 +49,7 @@ func TestAccVM_ImportVolumeAttachment_Basic(t *testing.T) { resourceName := "outscale_volumes_link.ebs_att" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheckValues(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckOAPIVolumeAttachmentDestroy, Steps: []resource.TestStep{ diff --git a/outscale/resource_outscale_vpn_connection.go b/outscale/resource_outscale_vpn_connection.go index 3b35cf126..bfe638b45 100644 --- a/outscale/resource_outscale_vpn_connection.go +++ b/outscale/resource_outscale_vpn_connection.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/spf13/cast" "github.com/terraform-providers/terraform-provider-outscale/utils" @@ -223,7 +223,6 @@ func resourceOutscaleVPNConnectionUpdate(d *schema.ResourceData, meta interface{ if err := setOSCAPITags(conn, d); err != nil { return err } - return resourceOutscaleVPNConnectionRead(d, meta) } diff --git a/outscale/resource_outscale_vpn_connection_route.go b/outscale/resource_outscale_vpn_connection_route.go index 32b1f9304..1d54cae84 100644 --- a/outscale/resource_outscale_vpn_connection_route.go +++ b/outscale/resource_outscale_vpn_connection_route.go @@ -9,11 +9,10 @@ import ( "strings" "time" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" - "github.com/terraform-providers/terraform-provider-outscale/utils" - + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" + "github.com/terraform-providers/terraform-provider-outscale/utils" ) func resourceOutscaleVPNConnectionRoute() *schema.Resource { diff --git a/outscale/resource_outscale_vpn_connection_route_test.go b/outscale/resource_outscale_vpn_connection_route_test.go index 0ee2f9477..b577a847d 100644 --- a/outscale/resource_outscale_vpn_connection_route_test.go +++ b/outscale/resource_outscale_vpn_connection_route_test.go @@ -10,8 +10,8 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOthers_VPNConnectionRoute_basic(t *testing.T) { diff --git a/outscale/resource_outscale_vpn_connection_test.go b/outscale/resource_outscale_vpn_connection_test.go index aeb2cd3a8..c718a1216 100644 --- a/outscale/resource_outscale_vpn_connection_test.go +++ b/outscale/resource_outscale_vpn_connection_test.go @@ -9,14 +9,14 @@ import ( oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/terraform-providers/terraform-provider-outscale/utils" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) func TestAccOutscaleVPNConnection_basic(t *testing.T) { t.Parallel() - resourceName := "outscale_vpn_connection.foo" + resourceName := "outscale_vpn_connection.vpn_basic" publicIP := fmt.Sprintf("172.0.0.%d", utils.RandIntRange(1, 255)) @@ -26,18 +26,6 @@ func TestAccOutscaleVPNConnection_basic(t *testing.T) { Providers: testAccProviders, CheckDestroy: testAccOutscaleVPNConnectionDestroy, Steps: []resource.TestStep{ - { - Config: testAccOutscaleVPNConnectionConfigWithoutStaticRoutes(publicIP), - Check: resource.ComposeTestCheckFunc( - testAccOutscaleVPNConnectionExists(resourceName), - resource.TestCheckResourceAttrSet(resourceName, "client_gateway_id"), - resource.TestCheckResourceAttrSet(resourceName, "virtual_gateway_id"), - resource.TestCheckResourceAttrSet(resourceName, "connection_type"), - resource.TestCheckResourceAttrSet(resourceName, "vgw_telemetries.#"), - - resource.TestCheckResourceAttr(resourceName, "connection_type", "ipsec.1"), - ), - }, { Config: testAccOutscaleVPNConnectionConfig(publicIP, true), Check: resource.ComposeTestCheckFunc( @@ -130,7 +118,7 @@ func TestAccOutscaleVPNConnection_withTags(t *testing.T) { func TestAccOutscaleVPNConnection_importBasic(t *testing.T) { t.Parallel() - resourceName := "outscale_vpn_connection.foo" + resourceName := "outscale_vpn_connection.vpn_basic" publicIP := fmt.Sprintf("172.0.0.%d", utils.RandIntRange(1, 255)) @@ -242,9 +230,9 @@ func testAccOutscaleVPNConnectionConfig(publicIP string, staticRoutesOnly bool) connection_type = "ipsec.1" } - resource "outscale_vpn_connection" "foo" { - client_gateway_id = "${outscale_client_gateway.customer_gateway.id}" - virtual_gateway_id = "${outscale_virtual_gateway.virtual_gateway.id}" + resource "outscale_vpn_connection" "vpn_basic" { + client_gateway_id = outscale_client_gateway.customer_gateway.id + virtual_gateway_id = outscale_virtual_gateway.virtual_gateway.id connection_type = "ipsec.1" static_routes_only = "%t" } @@ -264,8 +252,8 @@ func testAccOutscaleVPNConnectionConfigWithoutStaticRoutes(publicIP string) stri } resource "outscale_vpn_connection" "foo" { - client_gateway_id = "${outscale_client_gateway.customer_gateway.id}" - virtual_gateway_id = "${outscale_virtual_gateway.virtual_gateway.id}" + client_gateway_id = outscale_client_gateway.customer_gateway.id + virtual_gateway_id = outscale_virtual_gateway.virtual_gateway.id connection_type = "ipsec.1" } `, publicIP) @@ -284,8 +272,8 @@ func testAccOutscaleVPNConnectionConfigWithTags(publicIP, value string) string { } resource "outscale_vpn_connection" "foo" { - client_gateway_id = "${outscale_client_gateway.customer_gateway.id}" - virtual_gateway_id = "${outscale_virtual_gateway.virtual_gateway.id}" + client_gateway_id = outscale_client_gateway.customer_gateway.id + virtual_gateway_id = outscale_virtual_gateway.virtual_gateway.id connection_type = "ipsec.1" static_routes_only = true diff --git a/outscale/sweeper_test.go b/outscale/sweeper_test.go index a15927576..4723c1e50 100644 --- a/outscale/sweeper_test.go +++ b/outscale/sweeper_test.go @@ -3,7 +3,7 @@ package outscale import ( "testing" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) func TestMain(m *testing.M) { diff --git a/scripts/generate-certificate.sh b/scripts/generate-certificate.sh index 3eb977ed5..9d34e2ee3 100755 --- a/scripts/generate-certificate.sh +++ b/scripts/generate-certificate.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -e -x project_dir=$(cd "$(dirname $0)" && pwd) project_root=$(cd $project_dir/.. && pwd) @@ -27,7 +27,7 @@ EOF EOF delete = "" } - working_directory = "${path.module}/." + working_directory = path.module } ' > "outscale/$tf_file" diff --git a/terraform-registry-manifest.json b/terraform-registry-manifest.json new file mode 100644 index 000000000..1931b0e00 --- /dev/null +++ b/terraform-registry-manifest.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "metadata": { + "protocol_versions": ["5.0"] + } +} diff --git a/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.ref index 7c5b773f5..afdafc6a0 100644 --- a/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.ref @@ -110,8 +110,10 @@ { "schema_version": 0, "attributes": { - "flexible_gpu_id": "##id-0##", - "id": "##id-0##", + "flexible_gpu_ids": [ + "##id-0##" + ], + "id": "##id-2##", "request_id": "########", "timeouts": null, "vm_id": "##id-1##" @@ -135,7 +137,7 @@ { "schema_version": 0, "attributes": { - "id": "##id-2##", + "id": "##id-3##", "keypair_fingerprint": "########", "keypair_name": "KP-TF177", "private_key": "########", @@ -162,12 +164,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-3##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" } ], @@ -178,7 +182,7 @@ "get_admin_password": null, "hypervisor": "xen", "id": "##id-1##", - "image_id": "##id-4##", + "image_id": "##id-5##", "is_source_dest_checked": true, "keypair_name": "KP-TF177", "launch_number": 0, @@ -199,14 +203,14 @@ "public_dns_name": "########", "public_ip": "########", "request_id": "########", - "reservation_id": "##id-5##", + "reservation_id": "##id-6##", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": null, "security_group_names": null, "security_groups": [ { - "security_group_id": "##id-6##", + "security_group_id": "##id-7##", "security_group_name": "default" } ], diff --git a/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.tf b/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.tf index c51abaf17..c93dd98e5 100644 --- a/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/flexible_gpu/TF-177_flexible_gpu_datasource_attributes_ok/step1.flexible_gpu_datasource_attributes_ok.tf @@ -20,7 +20,7 @@ resource "outscale_flexible_gpu" "fGPU-1" { resource "outscale_flexible_gpu_link" "link_fGPU" { - flexible_gpu_id = outscale_flexible_gpu.fGPU-1.flexible_gpu_id + flexible_gpu_ids = [outscale_flexible_gpu.fGPU-1.flexible_gpu_id] vm_id = outscale_vm.MaVM.vm_id } diff --git a/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.ref index 742234c0d..6af6bbcbd 100644 --- a/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.ref @@ -38,8 +38,10 @@ { "schema_version": 0, "attributes": { - "flexible_gpu_id": "##id-0##", - "id": "##id-0##", + "flexible_gpu_ids": [ + "##id-0##" + ], + "id": "##id-1##", "request_id": "########", "timeouts": null, "vm_id": "##id-1##" @@ -63,7 +65,7 @@ { "schema_version": 0, "attributes": { - "id": "##id-2##", + "id": "##id-3##", "keypair_fingerprint": "########", "keypair_name": "KP-TF174", "private_key": "########", @@ -90,12 +92,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-3##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" } ], @@ -105,8 +109,8 @@ "deletion_protection": false, "get_admin_password": null, "hypervisor": "xen", - "id": "##id-1##", - "image_id": "##id-4##", + "id": "##id-2##", + "image_id": "##id-5##", "is_source_dest_checked": true, "keypair_name": "KP-TF174", "launch_number": 0, @@ -127,14 +131,14 @@ "public_dns_name": "########", "public_ip": "########", "request_id": "########", - "reservation_id": "##id-5##", + "reservation_id": "##id-6##", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": null, "security_group_names": null, "security_groups": [ { - "security_group_id": "##id-6##", + "security_group_id": "##id-7##", "security_group_name": "default" } ], @@ -144,7 +148,7 @@ "tags": [], "timeouts": null, "user_data": "", - "vm_id": "##id-1##", + "vm_id": "##id-2##", "vm_initiated_shutdown_behavior": "restart", "vm_type": "tinav5.c2r2p1" }, diff --git a/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.tf b/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.tf index 54d816ded..a7cc9a715 100644 --- a/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/flexible_gpu_link/TF-174_flexible_gpu_link_resource_attributes_ok/step1.flexible_gpu_link_resource_attributes_ok.tf @@ -1,25 +1,25 @@ resource "outscale_keypair" "my_keypair" { - keypair_name = "KP-TF174" + keypair_name = "KP-TF174" } resource "outscale_vm" "MaVM" { - image_id = var.image_id - vm_type = var.fgpu_vm_type - keypair_name = outscale_keypair.my_keypair.keypair_name - placement_subregion_name = "${var.region}a" - vm_initiated_shutdown_behavior = "restart" + image_id = var.image_id + vm_type = var.fgpu_vm_type + keypair_name = outscale_keypair.my_keypair.keypair_name + placement_subregion_name = "${var.region}a" + vm_initiated_shutdown_behavior = "restart" } resource "outscale_flexible_gpu" "fGPU-1" { - model_name = "nvidia-p6" - generation = var.fgpu_gen - subregion_name = "${var.region}a" - delete_on_vm_deletion = true + model_name = "nvidia-p6" + generation = var.fgpu_gen + subregion_name = "${var.region}a" + delete_on_vm_deletion = true } resource "outscale_flexible_gpu_link" "link_fGPU" { - flexible_gpu_id = outscale_flexible_gpu.fGPU-1.flexible_gpu_id - vm_id = outscale_vm.MaVM.vm_id + flexible_gpu_ids = [outscale_flexible_gpu.fGPU-1.flexible_gpu_id] + vm_id = outscale_vm.MaVM.vm_id } diff --git a/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.ref index 20d782aac..6d0a850fd 100644 --- a/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.ref @@ -147,8 +147,10 @@ { "schema_version": 0, "attributes": { - "flexible_gpu_id": "##id-0##", - "id": "##id-0##", + "flexible_gpu_ids": [ + "##id-0##" + ], + "id": "##id-4##", "request_id": "########", "timeouts": null, "vm_id": "##id-1##" @@ -172,7 +174,7 @@ { "schema_version": 0, "attributes": { - "id": "##id-4##", + "id": "##id-5##", "keypair_fingerprint": "########", "keypair_name": "KP-TF1775", "private_key": "########", @@ -199,12 +201,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -215,7 +219,7 @@ "get_admin_password": null, "hypervisor": "xen", "id": "##id-1##", - "image_id": "##id-6##", + "image_id": "##id-7##", "is_source_dest_checked": true, "keypair_name": "KP-TF1775", "launch_number": 0, @@ -236,14 +240,14 @@ "public_dns_name": "########", "public_ip": "########", "request_id": "########", - "reservation_id": "##id-7##", + "reservation_id": "##id-8##", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": null, "security_group_names": null, "security_groups": [ { - "security_group_id": "##id-8##", + "security_group_id": "##id-9##", "security_group_name": "default" } ], diff --git a/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.tf b/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.tf index de5935605..252560728 100644 --- a/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/flexible_gpus/TF-175_flexible_gpus_datasource_attributes_ok/step1.flexible_gpus_datasource_attributes_ok.tf @@ -25,7 +25,7 @@ resource "outscale_flexible_gpu" "fGPU-2" { } resource "outscale_flexible_gpu_link" "link_fGPU" { - flexible_gpu_id = outscale_flexible_gpu.fGPU-1.flexible_gpu_id + flexible_gpu_ids = [outscale_flexible_gpu.fGPU-1.flexible_gpu_id] vm_id = outscale_vm.MaVM.vm_id } diff --git a/tests/qa_provider_oapi/data/image/TF-66_image_datasource_attributes_ok/step1.image_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/image/TF-66_image_datasource_attributes_ok/step1.image_datasource_attributes_ok.ref index 01f1e30db..df9035bd9 100644 --- a/tests/qa_provider_oapi/data/image/TF-66_image_datasource_attributes_ok/step1.image_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/image/TF-66_image_datasource_attributes_ok/step1.image_datasource_attributes_ok.ref @@ -559,12 +559,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/image/TF-67_image_resource_attributes_ok/step1.image_no-reboot_resource_std_attributes_ok.ref b/tests/qa_provider_oapi/data/image/TF-67_image_resource_attributes_ok/step1.image_no-reboot_resource_std_attributes_ok.ref index ca9e3a851..da5bb9b02 100644 --- a/tests/qa_provider_oapi/data/image/TF-67_image_resource_attributes_ok/step1.image_no-reboot_resource_std_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/image/TF-67_image_resource_attributes_ok/step1.image_no-reboot_resource_std_attributes_ok.ref @@ -163,12 +163,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-7##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-7##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/image_launch_permission/TF-68_image_launch_permission_resource_attributes_ok/step1.image_launch_permission_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/image_launch_permission/TF-68_image_launch_permission_resource_attributes_ok/step1.image_launch_permission_resource_attributes_ok.ref index c244bde60..df608c1f1 100644 --- a/tests/qa_provider_oapi/data/image_launch_permission/TF-68_image_launch_permission_resource_attributes_ok/step1.image_launch_permission_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/image_launch_permission/TF-68_image_launch_permission_resource_attributes_ok/step1.image_launch_permission_resource_attributes_ok.ref @@ -152,12 +152,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step1.images_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step1.images_datasource_attributes_ok.ref index aba37277f..5a544a4f6 100644 --- a/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step1.images_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step1.images_datasource_attributes_ok.ref @@ -97,12 +97,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step2.images_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step2.images_datasource_attributes_ok.ref index b2784aad5..4d146329a 100644 --- a/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step2.images_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/images/TF-69_images_datasource_attributes_ok/step2.images_datasource_attributes_ok.ref @@ -726,12 +726,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-11##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-11##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step1.public_load_balancer_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step1.public_load_balancer_resource_attributes_ok.ref index 7683bb966..d92d5527b 100644 --- a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step1.public_load_balancer_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step1.public_load_balancer_resource_attributes_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -59,10 +63,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step2.public_load_balancer_resource_add_tag_and_listener_ok.ref b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step2.public_load_balancer_resource_add_tag_and_listener_ok.ref index 8d906ef80..c2d14115b 100644 --- a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step2.public_load_balancer_resource_add_tag_and_listener_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step2.public_load_balancer_resource_add_tag_and_listener_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -67,10 +71,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step3.public_load_balancer_resource_remove_tag_and_listener_ok.ref b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step3.public_load_balancer_resource_remove_tag_and_listener_ok.ref index 46aa28f1f..a26d27184 100644 --- a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step3.public_load_balancer_resource_remove_tag_and_listener_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step3.public_load_balancer_resource_remove_tag_and_listener_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -51,10 +55,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step4.public_load_balancer_resource_update_listener_ok.ref b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step4.public_load_balancer_resource_update_listener_ok.ref index f1071d1ac..2247cf79f 100644 --- a/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step4.public_load_balancer_resource_update_listener_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer/TF-79_public_load_balancer_resource_attributes_ok/step4.public_load_balancer_resource_update_listener_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -51,10 +55,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-83_update_load_balancer_access_logs_ok/step1.load_balancer_attributes_resource_access_logs_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-83_update_load_balancer_access_logs_ok/step1.load_balancer_attributes_resource_access_logs_ok.ref index c5c4289ff..785b040d5 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-83_update_load_balancer_access_logs_ok/step1.load_balancer_attributes_resource_access_logs_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-83_update_load_balancer_access_logs_ok/step1.load_balancer_attributes_resource_access_logs_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -59,10 +63,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -103,7 +109,17 @@ "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": null, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -131,10 +147,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step1.load_balancer_attributes_resource_health_check_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step1.load_balancer_attributes_resource_health_check_ok.ref index db6995e1f..82f28ddd7 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step1.load_balancer_attributes_resource_health_check_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step1.load_balancer_attributes_resource_health_check_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -59,10 +63,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -141,10 +147,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step2.load_balancer_attributes_resource_health_check_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step2.load_balancer_attributes_resource_health_check_ok.ref index 3b32e8dc3..9dbb74a87 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step2.load_balancer_attributes_resource_health_check_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-84_update_load_balancer_health_check_ok/step2.load_balancer_attributes_resource_health_check_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "36", - "healthy_threshold": "10", - "path": "/index.html", - "port": "80", - "protocol": "HTTP", - "timeout": "6", - "unhealthy_threshold": "6" - }, + "health_check": [ + { + "check_interval": 36, + "healthy_threshold": 10, + "path": "/index.html", + "port": 80, + "protocol": "HTTP", + "timeout": 6, + "unhealthy_threshold": 6 + } + ], "id": "##id-0##", "listeners": [ { @@ -59,10 +63,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -141,10 +147,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step1.load_balancer_attributes_resource_update_listener_policy_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step1.load_balancer_attributes_resource_update_listener_policy_ok.ref index c755f1547..c86baa3d7 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step1.load_balancer_attributes_resource_update_listener_policy_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step1.load_balancer_attributes_resource_update_listener_policy_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -59,10 +63,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -103,7 +109,17 @@ "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": null, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -139,10 +155,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -176,26 +194,30 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "cookie_expiration_period": 1, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -229,10 +251,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step2.load_balancer_attributes_resource_update_listener_policy_detach_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step2.load_balancer_attributes_resource_update_listener_policy_detach_ok.ref index 3b6025854..b3008a0d0 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step2.load_balancer_attributes_resource_update_listener_policy_detach_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step2.load_balancer_attributes_resource_update_listener_policy_detach_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -65,10 +69,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -109,7 +115,17 @@ "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": [], + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -141,10 +157,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -177,26 +195,30 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "cookie_expiration_period": 1, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -230,10 +252,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step3.load_balancer_attributes_resource_update_listener_policy_reattach_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step3.load_balancer_attributes_resource_update_listener_policy_reattach_ok.ref index f91293870..e070f0120 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step3.load_balancer_attributes_resource_update_listener_policy_reattach_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-85_update_load_balancer_listener_policy_ok/step3.load_balancer_attributes_resource_update_listener_policy_reattach_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -63,10 +67,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -107,7 +113,17 @@ "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": [], + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -143,10 +159,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -180,26 +198,30 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "cookie_expiration_period": 1, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -233,10 +255,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-86_update_load_balancer_listener_ssl_certificate_ok/step1.load_balancer_attributes_resource_update_listener_ssl_certificate_ok.ref b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-86_update_load_balancer_listener_ssl_certificate_ok/step1.load_balancer_attributes_resource_update_listener_ssl_certificate_ok.ref index 8aaf4105e..bcd2dc6b1 100644 --- a/tests/qa_provider_oapi/data/load_balancer_attributes/TF-86_update_load_balancer_listener_ssl_certificate_ok/step1.load_balancer_attributes_resource_update_listener_ssl_certificate_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_attributes/TF-86_update_load_balancer_listener_ssl_certificate_ok/step1.load_balancer_attributes_resource_update_listener_ssl_certificate_ok.ref @@ -9,29 +9,33 @@ "mode": "managed", "type": "outscale_load_balancer", "name": "public_lbu1", - "provider": "provider[\"registry.terraform.io/outscale-dev/outscale\"]", + "provider": "provider[\"registry.terraform.io/outscale/outscale\"]", "instances": [ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -51,10 +55,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "###region###a" @@ -78,7 +84,7 @@ "mode": "managed", "type": "outscale_load_balancer_attributes", "name": "attributes-ssl-certificate", - "provider": "provider[\"registry.terraform.io/outscale-dev/outscale\"]", + "provider": "provider[\"registry.terraform.io/outscale/outscale\"]", "instances": [ { "schema_version": 0, @@ -94,7 +100,17 @@ "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": null, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -114,10 +130,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": "##id-3##", - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "###region###a" @@ -143,7 +161,7 @@ "mode": "managed", "type": "outscale_server_certificate", "name": "my_server_certificate_TF-86", - "provider": "provider[\"registry.terraform.io/outscale-dev/outscale\"]", + "provider": "provider[\"registry.terraform.io/outscale/outscale\"]", "instances": [ { "schema_version": 0, @@ -169,7 +187,7 @@ "mode": "managed", "type": "outscale_server_certificate", "name": "my_server_certificate_TF-86_2", - "provider": "provider[\"registry.terraform.io/outscale-dev/outscale\"]", + "provider": "provider[\"registry.terraform.io/outscale/outscale\"]", "instances": [ { "schema_version": 0, diff --git a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-87_load_balancer_listener_rule_datasource_attributes_ok/step1.load_balancer_listener_rule_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-87_load_balancer_listener_rule_datasource_attributes_ok/step1.load_balancer_listener_rule_datasource_attributes_ok.ref index e4788beeb..0374da0f8 100644 --- a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-87_load_balancer_listener_rule_datasource_attributes_ok/step1.load_balancer_listener_rule_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-87_load_balancer_listener_rule_datasource_attributes_ok/step1.load_balancer_listener_rule_datasource_attributes_ok.ref @@ -63,24 +63,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-5##", "listeners": [ { @@ -100,10 +104,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-6##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-6##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -244,12 +250,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-11##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-11##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step1.load_balancer_listener_rule_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step1.load_balancer_listener_rule_resource_attributes_ok.ref index 645577f41..f8e4a2f8f 100644 --- a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step1.load_balancer_listener_rule_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step1.load_balancer_listener_rule_resource_attributes_ok.ref @@ -36,24 +36,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-1##", "listeners": [ { @@ -73,10 +77,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -259,12 +265,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-12##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-12##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step2.load_balancer_listener_rule_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step2.load_balancer_listener_rule_resource_attributes_ok.ref index f9aafb456..6559cbaf2 100644 --- a/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step2.load_balancer_listener_rule_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_listener_rule/TF-88_load_balancer_listener_rule_resource_attributes_ok/step2.load_balancer_listener_rule_resource_attributes_ok.ref @@ -36,26 +36,30 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [ "##id-1##" ], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -75,10 +79,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -261,12 +267,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-12##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-12##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_listener_rules/TF-89_load_balancer_listener_rules_datasource_attributes_ok/step1.load_balancer_listener_rules_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_listener_rules/TF-89_load_balancer_listener_rules_datasource_attributes_ok/step1.load_balancer_listener_rules_datasource_attributes_ok.ref index 8ba3ecdb2..de195dd2b 100644 --- a/tests/qa_provider_oapi/data/load_balancer_listener_rules/TF-89_load_balancer_listener_rules_datasource_attributes_ok/step1.load_balancer_listener_rules_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_listener_rules/TF-89_load_balancer_listener_rules_datasource_attributes_ok/step1.load_balancer_listener_rules_datasource_attributes_ok.ref @@ -79,24 +79,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-6##", "listeners": [ { @@ -116,10 +120,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-7##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-7##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -260,12 +266,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-11##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-11##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_policy/TF-90_load_balancer_policy_resource_attributes_ok/step1.load_balancer_policy_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_policy/TF-90_load_balancer_policy_resource_attributes_ok/step1.load_balancer_policy_resource_attributes_ok.ref index 5b74590fc..dbfb49347 100644 --- a/tests/qa_provider_oapi/data/load_balancer_policy/TF-90_load_balancer_policy_resource_attributes_ok/step1.load_balancer_policy_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_policy/TF-90_load_balancer_policy_resource_attributes_ok/step1.load_balancer_policy_resource_attributes_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -51,10 +55,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -80,26 +86,30 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "cookie_expiration_period": 1, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -125,10 +135,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -157,12 +169,14 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [ { "cookie_name": "########", @@ -173,15 +187,17 @@ "cookie_expiration_period": null, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-3##", "listeners": [ { @@ -207,10 +223,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -240,12 +258,14 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [ { "cookie_name": "########", @@ -256,15 +276,17 @@ "cookie_expiration_period": 1, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-4##", "listeners": [ { @@ -293,10 +315,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -327,12 +351,14 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [ { "cookie_name": "########", @@ -347,15 +373,17 @@ "cookie_expiration_period": null, "cookie_name": "########", "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-5##", "listeners": [ { @@ -384,10 +412,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_tags/TF-91_load_balancer_tags_datasource_attributes_ok/step1.load_balancer_tags_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_tags/TF-91_load_balancer_tags_datasource_attributes_ok/step1.load_balancer_tags_datasource_attributes_ok.ref index 2f55c652c..e5e7516ea 100644 --- a/tests/qa_provider_oapi/data/load_balancer_tags/TF-91_load_balancer_tags_datasource_attributes_ok/step1.load_balancer_tags_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_tags/TF-91_load_balancer_tags_datasource_attributes_ok/step1.load_balancer_tags_datasource_attributes_ok.ref @@ -62,24 +62,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-1##", "listeners": [ { @@ -99,10 +103,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -136,24 +142,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-3##", "listeners": [ { @@ -173,10 +183,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/load_balancer_vm_health/TF-92_load_balancer_vm_health_datasource_attributes_ok/step1.load_balancer_vm_health_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_vm_health/TF-92_load_balancer_vm_health_datasource_attributes_ok/step1.load_balancer_vm_health_datasource_attributes_ok.ref index 2e941a8b9..3a3acb1e5 100644 --- a/tests/qa_provider_oapi/data/load_balancer_vm_health/TF-92_load_balancer_vm_health_datasource_attributes_ok/step1.load_balancer_vm_health_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_vm_health/TF-92_load_balancer_vm_health_datasource_attributes_ok/step1.load_balancer_vm_health_datasource_attributes_ok.ref @@ -65,24 +65,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-3##", "listeners": [ { @@ -102,10 +106,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -146,7 +152,7 @@ { "check_interval": 30, "healthy_threshold": 10, - "path": "", + "path": "/", "port": 8080, "protocol": "HTTP", "timeout": 5, @@ -172,10 +178,12 @@ "request_id": "########", "security_groups": [], "server_certificate_id": null, - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -294,12 +302,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step1.load_balancer_vms_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step1.load_balancer_vms_resource_attributes_ok.ref index 5ee6d3b50..81a5dbe6b 100644 --- a/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step1.load_balancer_vms_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step1.load_balancer_vms_resource_attributes_ok.ref @@ -36,24 +36,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-1##", "listeners": [ { @@ -81,10 +85,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-2##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-2##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -143,12 +149,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -221,12 +229,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step2.load_balancer_vms_resource_remove_vm_ok.ref b/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step2.load_balancer_vms_resource_remove_vm_ok.ref index 7d1b1bc1a..338cc1bc0 100644 --- a/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step2.load_balancer_vms_resource_remove_vm_ok.ref +++ b/tests/qa_provider_oapi/data/load_balancer_vms/TF-93_load_balancer_vms_resource_attributes_ok/step2.load_balancer_vms_resource_remove_vm_ok.ref @@ -36,27 +36,31 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [ "##id-1##", "##id-2##" ], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-3##", "listeners": [ { @@ -84,10 +88,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" @@ -145,12 +151,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -223,12 +231,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-104_net_peering_datasource_attributes_ok/step1.net_peering_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-104_net_peering_datasource_attributes_ok/step1.net_peering_datasource_attributes_ok.ref index ad5f4850b..6aa493ad7 100644 --- a/tests/qa_provider_oapi/data/nets/TF-104_net_peering_datasource_attributes_ok/step1.net_peering_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-104_net_peering_datasource_attributes_ok/step1.net_peering_datasource_attributes_ok.ref @@ -14,24 +14,30 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-0##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-1##" - }, + "accepter_net": [ + { + "account_id": "##id-0##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-1##" + } + ], "filter": "########", "id": "##id-2##", "net_peering_id": "##id-2##", "request_id": "########", - "source_net": { - "account_id": "##id-0##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-3##" - }, - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "source_net": [ + { + "account_id": "##id-0##", + "ip_range": "10.31.0.0/16", + "net_id": "##id-3##" + } + ], + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [ { "key": "Key-2", @@ -102,26 +108,32 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-0##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-1##" - }, + "accepter_net": [ + { + "account_id": "##id-0##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-1##" + } + ], "accepter_net_id": "##id-1##", "id": "##id-2##", "net_peering_id": "##id-2##", "request_id": "########", - "source_net": { - "account_id": "##id-0##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-3##" - }, + "source_net": [ + { + "account_id": "##id-0##", + "ip_range": "10.31.0.0/16", + "net_id": "##id-3##" + } + ], "source_net_account_id": null, "source_net_id": "##id-3##", - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [ { "key": "Key-2", diff --git a/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.ref index 042984f52..38cb5cdec 100644 --- a/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.ref @@ -39,7 +39,7 @@ "attributes": { "dhcp_options_set_id": "##id-0##", "id": "##id-2##", - "ip_range": "10.31.0.0/16", + "ip_range": "10.32.0.0/16", "net_id": "##id-2##", "request_id": "########", "state": "available", @@ -60,26 +60,32 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-3##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-1##" - }, + "accepter_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-1##" + } + ], "accepter_net_id": "##id-1##", "id": "##id-4##", "net_peering_id": "##id-4##", "request_id": "########", - "source_net": { - "account_id": "##id-3##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-2##" - }, + "source_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.32.0.0/16", + "net_id": "##id-2##" + } + ], "source_net_account_id": null, "source_net_id": "##id-2##", - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [] }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.tf index 676d43ebe..894f74dfd 100644 --- a/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-105_net_peering_resource_attributes_ok/step1.net_peering_resource_attributes_ok.tf @@ -3,7 +3,7 @@ resource "outscale_net" "outscale_net" { } resource "outscale_net" "outscale_net2" { - ip_range = "10.31.0.0/16" + ip_range = "10.32.0.0/16" } resource "outscale_net_peering" "outscale_net_peering" { diff --git a/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.ref index 327125618..34e635bb2 100644 --- a/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.ref @@ -16,7 +16,7 @@ "attributes": { "dhcp_options_set_id": "##id-0##", "id": "##id-1##", - "ip_range": "10.10.0.0/24", + "ip_range": "10.12.0.0/24", "net_id": "##id-1##", "request_id": "########", "state": "available", @@ -39,7 +39,7 @@ "attributes": { "dhcp_options_set_id": "##id-0##", "id": "##id-2##", - "ip_range": "10.31.0.0/16", + "ip_range": "10.32.0.0/16", "net_id": "##id-2##", "request_id": "########", "state": "available", @@ -60,26 +60,32 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-3##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-1##" - }, + "accepter_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.12.0.0/24", + "net_id": "##id-1##" + } + ], "accepter_net_id": "##id-1##", "id": "##id-4##", "net_peering_id": "##id-4##", "request_id": "########", - "source_net": { - "account_id": "##id-3##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-2##" - }, + "source_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.32.0.0/16", + "net_id": "##id-2##" + } + ], "source_net_account_id": null, "source_net_id": "##id-2##", - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [ { "key": "name", @@ -105,25 +111,31 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-3##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-1##" - }, + "accepter_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.12.0.0/24", + "net_id": "##id-1##" + } + ], "accepter_net_id": "##id-1##", "id": "##id-4##", "net_peering_id": "##id-4##", "request_id": "########", - "source_net": { - "account_id": "##id-3##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-2##" - }, + "source_net": [ + { + "account_id": "##id-3##", + "ip_range": "10.32.0.0/16", + "net_id": "##id-2##" + } + ], "source_net_id": "##id-2##", - "state": { - "message": "########", - "name": "active" - }, + "state": [ + { + "message": "########", + "name": "active" + } + ], "tags": [ { "key": "name", diff --git a/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.tf index 94b8538b6..0db27f9a5 100644 --- a/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-106_net_peering_acceptation_resource_attributes_ok/step1.net_peering_acceptation_resource_attributes_ok.tf @@ -1,9 +1,9 @@ resource "outscale_net" "outscale_net" { - ip_range = "10.10.0.0/24" + ip_range = "10.12.0.0/24" } resource "outscale_net" "outscale_net2" { - ip_range = "10.31.0.0/16" + ip_range = "10.32.2.0/16" } resource "outscale_net_peering" "outscale_net_peering" { diff --git a/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.ref index 871e5b292..62a4729cf 100644 --- a/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.ref @@ -18,39 +18,60 @@ "id": "##id-0##", "net_peerings": [ { - "accepter_net": { - "account_id": "##id-1##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-2##" - }, + "accepter_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-2##" + } + ], "net_peering_id": "##id-3##", - "source_net": { - "account_id": "##id-1##", - "ip_range": "10.20.0.0/16", - "net_id": "##id-4##" - }, - "state": { - "message": "########", - "name": "pending-acceptance" - }, - "tags": [] + "source_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.31.0.0/16", + "net_id": "##id-4##" + } + ], + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], + "tags": [ + { + "key": "Key", + "value": "value-tags" + }, + { + "key": "Key-2", + "value": "value-tags-2" + } + ] }, { - "accepter_net": { - "account_id": "##id-1##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-2##" - }, + "accepter_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-2##" + } + ], "net_peering_id": "##id-5##", - "source_net": { - "account_id": "##id-1##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-6##" - }, - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "source_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.20.0.0/16", + "net_id": "##id-6##" + } + ], + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [] } ], @@ -67,6 +88,7 @@ "provider": "provider[\"registry.terraform.io/outscale/outscale\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "dhcp_options_set_id": "##id-7##", @@ -75,7 +97,12 @@ "net_id": "##id-2##", "request_id": "########", "state": "available", - "tags": [], + "tags": [ + { + "key": "name", + "value": "net-1" + } + ], "tenancy": "default" }, "sensitive_attributes": [], @@ -93,12 +120,17 @@ "schema_version": 0, "attributes": { "dhcp_options_set_id": "##id-7##", - "id": "##id-6##", + "id": "##id-4##", "ip_range": "10.31.0.0/16", - "net_id": "##id-6##", + "net_id": "##id-4##", "request_id": "########", "state": "available", - "tags": [], + "tags": [ + { + "key": "name", + "value": "net-2" + } + ], "tenancy": "default" }, "sensitive_attributes": [], @@ -116,12 +148,17 @@ "schema_version": 0, "attributes": { "dhcp_options_set_id": "##id-7##", - "id": "##id-4##", + "id": "##id-6##", "ip_range": "10.20.0.0/16", - "net_id": "##id-4##", + "net_id": "##id-6##", "request_id": "########", "state": "available", - "tags": [], + "tags": [ + { + "key": "name", + "value": "net-3" + } + ], "tenancy": "default" }, "sensitive_attributes": [], @@ -138,26 +175,32 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-1##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-2##" - }, + "accepter_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-2##" + } + ], "accepter_net_id": "##id-2##", - "id": "##id-5##", - "net_peering_id": "##id-5##", + "id": "##id-3##", + "net_peering_id": "##id-3##", "request_id": "########", - "source_net": { - "account_id": "##id-1##", - "ip_range": "10.31.0.0/16", - "net_id": "##id-6##" - }, + "source_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.31.0.0/16", + "net_id": "##id-4##" + } + ], "source_net_account_id": null, - "source_net_id": "##id-6##", - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "source_net_id": "##id-4##", + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [ { "key": "Key", @@ -187,26 +230,32 @@ { "schema_version": 0, "attributes": { - "accepter_net": { - "account_id": "##id-1##", - "ip_range": "10.10.0.0/24", - "net_id": "##id-2##" - }, + "accepter_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.10.0.0/24", + "net_id": "##id-2##" + } + ], "accepter_net_id": "##id-2##", - "id": "##id-3##", - "net_peering_id": "##id-3##", + "id": "##id-5##", + "net_peering_id": "##id-5##", "request_id": "########", - "source_net": { - "account_id": "##id-1##", - "ip_range": "10.20.0.0/16", - "net_id": "##id-4##" - }, + "source_net": [ + { + "account_id": "##id-1##", + "ip_range": "10.20.0.0/16", + "net_id": "##id-6##" + } + ], "source_net_account_id": null, - "source_net_id": "##id-4##", - "state": { - "message": "########", - "name": "pending-acceptance" - }, + "source_net_id": "##id-6##", + "state": [ + { + "message": "########", + "name": "pending-acceptance" + } + ], "tags": [] }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.tf index 1b25b5341..3a7fbbec0 100644 --- a/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-107_net_peerings_datasource_attributes_ok/step1.net_peerings_datasource_attributes_ok.tf @@ -1,34 +1,31 @@ resource "outscale_net" "outscale_net" { - #count = 1 + count = 1 ip_range = "10.10.0.0/24" - # tags { - # key = "name" - # value = "net-1" - #} + tags { + key = "name" + value = "net-1" + } } resource "outscale_net" "outscale_net2" { - #count = 1 - ip_range = "10.31.0.0/16" - # tags { - # key = "name" - # value = "net-2" - # } + tags { + key = "name" + value = "net-2" + } } resource "outscale_net" "outscale_net3" { - #count = 1 ip_range = "10.20.0.0/16" - # tags { - # key = "name" - # value = "net-3" - # } + tags { + key = "name" + value = "net-3" + } } resource "outscale_net_peering" "outscale_net_peering" { - accepter_net_id = outscale_net.outscale_net.net_id + accepter_net_id = outscale_net.outscale_net[0].net_id source_net_id = outscale_net.outscale_net2.net_id tags { key = "Key" @@ -41,7 +38,7 @@ tags { } resource "outscale_net_peering" "outscale_net_peering2" { - accepter_net_id = outscale_net.outscale_net.net_id + accepter_net_id = outscale_net.outscale_net[0].net_id source_net_id = outscale_net.outscale_net3.net_id } diff --git a/tests/qa_provider_oapi/data/nets/TF-109_nic_datasource_attributes_ok/step1.nic_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-109_nic_datasource_attributes_ok/step1.nic_datasource_attributes_ok.ref index 37b9337a6..e3a989d1a 100644 --- a/tests/qa_provider_oapi/data/nets/TF-109_nic_datasource_attributes_ok/step1.nic_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-109_nic_datasource_attributes_ok/step1.nic_datasource_attributes_ok.ref @@ -19,21 +19,8 @@ "filter": "########", "id": "##id-1##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-1##", @@ -42,25 +29,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -106,21 +81,8 @@ "filter": "########", "id": "##id-1##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-1##", @@ -129,25 +91,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -193,21 +143,17 @@ "filter": "########", "id": "##id-5##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "true", - "device_number": "0", - "link_nic_id": "##id-6##", - "state": "attached", - "vm_account_id": "##id-0##", - "vm_id": "##id-7##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": "true", + "device_number": 0, + "link_nic_id": "##id-6##", + "state": "attached", + "vm_account_id": "##id-0##", + "vm_id": "##id-7##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-5##", @@ -216,13 +162,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -259,21 +199,8 @@ "filter": "########", "id": "##id-9##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-9##", @@ -282,25 +209,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -342,21 +257,8 @@ "filter": "########", "id": "##id-1##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-1##", @@ -365,25 +267,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -429,21 +319,8 @@ "filter": "########", "id": "##id-1##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-1##", @@ -452,25 +329,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -538,21 +403,8 @@ "description": "TF-109", "id": "##id-1##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-1##", @@ -560,26 +412,14 @@ "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -633,21 +473,8 @@ "description": "", "id": "##id-9##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-9##", @@ -655,26 +482,14 @@ "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -721,21 +536,8 @@ "description": "", "id": "##id-11##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-11##", @@ -744,13 +546,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -959,12 +755,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-15##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-15##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step1.nic_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step1.nic_resource_attributes_ok.ref index c8683c08c..cf4799657 100644 --- a/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step1.nic_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step1.nic_resource_attributes_ok.ref @@ -41,21 +41,8 @@ "description": "", "id": "##id-3##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-1##", "nic_id": "##id-3##", @@ -64,13 +51,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -112,21 +93,8 @@ "description": "", "id": "##id-6##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-1##", "nic_id": "##id-6##", @@ -134,26 +102,14 @@ "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } diff --git a/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step2.nic_resource_attributes_update.ref b/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step2.nic_resource_attributes_update.ref index 7570e4524..236b83d11 100644 --- a/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step2.nic_resource_attributes_update.ref +++ b/tests/qa_provider_oapi/data/nets/TF-110_nic_resource_attributes_ok/step2.nic_resource_attributes_update.ref @@ -41,21 +41,8 @@ "description": "", "id": "##id-3##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-1##", "nic_id": "##id-3##", @@ -64,13 +51,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -115,21 +96,8 @@ "description": "", "id": "##id-6##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-1##", "nic_id": "##id-6##", @@ -137,26 +105,14 @@ "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } diff --git a/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.ref index 2434b704d..bdc625a4a 100644 --- a/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.ref @@ -38,7 +38,7 @@ "attributes": { "dhcp_options_set_id": "##id-1##", "id": "##id-2##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.10.0.0/16", "net_id": "##id-2##", "request_id": "########", "state": "available", @@ -63,21 +63,8 @@ "description": "", "id": "##id-4##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-4##", @@ -86,13 +73,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -202,7 +183,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-6##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.10.0.0/16", "map_public_ip_on_launch": false, "net_id": "##id-2##", "request_id": "########", @@ -234,12 +215,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.tf index 75907963a..259e8bf99 100644 --- a/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-111_nic_link_resource_attributes_ok/step1.nic_link_resource_attributes_ok.tf @@ -11,7 +11,7 @@ resource "outscale_vm" "outscale_vm" { resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.10.0.0/16" } resource "outscale_security_group" "outscale_security_group" { @@ -22,7 +22,7 @@ resource "outscale_security_group" "outscale_security_group" { resource "outscale_subnet" "outscale_subnet" { subregion_name = "${var.region}a" - ip_range = "10.0.0.0/16" + ip_range = "10.10.0.0/16" net_id = outscale_net.outscale_net.net_id } diff --git a/tests/qa_provider_oapi/data/nets/TF-112_nic_private_ip_resource_attributes_ok/step1.nic_private_ip_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-112_nic_private_ip_resource_attributes_ok/step1.nic_private_ip_resource_attributes_ok.ref index 3a3e899be..5b11871a9 100644 --- a/tests/qa_provider_oapi/data/nets/TF-112_nic_private_ip_resource_attributes_ok/step1.nic_private_ip_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-112_nic_private_ip_resource_attributes_ok/step1.nic_private_ip_resource_attributes_ok.ref @@ -41,21 +41,8 @@ "description": "", "id": "##id-3##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-1##", "nic_id": "##id-3##", @@ -64,13 +51,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } diff --git a/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.ref index aaf59bb5f..83341ce0d 100644 --- a/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.ref @@ -21,21 +21,17 @@ "account_id": "##id-1##", "description": "TF-109", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "1", - "link_nic_id": "##id-2##", - "state": "attached", - "vm_account_id": "##id-1##", - "vm_id": "##id-3##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": false, + "device_number": 1, + "link_nic_id": "##id-2##", + "state": "attached", + "vm_account_id": "##id-1##", + "vm_id": "##id-3##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", "nic_id": "##id-5##", @@ -43,25 +39,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -109,21 +93,17 @@ "account_id": "##id-1##", "description": "Primary network interface", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "true", - "device_number": "0", - "link_nic_id": "##id-9##", - "state": "attached", - "vm_account_id": "##id-1##", - "vm_id": "##id-3##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": true, + "device_number": 0, + "link_nic_id": "##id-9##", + "state": "attached", + "vm_account_id": "##id-1##", + "vm_id": "##id-3##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", "nic_id": "##id-10##", @@ -131,13 +111,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -176,47 +150,31 @@ "account_id": "##id-1##", "description": "", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "2", - "link_nic_id": "##id-13##", - "state": "attached", - "vm_account_id": "##id-1##", - "vm_id": "##id-3##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": false, + "device_number": 2, + "link_nic_id": "##id-13##", + "state": "attached", + "vm_account_id": "##id-1##", + "vm_id": "##id-3##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-13##", + "nic_id": "##id-14##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -241,35 +199,16 @@ "account_id": "##id-1##", "description": "", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-16##", + "nic_id": "##id-15##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -317,35 +256,16 @@ "account_id": "##id-1##", "description": "", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-5##", + "nic_id": "##id-15##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -374,47 +294,31 @@ "account_id": "##id-1##", "description": "TF-109", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "1", - "link_nic_id": "##id-2##", - "state": "attached", - "vm_account_id": "##id-1##", - "vm_id": "##id-3##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": false, + "device_number": 1, + "link_nic_id": "##id-2##", + "state": "attached", + "vm_account_id": "##id-1##", + "vm_id": "##id-3##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-13##", + "nic_id": "##id-5##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -460,23 +364,19 @@ "nics": [ { "account_id": "##id-1##", - "description": "", + "description": "TF-109", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [ + { + "delete_on_vm_deletion": false, + "device_number": 1, + "link_nic_id": "##id-2##", + "state": "attached", + "vm_account_id": "##id-1##", + "vm_id": "##id-3##" + } + ], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", "nic_id": "##id-5##", @@ -484,13 +384,13 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], + "private_dns_name": "########", + "private_ip": "########" + }, + { + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -501,9 +401,9 @@ "security_group_name": "Terraform-SG" } ], - "state": "available", - "subnet_id": "##id-16##", - "subregion_name": "us-east-2b", + "state": "in-use", + "subnet_id": "##id-7##", + "subregion_name": "us-east-2a", "tags": [ { "key": "Key:", @@ -517,49 +417,18 @@ }, { "account_id": "##id-1##", - "description": "TF-109", + "description": "", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "1", - "link_nic_id": "##id-2##", - "state": "attached", - "vm_account_id": "##id-1##", - "vm_id": "##id-3##" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-13##", + "nic_id": "##id-15##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, - "private_dns_name": "########", - "private_ip": "########" - }, - { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -570,9 +439,9 @@ "security_group_name": "Terraform-SG" } ], - "state": "in-use", - "subnet_id": "##id-7##", - "subregion_name": "us-east-2a", + "state": "available", + "subnet_id": "##id-16##", + "subregion_name": "us-east-2b", "tags": [ { "key": "Key:", @@ -607,35 +476,16 @@ "account_id": "##id-1##", "description": "", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-13##", + "nic_id": "##id-15##", "private_dns_name": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -647,7 +497,7 @@ } ], "state": "available", - "subnet_id": "##id-14##", + "subnet_id": "##id-16##", "subregion_name": "us-east-2b", "tags": [ { @@ -678,7 +528,7 @@ "attributes": { "dhcp_options_set_id": "##id-20##", "id": "##id-4##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.5.0.0/16", "net_id": "##id-4##", "request_id": "########", "state": "available", @@ -703,21 +553,8 @@ "description": "TF-109", "id": "##id-5##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", "nic_id": "##id-5##", @@ -725,26 +562,14 @@ "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -796,50 +621,25 @@ "attributes": { "account_id": "##id-1##", "description": "", - "id": "##id-16##", + "id": "##id-14##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-16##", + "nic_id": "##id-14##", "private_dns_name": "########", "private_ip": "########", "private_ips": [ { - "is_primary": false, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": true, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" }, { - "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "is_primary": false, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -884,38 +684,19 @@ "attributes": { "account_id": "##id-1##", "description": "", - "id": "##id-13##", + "id": "##id-15##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-4##", - "nic_id": "##id-13##", + "nic_id": "##id-15##", "private_dns_name": "########", "private_ip": "########", "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -932,7 +713,7 @@ } ], "state": "available", - "subnet_id": "##id-14##", + "subnet_id": "##id-16##", "subregion_name": "us-east-2b", "tags": [ { @@ -998,9 +779,9 @@ "attributes": { "delete_on_vm_deletion": false, "device_number": 2, - "id": "##id-15##", - "link_nic_id": "##id-15##", - "nic_id": "##id-16##", + "id": "##id-13##", + "link_nic_id": "##id-13##", + "nic_id": "##id-14##", "request_id": "########", "state": null, "vm_account_id": null, @@ -1066,7 +847,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-7##", - "ip_range": "10.0.0.0/24", + "ip_range": "10.5.0.0/24", "map_public_ip_on_launch": false, "net_id": "##id-4##", "request_id": "########", @@ -1094,13 +875,13 @@ "schema_version": 0, "attributes": { "available_ips_count": "########", - "id": "##id-14##", - "ip_range": "10.0.2.0/24", + "id": "##id-16##", + "ip_range": "10.5.2.0/24", "map_public_ip_on_launch": false, "net_id": "##id-4##", "request_id": "########", "state": "available", - "subnet_id": "##id-14##", + "subnet_id": "##id-16##", "subregion_name": "us-east-2b", "tags": [], "timeouts": null @@ -1127,12 +908,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-21##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-21##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.tf index 3d6f00824..3cedabcf4 100644 --- a/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-113_nics_datasource_attributes_ok/step1.nics_datasource_attributes_ok.tf @@ -1,16 +1,16 @@ resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.5.0.0/16" } resource "outscale_subnet" "subnet01" { subregion_name = "${var.region}a" - ip_range = "10.0.0.0/24" + ip_range = "10.5.0.0/24" net_id = outscale_net.outscale_net.net_id } resource "outscale_subnet" "subnet02" { subregion_name = "${var.region}b" - ip_range = "10.0.2.0/24" + ip_range = "10.5.2.0/24" net_id = outscale_net.outscale_net.net_id } @@ -33,12 +33,12 @@ resource "outscale_nic" "outscale_nic" { security_group_ids = [outscale_security_group.security_group01.security_group_id] private_ips { is_primary = true - private_ip = "10.0.0.45" + private_ip = "10.5.0.45" } private_ips { is_primary = false - private_ip = "10.0.0.46" + private_ip = "10.5.0.46" } tags { key = "Key:" @@ -54,11 +54,11 @@ resource "outscale_nic" "outscale_nic_2" { subnet_id = outscale_subnet.subnet01.subnet_id private_ips { is_primary = true - private_ip = "10.0.0.41" + private_ip = "10.5.0.41" } private_ips { is_primary = false - private_ip = "10.0.0.42" + private_ip = "10.5.0.42" } tags { key = "Name" @@ -71,7 +71,7 @@ resource "outscale_nic" "outscale_nic_3" { security_group_ids = [outscale_security_group.security_group01.security_group_id] private_ips { is_primary = true - private_ip = "10.0.2.21" + private_ip = "10.5.2.21" } tags { key = "Key:" @@ -117,12 +117,10 @@ data "outscale_nics" "nic-2-main" { depends_on =[outscale_nic_link.nic_link01,outscale_nic_link.nic_link02] } - - data "outscale_nics" "nic-4" { filter { name = "private_ips_private_ips" - values = ["10.0.0.42","10.0.2.21"] + values = ["10.5.0.42","10.5.2.21"] } depends_on=[outscale_nic.outscale_nic,outscale_nic.outscale_nic_2,outscale_nic.outscale_nic_3,outscale_nic_link.nic_link01,outscale_nic_link.nic_link02] } diff --git a/tests/qa_provider_oapi/data/nets/TF-144_vm_resource_centos_attributes_ok/step1.vm_resource_centos_ok.ref b/tests/qa_provider_oapi/data/nets/TF-144_vm_resource_centos_attributes_ok/step1.vm_resource_centos_ok.ref index 438911b91..60e5ceb48 100644 --- a/tests/qa_provider_oapi/data/nets/TF-144_vm_resource_centos_attributes_ok/step1.vm_resource_centos_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-144_vm_resource_centos_attributes_ok/step1.vm_resource_centos_ok.ref @@ -409,12 +409,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-15##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-15##" + } + ], "device_name": "/dev/sda1" } ], @@ -497,12 +499,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-19##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-19##" + } + ], "device_name": "/dev/sda1" } ], @@ -585,12 +589,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-22##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-22##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.ref b/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.ref index f31625fc2..85ffd262b 100644 --- a/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.ref @@ -38,7 +38,7 @@ "attributes": { "dhcp_options_set_id": "##id-1##", "id": "##id-2##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.22.0.0/16", "net_id": "##id-2##", "request_id": "########", "state": "available", @@ -63,21 +63,8 @@ "description": "", "id": "##id-4##", "is_source_dest_checked": true, - "link_nic": { - "delete_on_vm_deletion": "false", - "device_number": "0", - "link_nic_id": "", - "state": "", - "vm_account_id": "", - "vm_id": "" - }, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_nic": [], + "link_public_ip": [], "mac_address": "########", "net_id": "##id-2##", "nic_id": "##id-4##", @@ -86,13 +73,7 @@ "private_ips": [ { "is_primary": true, - "link_public_ip": { - "link_public_ip_id": "", - "public_dns_name": "########", - "public_ip": "########", - "public_ip_account_id": "", - "public_ip_id": "" - }, + "link_public_ip": [], "private_dns_name": "########", "private_ip": "########" } @@ -208,7 +189,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-6##", - "ip_range": "10.0.0.0/24", + "ip_range": "10.22.0.0/24", "map_public_ip_on_launch": false, "net_id": "##id-2##", "request_id": "########", @@ -240,12 +221,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-9##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-9##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.tf b/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.tf index fe549cde9..adf0e2d32 100644 --- a/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-145_vm_resource_private_with_multiple_NICs_attributes_ok/step1.vm_resource_private_with_multiple_NICs_ok.tf @@ -4,12 +4,12 @@ resource "outscale_keypair" "my_keypair" { ## Test Private VM with multiple NICs ## resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.22.0.0/16" } resource "outscale_subnet" "outscale_subnet" { net_id = outscale_net.outscale_net.net_id - ip_range = "10.0.0.0/24" + ip_range = "10.22.0.0/24" subregion_name = "${var.region}a" } @@ -38,7 +38,7 @@ resource "outscale_vm" "outscale_vm" { subnet_id = outscale_subnet.outscale_subnet.subnet_id security_group_ids = [outscale_security_group.outscale_security_group.security_group_id] private_ips { - private_ip ="10.0.0.123" + private_ip ="10.22.0.123" is_primary = true } device_number = "0" diff --git a/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step1.private_load_balancer_update_security_groups.ref b/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step1.private_load_balancer_update_security_groups.ref index 1f22c439c..d4c03b498 100644 --- a/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step1.private_load_balancer_update_security_groups.ref +++ b/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step1.private_load_balancer_update_security_groups.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -53,10 +57,12 @@ "security_groups": [ "##id-2##" ], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "default" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "default" + } + ], "subnets": [ "##id-4##" ], diff --git a/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step2.private_load_balancer_Add_security_groups.ref b/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step2.private_load_balancer_Add_security_groups.ref index 35b409cb2..48156e4f4 100644 --- a/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step2.private_load_balancer_Add_security_groups.ref +++ b/tests/qa_provider_oapi/data/nets/TF-181_private_load_balancer_update_security_groups/step2.private_load_balancer_Add_security_groups.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -54,10 +58,12 @@ "##id-2##", "##id-3##" ], - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "terraform-sg-lbu-TF181-1" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "terraform-sg-lbu-TF181-2" + } + ], "subnets": [ "##id-5##" ], diff --git a/tests/qa_provider_oapi/data/nets/TF-65_Check_IGW_Destroy/step1.test_destroy_igw.ref b/tests/qa_provider_oapi/data/nets/TF-65_Check_IGW_Destroy/step1.test_destroy_igw.ref index 5245eed29..de8abed57 100644 --- a/tests/qa_provider_oapi/data/nets/TF-65_Check_IGW_Destroy/step1.test_destroy_igw.ref +++ b/tests/qa_provider_oapi/data/nets/TF-65_Check_IGW_Destroy/step1.test_destroy_igw.ref @@ -852,12 +852,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-24##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-24##" + } + ], "device_name": "/dev/sda1" } ], @@ -1016,12 +1018,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-28##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-28##" + } + ], "device_name": "/dev/sda1" } ], @@ -1180,12 +1184,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-31##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-31##" + } + ], "device_name": "/dev/sda1" } ], @@ -1352,12 +1358,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-36##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-36##" + } + ], "device_name": "/dev/sda1" } ], @@ -1516,12 +1524,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-41##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-41##" + } + ], "device_name": "/dev/sda1" } ], @@ -1680,12 +1690,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-46##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-46##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.ref index 9f4c7c71d..5b44bfdc9 100644 --- a/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -61,10 +65,12 @@ "security_groups": [ "##id-2##" ], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "sg1-terraform-lbu-test" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "sg1-terraform-lbu-test" + } + ], "subnets": [ "##id-4##" ], @@ -99,7 +105,7 @@ "attributes": { "dhcp_options_set_id": "##id-5##", "id": "##id-1##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.10.0.0/16", "net_id": "##id-1##", "request_id": "########", "state": "available", @@ -165,7 +171,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-4##", - "ip_range": "10.0.0.0/24", + "ip_range": "10.10.0.0/24", "map_public_ip_on_launch": false, "net_id": "##id-1##", "request_id": "########", diff --git a/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.tf index f068de54c..8d0582097 100644 --- a/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-80_private_internal_load_balancer_resource_attributes_ok/step1.private_internal_load_balancer_resource_attributes_ok.tf @@ -1,5 +1,5 @@ resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.10.0.0/16" } resource "outscale_security_group" "outscale_security_group" { @@ -14,7 +14,7 @@ resource "outscale_security_group" "outscale_security_group" { resource "outscale_subnet" "subnet-1" { net_id = outscale_net.outscale_net.net_id - ip_range = "10.0.0.0/24" + ip_range = "10.10.0.0/24" tags { key = "Name" value = "outscale_terraform_lbu_subnet" diff --git a/tests/qa_provider_oapi/data/nets/TF-81_private_internet_facing_load_balancer_resource_attributes_ok/step1.private_internet_facing_load_balancer_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-81_private_internet_facing_load_balancer_resource_attributes_ok/step1.private_internet_facing_load_balancer_resource_attributes_ok.ref index 9334a5778..3389c5bd8 100644 --- a/tests/qa_provider_oapi/data/nets/TF-81_private_internet_facing_load_balancer_resource_attributes_ok/step1.private_internet_facing_load_balancer_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-81_private_internet_facing_load_balancer_resource_attributes_ok/step1.private_internet_facing_load_balancer_resource_attributes_ok.ref @@ -60,24 +60,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -108,10 +112,12 @@ "##id-3##", "##id-4##" ], - "source_security_group": { - "security_group_account_id": "##id-5##", - "security_group_name": "terraform-sg-lbu-2" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-5##", + "security_group_name": "terraform-sg-lbu-2" + } + ], "subnets": [ "##id-6##" ], @@ -280,7 +286,7 @@ "attributes": { "account_id": "##id-5##", "description": "test lbu-2", - "id": "##id-3##", + "id": "##id-4##", "inbound_rules": [], "net_id": "##id-1##", "outbound_rules": [ @@ -294,7 +300,7 @@ ], "remove_default_outbound_rule": false, "request_id": "########", - "security_group_id": "##id-3##", + "security_group_id": "##id-4##", "security_group_name": "terraform-sg-lbu-1", "tag": null, "tags": [ @@ -323,7 +329,7 @@ "attributes": { "account_id": "##id-5##", "description": "test lbu-2", - "id": "##id-4##", + "id": "##id-3##", "inbound_rules": [], "net_id": "##id-1##", "outbound_rules": [ @@ -337,7 +343,7 @@ ], "remove_default_outbound_rule": false, "request_id": "########", - "security_group_id": "##id-4##", + "security_group_id": "##id-3##", "security_group_name": "terraform-sg-lbu-2", "tag": null, "tags": [ diff --git a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.ref index 30eb4e9f0..ef7d023f9 100644 --- a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.ref @@ -14,25 +14,29 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", "filter": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -54,10 +58,12 @@ "security_groups": [ "##id-2##" ], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "sg1-terraform-lbu-test" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "sg1-terraform-lbu-test" + } + ], "subnets": [ "##id-4##" ], @@ -88,24 +94,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -127,10 +137,12 @@ "security_groups": [ "##id-2##" ], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "sg1-terraform-lbu-test" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "sg1-terraform-lbu-test" + } + ], "subnets": [ "##id-4##" ], @@ -169,7 +181,7 @@ "attributes": { "dhcp_options_set_id": "##id-5##", "id": "##id-1##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.20.0.0/16", "net_id": "##id-1##", "request_id": "########", "state": "available", @@ -235,7 +247,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-4##", - "ip_range": "10.0.0.0/24", + "ip_range": "10.20.0.0/24", "map_public_ip_on_launch": false, "net_id": "##id-1##", "request_id": "########", diff --git a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.tf b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.tf index 0de4484a0..4408c0133 100644 --- a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.tf +++ b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step1.load_balancer_datasource_attributes_ok.tf @@ -1,5 +1,5 @@ resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.20.0.0/16" } resource "outscale_security_group" "outscale_security_group" { @@ -14,7 +14,7 @@ resource "outscale_security_group" "outscale_security_group" { resource "outscale_subnet" "subnet-1" { net_id = outscale_net.outscale_net.net_id - ip_range = "10.0.0.0/24" + ip_range = "10.20.0.0/24" tags { key = "Name" value = "outscale_terraform_lbu_subnet" diff --git a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.ref b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.ref index bdf10d842..081e593f6 100644 --- a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.ref +++ b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.ref @@ -16,7 +16,7 @@ "attributes": { "dhcp_options_set_id": "##id-0##", "id": "##id-1##", - "ip_range": "10.0.0.0/16", + "ip_range": "10.20.0.0/16", "net_id": "##id-1##", "request_id": "########", "state": "available", @@ -82,7 +82,7 @@ "attributes": { "available_ips_count": "########", "id": "##id-4##", - "ip_range": "10.0.0.0/24", + "ip_range": "10.20.0.0/24", "map_public_ip_on_launch": false, "net_id": "##id-1##", "request_id": "########", diff --git a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.tf b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.tf index 64baa578b..a2c95882b 100644 --- a/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.tf +++ b/tests/qa_provider_oapi/data/nets/TF-82_load_balancer_datasource_attributes_ok/step2.load_balancer_datasource_remove_lbu.tf @@ -1,5 +1,5 @@ resource "outscale_net" "outscale_net" { - ip_range = "10.0.0.0/16" + ip_range = "10.20.0.0/16" } resource "outscale_security_group" "outscale_security_group" { @@ -14,7 +14,7 @@ resource "outscale_security_group" "outscale_security_group" { resource "outscale_subnet" "subnet-1" { net_id = outscale_net.outscale_net.net_id - ip_range = "10.0.0.0/24" + ip_range = "10.20.0.0/24" tags { key = "Name" value = "outscale_terraform_lbu_subnet" diff --git a/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step1.load_balancers_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step1.load_balancers_datasource_attributes_ok.ref index 510df2778..6c893b4f5 100644 --- a/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step1.load_balancers_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step1.load_balancers_datasource_attributes_ok.ref @@ -18,24 +18,28 @@ "id": "##id-0##", "load_balancer": [ { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "listeners": [ { "backend_port": 80, @@ -53,10 +57,12 @@ "public_ip": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnet_id": [], "subregion_names": [ "us-east-2a" @@ -73,24 +79,28 @@ ] }, { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "listeners": [ { "backend_port": 8080, @@ -110,10 +120,12 @@ "security_groups": [ "##id-3##" ], - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "sg1-terraform-lbu-test" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "sg1-terraform-lbu-test" + } + ], "subnet_id": [ "##id-5##" ], @@ -144,24 +156,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-6##", "listeners": [ { @@ -183,10 +199,12 @@ "security_groups": [ "##id-3##" ], - "source_security_group": { - "security_group_account_id": "##id-4##", - "security_group_name": "sg1-terraform-lbu-test" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-4##", + "security_group_name": "sg1-terraform-lbu-test" + } + ], "subnets": [ "##id-5##" ], @@ -219,24 +237,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-7##", "listeners": [ { @@ -256,10 +278,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "us-east-2a" diff --git a/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step2.load_balancers_datasource_attributes_removeLBU.ref b/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step2.load_balancers_datasource_attributes_removeLBU.ref index 70e420d86..dd1397394 100644 --- a/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step2.load_balancers_datasource_attributes_removeLBU.ref +++ b/tests/qa_provider_oapi/data/nets/TF-94_load_balancers_datasource_attributes_ok/step2.load_balancers_datasource_attributes_removeLBU.ref @@ -14,24 +14,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "80", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 80, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-0##", "listeners": [ { @@ -51,10 +55,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-1##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-1##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "us-east-2a" diff --git a/tests/qa_provider_oapi/data/nets/TF-97_nat_services_datasource_attributes_ok/step1.nat_services_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/nets/TF-97_nat_services_datasource_attributes_ok/step1.nat_services_datasource_attributes_ok.ref index f0cc85100..7910b005a 100644 --- a/tests/qa_provider_oapi/data/nets/TF-97_nat_services_datasource_attributes_ok/step1.nat_services_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/nets/TF-97_nat_services_datasource_attributes_ok/step1.nat_services_datasource_attributes_ok.ref @@ -744,7 +744,7 @@ "main": false, "request_id": "########", "route_table_id": "##id-16##", - "subnet_id": "##id-4##" + "subnet_id": "##id-7##" }, "sensitive_attributes": [], "private": "bnVsbA==", @@ -770,7 +770,7 @@ "main": false, "request_id": "########", "route_table_id": "##id-18##", - "subnet_id": "##id-7##" + "subnet_id": "##id-4##" }, "sensitive_attributes": [], "private": "bnVsbA==", diff --git a/tests/qa_provider_oapi/data/public_ip_link/TF-116_public_ip_link_resource_attributes_ok/step1.public_ip_link_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/public_ip_link/TF-116_public_ip_link_resource_attributes_ok/step1.public_ip_link_resource_attributes_ok.ref index 2931dcc75..ef3451391 100644 --- a/tests/qa_provider_oapi/data/public_ip_link/TF-116_public_ip_link_resource_attributes_ok/step1.public_ip_link_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/public_ip_link/TF-116_public_ip_link_resource_attributes_ok/step1.public_ip_link_resource_attributes_ok.ref @@ -109,12 +109,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/quota/TF-185_quota_datasource_attributes_ok/step1.quota_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/quota/TF-185_quota_datasource_attributes_ok/step1.quota_datasource_attributes_ok.ref index 2785c4199..d3ea5c95d 100644 --- a/tests/qa_provider_oapi/data/quota/TF-185_quota_datasource_attributes_ok/step1.quota_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/quota/TF-185_quota_datasource_attributes_ok/step1.quota_datasource_attributes_ok.ref @@ -43,24 +43,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -80,10 +84,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step1.quotas_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step1.quotas_datasource_attributes_ok.ref index 584975b4f..7abc82034 100644 --- a/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step1.quotas_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step1.quotas_datasource_attributes_ok.ref @@ -43,24 +43,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -80,10 +84,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step2.quotas_datasource_attributes_ok_global.ref b/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step2.quotas_datasource_attributes_ok_global.ref index 4cfcfefc2..c25130f6d 100644 --- a/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step2.quotas_datasource_attributes_ok_global.ref +++ b/tests/qa_provider_oapi/data/quotas/TF-186_quotas_datasource_attributes_ok/step2.quotas_datasource_attributes_ok_global.ref @@ -43,24 +43,28 @@ { "schema_version": 0, "attributes": { - "access_log": { - "is_enabled": "false", - "osu_bucket_name": "", - "osu_bucket_prefix": "", - "publication_interval": "60" - }, + "access_log": [ + { + "is_enabled": false, + "osu_bucket_name": "", + "osu_bucket_prefix": "", + "publication_interval": 60 + } + ], "application_sticky_cookie_policies": [], "backend_vm_ids": [], "dns_name": "########", - "health_check": { - "check_interval": "30", - "healthy_threshold": "10", - "path": "", - "port": "8080", - "protocol": "TCP", - "timeout": "5", - "unhealthy_threshold": "2" - }, + "health_check": [ + { + "check_interval": 30, + "healthy_threshold": 10, + "path": "", + "port": 8080, + "protocol": "TCP", + "timeout": 5, + "unhealthy_threshold": 2 + } + ], "id": "##id-2##", "listeners": [ { @@ -80,10 +84,12 @@ "request_id": "########", "secured_cookies": false, "security_groups": [], - "source_security_group": { - "security_group_account_id": "##id-3##", - "security_group_name": "outscale-elb-sg" - }, + "source_security_group": [ + { + "security_group_account_id": "##id-3##", + "security_group_name": "outscale-elb-sg" + } + ], "subnets": [], "subregion_names": [ "eu-west-2a" diff --git a/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step1.vm_datasource_centos_ok.ref b/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step1.vm_datasource_centos_ok.ref index 842e0b72f..9d2e02006 100644 --- a/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step1.vm_datasource_centos_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step1.vm_datasource_centos_ok.ref @@ -17,12 +17,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -99,12 +101,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" } ], @@ -177,12 +181,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], @@ -306,12 +312,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -399,12 +407,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" } ], @@ -480,12 +490,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step2.vm_datasource_centos_ok.ref b/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step2.vm_datasource_centos_ok.ref index 72df98fa8..4899e3320 100644 --- a/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step2.vm_datasource_centos_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-143_vm_datasource_centos_attributes_ok/step2.vm_datasource_centos_ok.ref @@ -17,12 +17,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -99,12 +101,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -181,12 +185,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -263,12 +269,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" } ], @@ -341,12 +349,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], @@ -470,12 +480,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-0##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-0##" + } + ], "device_name": "/dev/sda1" } ], @@ -563,12 +575,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" } ], @@ -644,12 +658,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step1.vm_resource_public_with_multiple_BDM_ok.ref b/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step1.vm_resource_public_with_multiple_BDM_ok.ref index 300c596c3..60c229cee 100644 --- a/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step1.vm_resource_public_with_multiple_BDM_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step1.vm_resource_public_with_multiple_BDM_ok.ref @@ -119,30 +119,36 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sdb" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdc" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step2.vm_resource_public_with_multiple_BDM_ok.ref b/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step2.vm_resource_public_with_multiple_BDM_ok.ref index 9d8418fc6..262c071bc 100644 --- a/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step2.vm_resource_public_with_multiple_BDM_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-146_vm_resource_public_with_BDM_attributes_ok/step2.vm_resource_public_with_multiple_BDM_ok.ref @@ -78,7 +78,7 @@ "bsu": [ { "delete_on_vm_deletion": true, - "iops": 0, + "iops": null, "snapshot_id": "", "volume_size": 100, "volume_type": "standard" @@ -92,7 +92,7 @@ "bsu": [ { "delete_on_vm_deletion": false, - "iops": 0, + "iops": null, "snapshot_id": "", "volume_size": 15, "volume_type": "standard" @@ -119,30 +119,36 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sdb" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdc" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-147_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok.ref b/tests/qa_provider_oapi/data/vm/TF-147_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok.ref index 98fa1eec1..f4918b099 100644 --- a/tests/qa_provider_oapi/data/vm/TF-147_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-147_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok.ref @@ -41,12 +41,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-148_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok_2.ref b/tests/qa_provider_oapi/data/vm/TF-148_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok_2.ref index 1424a2d26..d0e7dac45 100644 --- a/tests/qa_provider_oapi/data/vm/TF-148_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok_2.ref +++ b/tests/qa_provider_oapi/data/vm/TF-148_vm_resource_with_user_data_attributes_ok/step1.vm_resource_with_user_data_ok_2.ref @@ -41,12 +41,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step1.vm_resource_update_attributes_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step1.vm_resource_update_attributes_ok.ref index 9d1ecf309..77c459464 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step1.vm_resource_update_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step1.vm_resource_update_attributes_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step2.vm_resource_update_keypair_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step2.vm_resource_update_keypair_ok.ref index 541e54369..fd571e847 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step2.vm_resource_update_keypair_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step2.vm_resource_update_keypair_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.ref index 64f3560a0..fa4a601a8 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.ref @@ -120,28 +120,32 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], "bsu_optimized": false, "client_token": "", "creation_date": "########", - "deletion_protection": true, + "deletion_protection": false, "get_admin_password": null, "hypervisor": "xen", "id": "##id-7##", @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "running", diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.tf b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.tf index 35251d083..c1200f9b1 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.tf +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step3.vm_resource_update_security_group_ok.tf @@ -20,7 +20,7 @@ resource "outscale_vm" "outscale_vm-TF66" { image_id = var.image_id vm_type = "tinav4.c2r2p3" performance = "medium" - deletion_protection = true + deletion_protection = false vm_initiated_shutdown_behavior = "restart" security_group_ids = [outscale_security_group.security_group_TF66[0].security_group_id,outscale_security_group.security_group_TF66[1].security_group_id] keypair_name = outscale_keypair.keypair-TF66[1].keypair_name diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step4.vm_resource_update_deletion_protection_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step4.vm_resource_update_deletion_protection_ok.ref index 42a50d216..fa4a601a8 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step4.vm_resource_update_deletion_protection_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step4.vm_resource_update_deletion_protection_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "running", diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.ref index a6390cfb5..b2dad41f5 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.ref @@ -107,7 +107,7 @@ "bsu": [ { "delete_on_vm_deletion": true, - "iops": 0, + "iops": null, "snapshot_id": "", "volume_size": 20, "volume_type": "standard" @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "running", @@ -191,7 +195,7 @@ "timeouts": null, "user_data": "", "vm_id": "##id-7##", - "vm_initiated_shutdown_behavior": "restart", + "vm_initiated_shutdown_behavior": "stop", "vm_type": "tinav4.c2r2p3" }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.tf b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.tf index 95ec316c5..fc96f16dd 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.tf +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step5.vm_resource_update_bdm_ok.tf @@ -22,7 +22,7 @@ resource "outscale_vm" "outscale_vm-TF66" { vm_type = "tinav4.c2r2p3" performance = "medium" deletion_protection = false - vm_initiated_shutdown_behavior = "restart" + vm_initiated_shutdown_behavior = "stop" security_group_ids = [outscale_security_group.security_group_TF66[0].security_group_id,outscale_security_group.security_group_TF66[1].security_group_id] keypair_name = outscale_keypair.keypair-TF66[1].keypair_name } diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.ref index 065f3ed54..75f9cbb52 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "stopped", @@ -191,7 +195,7 @@ "timeouts": null, "user_data": "", "vm_id": "##id-7##", - "vm_initiated_shutdown_behavior": "restart", + "vm_initiated_shutdown_behavior": "stop", "vm_type": "###vm_type###" }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.tf b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.tf index ec6deda51..e69f0bfce 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.tf +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step6.vm_resource_update_performance_ok.tf @@ -22,7 +22,7 @@ resource "outscale_vm" "outscale_vm-TF66" { vm_type = "tinav4.c2r2p2" performance = "high" deletion_protection = false - vm_initiated_shutdown_behavior = "restart" + vm_initiated_shutdown_behavior = "stop" security_group_ids = [outscale_security_group.security_group_TF66[0].security_group_id,outscale_security_group.security_group_TF66[1].security_group_id] keypair_name = outscale_keypair.keypair-TF66[1].keypair_name } diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step7.vm_resource_update_vm_type_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step7.vm_resource_update_vm_type_ok.ref index 17809ca49..649b37ab3 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step7.vm_resource_update_vm_type_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step7.vm_resource_update_vm_type_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "running", diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.ref index 1e64c8caf..67c9775df 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -170,18 +174,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "stopped", @@ -191,7 +195,7 @@ "timeouts": null, "user_data": "LS0tLS1CRUdJTiBPVVRTQ0FMRSBTRUNUSU9OLS0tLS0KCnByaXZhdGVfb25seT10cnVlCgotLS0tLUVORCBPVVRTQ0FMRSBTRUNUSU9OLS0tLS0=", "vm_id": "##id-7##", - "vm_initiated_shutdown_behavior": "restart", + "vm_initiated_shutdown_behavior": "stop", "vm_type": "tinav4.c3r3p2" }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.tf b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.tf index a3192cb46..c53d827f4 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.tf +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step8.vm_resource_update_user_data_ok.tf @@ -22,7 +22,7 @@ resource "outscale_vm" "outscale_vm-TF66" { vm_type = "tinav4.c3r3p2" performance = "high" deletion_protection = false - vm_initiated_shutdown_behavior = "restart" + vm_initiated_shutdown_behavior = "stop" security_group_ids = [outscale_security_group.security_group_TF66[0].security_group_id,outscale_security_group.security_group_TF66[1].security_group_id] keypair_name = outscale_keypair.keypair-TF66[1].keypair_name user_data = "LS0tLS1CRUdJTiBPVVRTQ0FMRSBTRUNUSU9OLS0tLS0KCnByaXZhdGVfb25seT10cnVlCgotLS0tLUVORCBPVVRTQ0FMRSBTRUNUSU9OLS0tLS0=" diff --git a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step9.vm_resource_update_shtdown_behaviour_ok.ref b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step9.vm_resource_update_shtdown_behaviour_ok.ref index cba87be78..8261f2882 100644 --- a/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step9.vm_resource_update_shtdown_behaviour_ok.ref +++ b/tests/qa_provider_oapi/data/vm/TF-178_vm_resource_update_attributes_ok/step9.vm_resource_update_shtdown_behaviour_ok.ref @@ -120,21 +120,25 @@ ], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-5##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-5##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sdb" } ], @@ -181,17 +185,17 @@ ], "secondary_private_ip_count": 0, "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "in-use", @@ -232,17 +236,17 @@ ], "secondary_private_ip_count": 0, "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "in-use", @@ -262,18 +266,18 @@ "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_group_ids": [ - "##id-4##", - "##id-3##" + "##id-3##", + "##id-4##" ], "security_group_names": null, "security_groups": [ - { - "security_group_id": "##id-4##", - "security_group_name": "terraform-sg-TF66-1" - }, { "security_group_id": "##id-3##", "security_group_name": "terraform-sg-TF66-0" + }, + { + "security_group_id": "##id-4##", + "security_group_name": "terraform-sg-TF66-1" } ], "state": "running", diff --git a/tests/qa_provider_oapi/data/vm_state/TF-149_vm_state_datasource_centos_attributes_ok/step1.vm_state_datasource_centos_attributes_ok.ref b/tests/qa_provider_oapi/data/vm_state/TF-149_vm_state_datasource_centos_attributes_ok/step1.vm_state_datasource_centos_attributes_ok.ref index a564e154e..9748b4e7f 100644 --- a/tests/qa_provider_oapi/data/vm_state/TF-149_vm_state_datasource_centos_attributes_ok/step1.vm_state_datasource_centos_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/vm_state/TF-149_vm_state_datasource_centos_attributes_ok/step1.vm_state_datasource_centos_attributes_ok.ref @@ -63,12 +63,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-2##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-2##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vm_states/TF-150_vm_states_datasource_centos_attributes_ok/step1.vm_states_datasource_centos_attributes_ok.ref b/tests/qa_provider_oapi/data/vm_states/TF-150_vm_states_datasource_centos_attributes_ok/step1.vm_states_datasource_centos_attributes_ok.ref index 363710802..bc190fab9 100644 --- a/tests/qa_provider_oapi/data/vm_states/TF-150_vm_states_datasource_centos_attributes_ok/step1.vm_states_datasource_centos_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/vm_states/TF-150_vm_states_datasource_centos_attributes_ok/step1.vm_states_datasource_centos_attributes_ok.ref @@ -76,12 +76,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/sda1" } ], @@ -156,12 +158,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-8##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-8##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step1.vms_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step1.vms_datasource_attributes_ok.ref index 394f2c7ed..5b998429d 100644 --- a/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step1.vms_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step1.vms_datasource_attributes_ok.ref @@ -22,12 +22,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], @@ -81,12 +83,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -179,12 +183,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -252,12 +258,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], @@ -332,12 +340,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step2.vms_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step2.vms_datasource_attributes_ok.ref index 2ca8bec03..8fd9d9e38 100644 --- a/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step2.vms_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/vms/TF-151_vms_datasource_attributes_ok/step2.vms_datasource_attributes_ok.ref @@ -22,12 +22,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], @@ -81,12 +83,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -159,12 +163,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], @@ -246,12 +252,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], @@ -333,12 +341,14 @@ "architecture": "x86_64", "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], @@ -440,12 +450,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -513,12 +525,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], @@ -593,12 +607,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-10##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-10##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step1.volumes_datasource_attributes_ok4.ref b/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step1.volumes_datasource_attributes_ok4.ref index d746b3419..c2461020a 100644 --- a/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step1.volumes_datasource_attributes_ok4.ref +++ b/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step1.volumes_datasource_attributes_ok4.ref @@ -21,28 +21,20 @@ "volumes": [ { "creation_date": "########", - "iops": 100, - "linked_volumes": [ - { - "delete_on_vm_deletion": false, - "device_name": "/dev/xvdc", - "state": "attached", - "vm_id": "##id-1##", - "volume_id": "##id-2##" - } - ], - "size": 40, + "iops": 150, + "linked_volumes": [], + "size": 13, "snapshot_id": "", - "state": "in-use", + "state": "available", "subregion_name": "eu-west-2a", "tags": [ { - "key": "type", - "value": "io1" + "key": "Name", + "value": "volume-standard-2" } ], - "volume_id": "##id-2##", - "volume_type": "io1" + "volume_id": "##id-1##", + "volume_type": "standard" }, { "creation_date": "########", @@ -58,25 +50,33 @@ "value": "volume-standard-1" } ], - "volume_id": "##id-3##", + "volume_id": "##id-2##", "volume_type": "standard" }, { "creation_date": "########", - "iops": 150, - "linked_volumes": [], - "size": 13, + "iops": 100, + "linked_volumes": [ + { + "delete_on_vm_deletion": false, + "device_name": "/dev/xvdc", + "state": "attached", + "vm_id": "##id-3##", + "volume_id": "##id-4##" + } + ], + "size": 40, "snapshot_id": "", - "state": "available", + "state": "in-use", "subregion_name": "eu-west-2a", "tags": [ { - "key": "Name", - "value": "volume-standard-2" + "key": "type", + "value": "io1" } ], "volume_id": "##id-4##", - "volume_type": "standard" + "volume_type": "io1" } ] }, @@ -120,12 +120,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" } ], @@ -196,7 +198,7 @@ "schema_version": 0, "attributes": { "creation_date": "########", - "id": "##id-1##", + "id": "##id-2##", "iops": 150, "linked_volumes": [], "request_id": "########", @@ -211,7 +213,7 @@ } ], "termination_snapshot_name": null, - "volume_id": "##id-1##", + "volume_id": "##id-2##", "volume_type": "standard" }, "sensitive_attributes": [], @@ -229,7 +231,7 @@ "schema_version": 0, "attributes": { "creation_date": "########", - "id": "##id-2##", + "id": "##id-1##", "iops": 150, "linked_volumes": [], "request_id": "########", @@ -244,7 +246,7 @@ } ], "termination_snapshot_name": null, - "volume_id": "##id-2##", + "volume_id": "##id-1##", "volume_type": "standard" }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step2.volumes_datasource_attributes_ok4.ref b/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step2.volumes_datasource_attributes_ok4.ref index 9cd963158..832d9cb95 100644 --- a/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step2.volumes_datasource_attributes_ok4.ref +++ b/tests/qa_provider_oapi/data/volumes/TF-159_volumes_datasource_attributes_ok4/step2.volumes_datasource_attributes_ok4.ref @@ -21,28 +21,20 @@ "volumes": [ { "creation_date": "########", - "iops": 100, - "linked_volumes": [ - { - "delete_on_vm_deletion": false, - "device_name": "/dev/xvdc", - "state": "attached", - "vm_id": "##id-1##", - "volume_id": "##id-2##" - } - ], - "size": 40, + "iops": 150, + "linked_volumes": [], + "size": 13, "snapshot_id": "", - "state": "in-use", + "state": "available", "subregion_name": "eu-west-2a", "tags": [ { - "key": "type", - "value": "io1" + "key": "Name", + "value": "volume-standard-2" } ], - "volume_id": "##id-2##", - "volume_type": "io1" + "volume_id": "##id-1##", + "volume_type": "standard" }, { "creation_date": "########", @@ -58,25 +50,33 @@ "value": "volume-standard-1" } ], - "volume_id": "##id-3##", + "volume_id": "##id-2##", "volume_type": "standard" }, { "creation_date": "########", - "iops": 150, - "linked_volumes": [], - "size": 13, + "iops": 100, + "linked_volumes": [ + { + "delete_on_vm_deletion": false, + "device_name": "/dev/xvdc", + "state": "attached", + "vm_id": "##id-3##", + "volume_id": "##id-4##" + } + ], + "size": 40, "snapshot_id": "", - "state": "available", + "state": "in-use", "subregion_name": "eu-west-2a", "tags": [ { - "key": "Name", - "value": "volume-standard-2" + "key": "type", + "value": "io1" } ], "volume_id": "##id-4##", - "volume_type": "standard" + "volume_type": "io1" } ] }, @@ -120,21 +120,25 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-6##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-6##" + } + ], "device_name": "/dev/sda1" }, { - "bsu": { - "delete_on_vm_deletion": "false", - "link_date": "########", - "state": "attached", - "volume_id": "##id-4##" - }, + "bsu": [ + { + "delete_on_vm_deletion": false, + "link_date": "########", + "state": "attached", + "volume_id": "##id-4##" + } + ], "device_name": "/dev/xvdc" } ], @@ -205,7 +209,7 @@ "schema_version": 0, "attributes": { "creation_date": "########", - "id": "##id-1##", + "id": "##id-2##", "iops": 150, "linked_volumes": [], "request_id": "########", @@ -220,7 +224,7 @@ } ], "termination_snapshot_name": null, - "volume_id": "##id-1##", + "volume_id": "##id-2##", "volume_type": "standard" }, "sensitive_attributes": [], @@ -238,7 +242,7 @@ "schema_version": 0, "attributes": { "creation_date": "########", - "id": "##id-2##", + "id": "##id-1##", "iops": 150, "linked_volumes": [], "request_id": "########", @@ -253,7 +257,7 @@ } ], "termination_snapshot_name": null, - "volume_id": "##id-2##", + "volume_id": "##id-1##", "volume_type": "standard" }, "sensitive_attributes": [], diff --git a/tests/qa_provider_oapi/data/volumes_link/TF-160_volumes_link_resource_attributes_ok/step1.volumes_link_resource_attributes_ok.ref b/tests/qa_provider_oapi/data/volumes_link/TF-160_volumes_link_resource_attributes_ok/step1.volumes_link_resource_attributes_ok.ref index 637d15538..6d1f22872 100644 --- a/tests/qa_provider_oapi/data/volumes_link/TF-160_volumes_link_resource_attributes_ok/step1.volumes_link_resource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/volumes_link/TF-160_volumes_link_resource_attributes_ok/step1.volumes_link_resource_attributes_ok.ref @@ -41,12 +41,14 @@ "block_device_mappings": [], "block_device_mappings_created": [ { - "bsu": { - "delete_on_vm_deletion": "true", - "link_date": "########", - "state": "attached", - "volume_id": "##id-1##" - }, + "bsu": [ + { + "delete_on_vm_deletion": true, + "link_date": "########", + "state": "attached", + "volume_id": "##id-1##" + } + ], "device_name": "/dev/sda1" } ], diff --git a/utils/utils.go b/utils/utils.go index 5172415fc..3d8f2ad12 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,8 +1,10 @@ package utils import ( + "bytes" "encoding/json" "fmt" + "hash/crc32" "log" "math/rand" "net/http" @@ -10,12 +12,11 @@ import ( "strconv" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" oscgo "github.com/outscale/osc-sdk-go/v2" "github.com/spf13/cast" - - "github.com/aws/aws-sdk-go/aws" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) // PrintToJSON method helper to debug responses @@ -207,3 +208,41 @@ func GetRegion() string { } return region } + +// String hashes a string to a unique hashcode. +// +// crc32 returns a uint32, but for our use we need +// and non negative integer. Here we cast to an integer +// and invert it if the result is negative. +func String(s string) int { + v := int(crc32.ChecksumIEEE([]byte(s))) + if v >= 0 { + return v + } + if -v >= 0 { + return -v + } + // v == MinInt + return 0 +} + +// Strings hashes a list of strings to a unique hashcode. +func Strings(strings []string) string { + var buf bytes.Buffer + + for _, s := range strings { + buf.WriteString(fmt.Sprintf("%s-", s)) + } + + return fmt.Sprintf("%d", String(buf.String())) +} + +func GetEnvVariableValue(envVariables []string) string { + + for _, envVariable := range envVariables { + if value := os.Getenv(envVariable); value != "" { + return value + } + } + return "" +}