Skip to content

Commit fa4e311

Browse files
chore(deps): bump github.com/supabase/cli from 1.169.3 to 1.198.1 (#156)
* chore(deps): bump github.com/supabase/cli from 1.169.3 to 1.198.1 Bumps [github.com/supabase/cli](https://github.com/supabase/cli) from 1.169.3 to 1.198.1. - [Release notes](https://github.com/supabase/cli/releases) - [Changelog](https://github.com/supabase/cli/blob/develop/.goreleaser.yml) - [Commits](supabase/cli@v1.169.3...v1.198.1) --- updated-dependencies: - dependency-name: github.com/supabase/cli dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore: update go mod version * chore: update method names * chore: update unit tests * chore: update example docs --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qiao Han <[email protected]>
1 parent 62e66f6 commit fa4e311

File tree

11 files changed

+95
-74
lines changed

11 files changed

+95
-74
lines changed

docs/resources/settings.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ resource "supabase_settings" "production" {
3434
})
3535
3636
auth = jsonencode({
37-
site_url = "http://localhost:3000"
37+
site_url = "http://localhost:3000"
38+
mailer_otp_exp = 3600
39+
mfa_phone_otp_length = 6
40+
sms_otp_length = 6
3841
})
3942
}
4043
```

examples/resources/supabase_settings/resource.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ resource "supabase_settings" "production" {
1919
})
2020

2121
auth = jsonencode({
22-
site_url = "http://localhost:3000"
22+
site_url = "http://localhost:3000"
23+
mailer_otp_exp = 3600
24+
mfa_phone_otp_length = 6
25+
sms_otp_length = 6
2326
})
2427
}

go.mod

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/supabase/terraform-provider-supabase
22

3-
go 1.22.0
3+
go 1.22.4
4+
5+
toolchain go1.22.5
46

57
require (
68
github.com/hashicorp/terraform-plugin-docs v0.19.4
@@ -9,7 +11,7 @@ require (
911
github.com/hashicorp/terraform-plugin-go v0.23.0
1012
github.com/hashicorp/terraform-plugin-log v0.9.0
1113
github.com/hashicorp/terraform-plugin-testing v1.10.0
12-
github.com/supabase/cli v1.169.3
14+
github.com/supabase/cli v1.198.1
1315
gopkg.in/h2non/gock.v1 v1.1.2
1416
)
1517

@@ -56,10 +58,10 @@ require (
5658
github.com/imdario/mergo v0.3.15 // indirect
5759
github.com/mattn/go-colorable v0.1.13 // indirect
5860
github.com/mattn/go-isatty v0.0.20 // indirect
59-
github.com/mattn/go-runewidth v0.0.15 // indirect
61+
github.com/mattn/go-runewidth v0.0.16 // indirect
6062
github.com/mitchellh/copystructure v1.2.0 // indirect
6163
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
62-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
64+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
6365
github.com/mitchellh/mapstructure v1.5.0 // indirect
6466
github.com/mitchellh/reflectwalk v1.0.2 // indirect
6567
github.com/oapi-codegen/runtime v1.1.1 // indirect
@@ -76,17 +78,17 @@ require (
7678
github.com/zclconf/go-cty v1.15.0 // indirect
7779
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
7880
golang.org/x/crypto v0.26.0 // indirect
79-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
80-
golang.org/x/mod v0.19.0 // indirect
81-
golang.org/x/net v0.26.0 // indirect
81+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
82+
golang.org/x/mod v0.20.0 // indirect
83+
golang.org/x/net v0.28.0 // indirect
8284
golang.org/x/sync v0.8.0 // indirect
83-
golang.org/x/sys v0.23.0 // indirect
85+
golang.org/x/sys v0.25.0 // indirect
8486
golang.org/x/text v0.17.0 // indirect
85-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
87+
golang.org/x/tools v0.24.0 // indirect
8688
google.golang.org/appengine v1.6.8 // indirect
87-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
88-
google.golang.org/grpc v1.64.1 // indirect
89-
google.golang.org/protobuf v1.34.1 // indirect
89+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
90+
google.golang.org/grpc v1.66.2 // indirect
91+
google.golang.org/protobuf v1.34.2 // indirect
9092
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
9193
gopkg.in/yaml.v2 v2.4.0 // indirect
9294
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ
3434
github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
3535
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
3636
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
37-
github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo=
38-
github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
37+
github.com/cyphar/filepath-securejoin v0.3.1 h1:1V7cHiaW+C+39wEfpH6XlLBQo3j/PciWFrgfCLS8XrE=
38+
github.com/cyphar/filepath-securejoin v0.3.1/go.mod h1:F7i41x/9cBF7lzCrVsYs9fuzwRZm4NQsGTBdpp6mETc=
3939
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4040
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4141
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -156,15 +156,15 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
156156
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
157157
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
158158
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
159-
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
160-
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
159+
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
160+
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
161161
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
162162
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
163163
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
164164
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
165165
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
166-
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
167-
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
166+
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
167+
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
168168
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
169169
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
170170
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
@@ -207,8 +207,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
207207
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
208208
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
209209
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
210-
github.com/supabase/cli v1.169.3 h1:eX2Q80Yhs53WLOFDv61A5vAdC8hxB/3+FH+M0qEYJMM=
211-
github.com/supabase/cli v1.169.3/go.mod h1:lCAXcngP/QMR1/xwpw4TT50ZA4PvDyacc4nAf2+iqDI=
210+
github.com/supabase/cli v1.198.1 h1:JLih2UUF0EA5mB8PJwAexDEcomGpKeTYJJtWPhOaC1Y=
211+
github.com/supabase/cli v1.198.1/go.mod h1:mogdUeM/Lqlo1bF7Dfbf2/H/M6YXVsWBS2eKQz8E+zY=
212212
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
213213
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
214214
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
@@ -234,18 +234,18 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
234234
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
235235
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
236236
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
237-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
238-
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
237+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
238+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
239239
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
240-
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
241-
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
240+
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
241+
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
242242
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
243243
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
244244
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
245245
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
246246
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
247-
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
248-
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
247+
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
248+
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
249249
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
250250
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
251251
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -264,8 +264,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
264264
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
265265
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
266266
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
267-
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
268-
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
267+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
268+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
269269
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
270270
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
271271
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@@ -280,21 +280,21 @@ golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
280280
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
281281
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
282282
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
283-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
284-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
283+
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
284+
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
285285
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
286286
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
287287
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
288288
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
289289
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
290-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4=
291-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
292-
google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA=
293-
google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=
290+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
291+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
292+
google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
293+
google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
294294
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
295295
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
296-
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
297-
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
296+
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
297+
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
298298
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
299299
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
300300
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

internal/provider/branch_data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (d *BranchDataSource) Read(ctx context.Context, req datasource.ReadRequest,
105105

106106
// If applicable, this is a great opportunity to initialize any necessary
107107
// provider client data and make a call using it.
108-
httpResp, err := d.client.GetBranchesWithResponse(ctx, projectRef.ValueString())
108+
httpResp, err := d.client.V1ListAllBranchesWithResponse(ctx, projectRef.ValueString())
109109
if err != nil {
110110
msg := fmt.Sprintf("Unable to read branch, got error: %s", err)
111111
resp.Diagnostics.AddError("Client Error", msg)

internal/provider/branch_resource.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ func (r *BranchResource) ImportState(ctx context.Context, req resource.ImportSta
240240
}
241241

242242
func updateBranch(ctx context.Context, plan *BranchResourceModel, client *api.ClientWithResponses) diag.Diagnostics {
243-
httpResp, err := client.UpdateBranchWithResponse(ctx, plan.Id.ValueString(), api.UpdateBranchBody{
243+
httpResp, err := client.V1UpdateABranchConfigWithResponse(ctx, plan.Id.ValueString(), api.UpdateBranchBody{
244244
BranchName: plan.GitBranch.ValueStringPointer(),
245245
GitBranch: plan.GitBranch.ValueStringPointer(),
246246
})
@@ -268,7 +268,7 @@ func readBranch(ctx context.Context, state *BranchResourceModel, client *api.Cli
268268
}
269269

270270
func readBranchDatabase(ctx context.Context, state *BranchResourceModel, client *api.ClientWithResponses) diag.Diagnostics {
271-
httpResp, err := client.GetBranchDetailsWithResponse(ctx, state.Id.ValueString())
271+
httpResp, err := client.V1GetABranchConfigWithResponse(ctx, state.Id.ValueString())
272272
if err != nil {
273273
msg := fmt.Sprintf("Unable to read branch database, got error: %s", err)
274274
return diag.Diagnostics{diag.NewErrorDiagnostic("Client Error", msg)}
@@ -294,14 +294,14 @@ func readBranchDatabase(ctx context.Context, state *BranchResourceModel, client
294294
}
295295

296296
func createBranch(ctx context.Context, plan *BranchResourceModel, client *api.ClientWithResponses) diag.Diagnostics {
297-
resp, err := client.GetBranches(ctx, plan.ParentProjectRef.ValueString())
297+
resp, err := client.V1ListAllBranches(ctx, plan.ParentProjectRef.ValueString())
298298
if err != nil {
299299
msg := fmt.Sprintf("Unable to enable branching, got error: %s", err)
300300
return diag.Diagnostics{diag.NewErrorDiagnostic("Client Error", msg)}
301301
}
302302
// 1. Enable branching
303303
if resp.StatusCode == http.StatusUnprocessableEntity {
304-
httpResp, err := client.CreateBranchWithResponse(ctx, plan.ParentProjectRef.ValueString(), api.CreateBranchBody{
304+
httpResp, err := client.V1CreateABranchWithResponse(ctx, plan.ParentProjectRef.ValueString(), api.CreateBranchBody{
305305
BranchName: "Production",
306306
})
307307
if err != nil {
@@ -314,7 +314,7 @@ func createBranch(ctx context.Context, plan *BranchResourceModel, client *api.Cl
314314
}
315315
}
316316
// 2. Create branch database
317-
httpResp, err := client.CreateBranchWithResponse(ctx, plan.ParentProjectRef.ValueString(), api.CreateBranchBody{
317+
httpResp, err := client.V1CreateABranchWithResponse(ctx, plan.ParentProjectRef.ValueString(), api.CreateBranchBody{
318318
BranchName: plan.GitBranch.ValueString(),
319319
GitBranch: plan.GitBranch.ValueStringPointer(),
320320
Region: plan.Region.ValueStringPointer(),
@@ -338,7 +338,7 @@ func createBranch(ctx context.Context, plan *BranchResourceModel, client *api.Cl
338338
}
339339

340340
func deleteBranch(ctx context.Context, state *BranchResourceModel, client *api.ClientWithResponses) diag.Diagnostics {
341-
httpResp, err := client.DeleteBranchWithResponse(ctx, state.Id.ValueString())
341+
httpResp, err := client.V1DeleteABranchWithResponse(ctx, state.Id.ValueString())
342342
if err != nil {
343343
msg := fmt.Sprintf("Unable to delete branch, got error: %s", err)
344344
return diag.Diagnostics{diag.NewErrorDiagnostic("Client Error", msg)}

internal/provider/pooler_data_source.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (d *PoolerDataSource) Read(ctx context.Context, req datasource.ReadRequest,
8787

8888
// If applicable, this is a great opportunity to initialize any necessary
8989
// provider client data and make a call using it.
90-
httpResp, err := d.client.V1GetPgbouncerConfigWithResponse(ctx, projectRef.ValueString())
90+
httpResp, err := d.client.V1GetSupavisorConfigWithResponse(ctx, projectRef.ValueString())
9191
if err != nil {
9292
msg := fmt.Sprintf("Unable to read pooler, got error: %s", err)
9393
resp.Diagnostics.AddError("Client Error", msg)
@@ -100,9 +100,10 @@ func (d *PoolerDataSource) Read(ctx context.Context, req datasource.ReadRequest,
100100
}
101101

102102
url := map[string]string{}
103-
if httpResp.JSON200.PoolMode != nil && httpResp.JSON200.ConnectionString != nil {
104-
mode := string(*httpResp.JSON200.PoolMode)
105-
url[mode] = *httpResp.JSON200.ConnectionString
103+
for _, pooler := range *httpResp.JSON200 {
104+
if pooler.DatabaseType == api.PRIMARY {
105+
url[string(pooler.PoolMode)] = pooler.ConnectionString
106+
}
106107
}
107108

108109
// Write logs using the tflog package

internal/provider/pooler_data_source_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ func TestAccPoolerDataSource(t *testing.T) {
1818
// Setup mock api
1919
defer gock.OffAll()
2020
gock.New("https://api.supabase.com").
21-
Get("/v1/projects/mayuaycdtijbctgqbycg/config/database/pgbouncer").
21+
Get("/v1/projects/mayuaycdtijbctgqbycg/config/database/pooler").
2222
Times(3).
2323
Reply(http.StatusOK).
24-
JSON(api.V1PgbouncerConfigResponse{
25-
ConnectionString: &poolerUrl,
26-
DefaultPoolSize: Ptr(float32(15)),
27-
IgnoreStartupParameters: Ptr(""),
28-
MaxClientConn: Ptr(float32(200)),
29-
PoolMode: Ptr(api.Transaction),
30-
})
24+
JSON([]api.SupavisorConfigResponse{{
25+
DatabaseType: api.PRIMARY,
26+
ConnectionString: poolerUrl,
27+
DefaultPoolSize: Ptr(float32(15)),
28+
MaxClientConn: Ptr(float32(200)),
29+
PoolMode: api.SupavisorConfigResponsePoolModeTransaction,
30+
}})
3131
// Run test
3232
resource.Test(t, resource.TestCase{
3333
PreCheck: func() { testAccPreCheck(t) },

0 commit comments

Comments
 (0)