Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fall back to api_key/api_secret for auth #69

Merged
merged 3 commits into from Sep 23, 2021

Conversation

shwetha-manvinkurke
Copy link
Contributor

Allow auth with TWILIO_API_KEY/TWILIO_API_SECRET

README.md Outdated Show resolved Hide resolved
@shwetha-manvinkurke shwetha-manvinkurke merged commit 735ac24 into main Sep 23, 2021
@shwetha-manvinkurke shwetha-manvinkurke deleted the auth-options branch September 23, 2021 17:22
@@ -18,14 +18,14 @@ func Provider() *schema.Provider {
Schema: map[string]*schema.Schema{
"account_sid": {
Type: schema.TypeString,
DefaultFunc: schema.EnvDefaultFunc("TWILIO_ACCOUNT_SID", nil),
Description: "Your Account SID can be found on the Twilio dashboard at www.twilio.com/console.",
DefaultFunc: schema.MultiEnvDefaultFunc([]string{"TWILIO_ACCOUNT_SID", "TWILIO_API_KEY"}, nil),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't support using the 3 env vars concurrently. I.e., use TWILIO_ACCOUNT_SID for v2010 APIs with auth coming from TWILIO_API_KEY and TWILIO_API_SECRET.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Will work on a fix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as long as there is a fallback for the TWILIO_SUBACCOUNT_SID to TWILIO_ACCOUNT_SID it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants