Implement a data source auth0_connections for querying multiple connections for Auth0, optionally filtering by name or strategy
Note: When running the tests, there must be no extra connections on the Auth0 tenant or some of them will fail.
Add an IsAuth0Strategy validation function
Fixes #0000
Acceptance Test Output
$ make testacc TESTARGS="-run TestAccDataSourceConnections"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./auth0 -v -count 1 -parallel 10 -run TestAccDataSourceConnections -timeout 15m -coverprofile="c.out"
=== RUN TestAccDataSourceConnections_NoConnections
--- PASS: TestAccDataSourceConnections_NoConnections (3.28s)
=== RUN TestAccDataSourceConnections_InvalidStrategy
--- PASS: TestAccDataSourceConnections_InvalidStrategy (0.32s)
=== RUN TestAccDataSourceConnections_NoFilter
--- PASS: TestAccDataSourceConnections_NoFilter (4.08s)
=== RUN TestAccDataSourceConnections_ByName
--- PASS: TestAccDataSourceConnections_ByName (10.92s)
=== RUN TestAccDataSourceConnections_BySingleStrategy
--- PASS: TestAccDataSourceConnections_BySingleStrategy (4.38s)
=== RUN TestAccDataSourceConnections_ByMultipleStrategies
--- PASS: TestAccDataSourceConnections_ByMultipleStrategies (4.26s)
=== RUN TestAccDataSourceConnections_ByNameAndStrategy
--- PASS: TestAccDataSourceConnections_ByNameAndStrategy (10.50s)
PASS
coverage: 12.6% of statements
ok github.com/alekc/terraform-provider-auth0/auth0 37.944s coverage: 12.6% of statements
$ make testacc TESTARGS="-run TestAccConnection"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./auth0 -v -count 1 -parallel 10 -run TestAccConnection -timeout 15m -coverprofile="c.out"
=== RUN TestAccConnection
--- PASS: TestAccConnection (8.89s)
=== RUN TestAccConnection_NonPersistentAttrs
--- PASS: TestAccConnection_NonPersistentAttrs (5.34s)
=== RUN TestAccConnectionAD
--- PASS: TestAccConnectionAD (3.05s)
=== RUN TestAccConnectionAzureAD
--- PASS: TestAccConnectionAzureAD (4.31s)
=== RUN TestAccConnectionOIDC
--- PASS: TestAccConnectionOIDC (5.06s)
=== RUN TestAccConnectionOAuth2
--- PASS: TestAccConnectionOAuth2 (5.14s)
=== RUN TestAccConnectionWithEnabledClients
--- PASS: TestAccConnectionWithEnabledClients (10.53s)
=== RUN TestAccConnectionSMS
--- PASS: TestAccConnectionSMS (2.74s)
=== RUN TestAccConnectionEmail
--- PASS: TestAccConnectionEmail (4.94s)
=== RUN TestAccConnectionSalesforce
--- PASS: TestAccConnectionSalesforce (2.96s)
=== RUN TestAccConnectionGoogleOAuth2
--- PASS: TestAccConnectionGoogleOAuth2 (2.70s)
=== RUN TestAccConnectionFacebook
--- PASS: TestAccConnectionFacebook (5.44s)
=== RUN TestAccConnectionApple
--- PASS: TestAccConnectionApple (5.31s)
=== RUN TestAccConnectionLinkedin
--- PASS: TestAccConnectionLinkedin (5.16s)
=== RUN TestAccConnectionGitHub
--- PASS: TestAccConnectionGitHub (2.62s)
=== RUN TestAccConnectionWindowslive
--- PASS: TestAccConnectionWindowslive (5.04s)
=== RUN TestAccConnectionConfiguration
--- PASS: TestAccConnectionConfiguration (4.66s)
=== RUN TestAccConnection_SAML
--- PASS: TestAccConnection_SAML (5.07s)
PASS
coverage: 22.3% of statements
ok github.com/alekc/terraform-provider-auth0/auth0 89.214s coverage: 22.3% of statements
Community Note
Please vote on this pull request by adding a đź‘Ť reaction to the original pull request comment to help the community and maintainers prioritize this request
Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request
Checklist
[x] All added fields have proper documentation properties set up
[x] All tests are passing
[x] Any new code is covered by test coverage
[x] Example files (in /example folder) have been amended
Proposed Changes
auth0_connections
for querying multiple connections for Auth0, optionally filtering by name or strategyIsAuth0Strategy
validation functionFixes #0000
Acceptance Test Output
Community Note
Checklist