Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Lack of support for some connection providers options #219

Closed
relu opened this issue May 4, 2020 · 3 comments · Fixed by #221 or #222
Closed

Lack of support for some connection providers options #219

relu opened this issue May 4, 2020 · 3 comments · Fixed by #221 or #222
Labels
enhancement New feature or request

Comments

@relu
Copy link
Contributor

relu commented May 4, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I noticed the connection options for certain providers are commented out in the (interested in Facebook and Linkedin). I was wondering why that is the case and if there are plans to implement support for these.
I would be happy to work on this myself but would like to get some context before digging into it.

New or Affected Resource(s)

  • auth0_connection
@relu
Copy link
Contributor Author

relu commented May 4, 2020

A suggestion for a future provider major version would be to deprecate the existing auth0_connection resource and replacing it with individual connection resources per connection type e.g. auth0_connection_google, auth0_connection_facebook, auth0_connection_auth0 etc.
This approach would be a lot easier to manage considering the fact that most of these connection types have very different configuration options which would make the case for implementing different terraform schemas for each of them hence improving the clarity of the implementation and preventing state pollution.

@alexkappa
Copy link
Owner

Hi @relu, after a major refactoring of the connections object with the sdk, I just haven't had the time to match the parity with this provider. We can tackle these soon, unless you are feeling up for submitting a PR ;)

@alexkappa
Copy link
Owner

I would be happy to work on this myself but would like to get some context before digging into it.

Excellent! Both of these providers are very similar (oauth2 based) so you should be able to find examples ready. Off the top of my head google-oauth2 is similar.

What you'd need to do is add any additional fields to the schema, and fill in the appropriate flatteners/expanders inside the structure_connection.go file. There are more examples there.

Some attention needed with the scope field. Its best to use the sdk's SetScopes method. The google-oauth2 option should have you covered. Also, see PR #216 and #215 code/reviews.

Ping me if there's anything I can help with!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
2 participants