diff --git a/docs/resources/email.md b/docs/resources/email.md
index 26adca64d..2007cb2bc 100644
--- a/docs/resources/email.md
+++ b/docs/resources/email.md
@@ -62,6 +62,7 @@ resource "auth0_email" "sendgrid_email_provider" {
### Optional
- `enabled` (Boolean) Indicates whether the email provider is enabled.
+- `settings` (Block List, Max: 1) Specific email provider settings. (see [below for nested schema](#nestedblock--settings))
### Read-Only
@@ -83,6 +84,32 @@ Optional:
- `smtp_port` (Number) Port used by your SMTP server. Please avoid using port 25 if possible because many providers have limitations on this port. Used only for SMTP.
- `smtp_user` (String) SMTP username. Used only for SMTP.
+
+
+### Nested Schema for `settings`
+
+Optional:
+
+- `headers` (Block List, Max: 1) Headers settings for the `smtp` email provider. (see [below for nested schema](#nestedblock--settings--headers))
+- `message` (Block List, Max: 1) Message settings for the `mandrill` or `ses` email provider. (see [below for nested schema](#nestedblock--settings--message))
+
+
+### Nested Schema for `settings.headers`
+
+Optional:
+
+- `x_mc_view_content_link` (String) Disable or enable the default View Content Link for sensitive emails.
+- `x_ses_configuration_set` (String) SES Configuration set to include when sending emails.
+
+
+
+### Nested Schema for `settings.message`
+
+Optional:
+
+- `configuration_set_name` (String) Setting for the `ses` email provider. The name of the configuration set to apply to the sent emails.
+- `view_content_link` (Boolean) Setting for the `mandrill` email provider. Set to `true` to see the content of individual emails sent to users.
+
## Import
Import is supported using the following syntax:
diff --git a/internal/provider/resource_auth0_email.go b/internal/provider/resource_auth0_email.go
index 513db2341..3ff5940ae 100644
--- a/internal/provider/resource_auth0_email.go
+++ b/internal/provider/resource_auth0_email.go
@@ -124,6 +124,64 @@ func newEmail() *schema.Resource {
},
},
},
+ "settings": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Computed: true,
+ Description: "Specific email provider settings.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "message": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Description: "Message settings for the `mandrill` or `ses` email provider.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "view_content_link": {
+ Type: schema.TypeBool,
+ Optional: true,
+ Description: "Setting for the `mandrill` email provider. " +
+ "Set to `true` to see the content of individual emails sent to users.",
+ },
+ "configuration_set_name": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "Setting for the `ses` email provider. " +
+ "The name of the configuration set to apply to the sent emails.",
+ },
+ },
+ },
+ },
+ "headers": {
+ Type: schema.TypeList,
+ MaxItems: 1,
+ Optional: true,
+ Description: "Headers settings for the `smtp` email provider.",
+ Elem: &schema.Resource{
+ Schema: map[string]*schema.Schema{
+ "x_mc_view_content_link": {
+ Type: schema.TypeString,
+ Optional: true,
+ ValidateFunc: validation.StringInSlice(
+ []string{"true", "false"},
+ false,
+ ),
+ Description: "Disable or enable the default View Content Link " +
+ "for sensitive emails.",
+ },
+ "x_ses_configuration_set": {
+ Type: schema.TypeString,
+ Optional: true,
+ Description: "SES Configuration set to include when sending emails.",
+ },
+ },
+ },
+ },
+ },
+ },
+ },
},
}
}
@@ -163,6 +221,7 @@ func readEmail(ctx context.Context, d *schema.ResourceData, m interface{}) diag.
d.Set("enabled", email.GetEnabled()),
d.Set("default_from_address", email.GetDefaultFromAddress()),
d.Set("credentials", flattenEmailProviderCredentials(d, email)),
+ d.Set("settings", flattenEmailProviderSettings(email)),
)
return diag.FromErr(result.ErrorOrNil())
@@ -231,6 +290,18 @@ func expandEmailProviderMandrill(config cty.Value, emailProvider *management.Ema
}
return stop
})
+
+ config.GetAttr("settings").ForEachElement(func(_ cty.Value, settings cty.Value) (stop bool) {
+ settings.GetAttr("message").ForEachElement(func(_ cty.Value, message cty.Value) (stop bool) {
+ emailProvider.Settings = &management.EmailProviderSettingsMandrill{
+ Message: &management.EmailProviderSettingsMandrillMessage{
+ ViewContentLink: value.Bool(message.GetAttr("view_content_link")),
+ },
+ }
+ return stop
+ })
+ return stop
+ })
}
func expandEmailProviderSES(config cty.Value, emailProvider *management.EmailProvider) {
@@ -242,6 +313,18 @@ func expandEmailProviderSES(config cty.Value, emailProvider *management.EmailPro
}
return stop
})
+
+ config.GetAttr("settings").ForEachElement(func(_ cty.Value, settings cty.Value) (stop bool) {
+ settings.GetAttr("message").ForEachElement(func(_ cty.Value, message cty.Value) (stop bool) {
+ emailProvider.Settings = &management.EmailProviderSettingsSES{
+ Message: &management.EmailProviderSettingsSESMessage{
+ ConfigurationSetName: value.String(message.GetAttr("configuration_set_name")),
+ },
+ }
+ return stop
+ })
+ return stop
+ })
}
func expandEmailProviderSendGrid(config cty.Value, emailProvider *management.EmailProvider) {
@@ -284,6 +367,19 @@ func expandEmailProviderSmtp(config cty.Value, emailProvider *management.EmailPr
}
return stop
})
+
+ config.GetAttr("settings").ForEachElement(func(_ cty.Value, settings cty.Value) (stop bool) {
+ settings.GetAttr("headers").ForEachElement(func(_ cty.Value, headers cty.Value) (stop bool) {
+ emailProvider.Settings = management.EmailProviderSettingsSMTP{
+ Headers: &management.EmailProviderSettingsSMTPHeaders{
+ XMCViewContentLink: value.String(headers.GetAttr("x_mc_view_content_link")),
+ XSESConfigurationSet: value.String(headers.GetAttr("x_ses_configuration_set")),
+ },
+ }
+ return stop
+ })
+ return stop
+ })
}
func flattenEmailProviderCredentials(d *schema.ResourceData, emailProvider *management.EmailProvider) []interface{} {
@@ -329,3 +425,42 @@ func flattenEmailProviderCredentials(d *schema.ResourceData, emailProvider *mana
return []interface{}{credentials}
}
+
+func flattenEmailProviderSettings(emailProvider *management.EmailProvider) []interface{} {
+ if emailProvider.Settings == nil {
+ return nil
+ }
+
+ var settings interface{}
+ switch settingsType := emailProvider.Settings.(type) {
+ case *management.EmailProviderSettingsMandrill:
+ settings = map[string]interface{}{
+ "message": []map[string]interface{}{
+ {
+ "view_content_link": settingsType.GetMessage().GetViewContentLink(),
+ },
+ },
+ }
+ case *management.EmailProviderSettingsSES:
+ settings = map[string]interface{}{
+ "message": []map[string]interface{}{
+ {
+ "configuration_set_name": settingsType.GetMessage().GetConfigurationSetName(),
+ },
+ },
+ }
+ case *management.EmailProviderSettingsSMTP:
+ settings = map[string]interface{}{
+ "headers": []map[string]interface{}{
+ {
+ "x_mc_view_content_link": settingsType.GetHeaders().GetXMCViewContentLink(),
+ "x_ses_configuration_set": settingsType.GetHeaders().GetXSESConfigurationSet(),
+ },
+ },
+ }
+ default:
+ settings = nil
+ }
+
+ return []interface{}{settings}
+}
diff --git a/internal/provider/resource_auth0_email_test.go b/internal/provider/resource_auth0_email_test.go
index a2b8c741b..14a48f593 100644
--- a/internal/provider/resource_auth0_email_test.go
+++ b/internal/provider/resource_auth0_email_test.go
@@ -38,6 +38,24 @@ resource "auth0_email" "my_email_provider" {
}
`
+const testAccUpdateSESEmailProvider = `
+resource "auth0_email" "my_email_provider" {
+ name = "ses"
+ enabled = true
+ default_from_address = "accounts@example.com"
+ credentials {
+ access_key_id = "AKIAXXXXXXXXXXXXXXXX"
+ secret_access_key = "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ region = "us-east-1"
+ }
+ settings {
+ message {
+ configuration_set_name = "example"
+ }
+ }
+}
+`
+
const testAccCreateMandrillEmailProvider = `
resource "auth0_email" "my_email_provider" {
name = "mandrill"
@@ -49,6 +67,22 @@ resource "auth0_email" "my_email_provider" {
}
`
+const testAccUpdateMandrillEmailProvider = `
+resource "auth0_email" "my_email_provider" {
+ name = "mandrill"
+ enabled = true
+ default_from_address = "accounts@example.com"
+ credentials {
+ api_key = "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ }
+ settings {
+ message {
+ view_content_link = true
+ }
+ }
+}
+`
+
const testAccCreateSmtpEmailProvider = `
resource "auth0_email" "my_email_provider" {
name = "smtp"
@@ -63,6 +97,26 @@ resource "auth0_email" "my_email_provider" {
}
`
+const testAccUpdateSmtpEmailProvider = `
+resource "auth0_email" "my_email_provider" {
+ name = "smtp"
+ enabled = true
+ default_from_address = "accounts@example.com"
+ credentials {
+ smtp_host = "example.com"
+ smtp_port = 984
+ smtp_user = "bob"
+ smtp_pass = "secret"
+ }
+ settings {
+ headers {
+ x_mc_view_content_link = "true"
+ x_ses_configuration_set = "example"
+ }
+ }
+}
+`
+
const testAccCreateMailgunEmailProvider = `
resource "auth0_email" "my_email_provider" {
name = "mailgun"
@@ -133,6 +187,21 @@ func TestAccEmail(t *testing.T) {
resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.region", "us-east-1"),
),
},
+ {
+ Config: testAccUpdateSESEmailProvider,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "name", "ses"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "enabled", "true"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "default_from_address", "accounts@example.com"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.access_key_id", "AKIAXXXXXXXXXXXXXXXX"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.secret_access_key", "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.region", "us-east-1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.message.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.message.0.configuration_set_name", "example"),
+ ),
+ },
{
Config: testAccCreateMandrillEmailProvider,
Check: resource.ComposeTestCheckFunc(
@@ -143,6 +212,19 @@ func TestAccEmail(t *testing.T) {
resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.api_key", "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
),
},
+ {
+ Config: testAccUpdateMandrillEmailProvider,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "name", "mandrill"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "enabled", "true"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "default_from_address", "accounts@example.com"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.api_key", "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.message.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.message.0.view_content_link", "true"),
+ ),
+ },
{
Config: testAccCreateSmtpEmailProvider,
Check: resource.ComposeTestCheckFunc(
@@ -156,6 +238,23 @@ func TestAccEmail(t *testing.T) {
resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.smtp_pass", "secret"),
),
},
+ {
+ Config: testAccUpdateSmtpEmailProvider,
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "name", "smtp"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "enabled", "true"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "default_from_address", "accounts@example.com"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.smtp_host", "example.com"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.smtp_port", "984"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.smtp_user", "bob"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "credentials.0.smtp_pass", "secret"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.headers.#", "1"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.headers.0.x_mc_view_content_link", "true"),
+ resource.TestCheckResourceAttr("auth0_email.my_email_provider", "settings.0.headers.0.x_ses_configuration_set", "example"),
+ ),
+ },
{
Config: testAccCreateMailgunEmailProvider,
Check: resource.ComposeTestCheckFunc(
diff --git a/test/data/recordings/TestAccEmail.yaml b/test/data/recordings/TestAccEmail.yaml
index 8589efdc2..43663abf9 100644
--- a/test/data/recordings/TestAccEmail.yaml
+++ b/test/data/recordings/TestAccEmail.yaml
@@ -36,7 +36,7 @@ interactions:
- application/json; charset=utf-8
status: 404 Not Found
code: 404
- duration: 102.18001ms
+ duration: 109.224826ms
- id: 1
request:
proto: HTTP/1.1
@@ -72,7 +72,7 @@ interactions:
- application/json; charset=utf-8
status: 201 Created
code: 201
- duration: 132.760842ms
+ duration: 136.958244ms
- id: 2
request:
proto: HTTP/1.1
@@ -108,7 +108,7 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 140.266821ms
+ duration: 117.684145ms
- id: 3
request:
proto: HTTP/1.1
@@ -144,7 +144,7 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 122.057583ms
+ duration: 107.953055ms
- id: 4
request:
proto: HTTP/1.1
@@ -180,8 +180,152 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 132.824163ms
+ duration: 109.152458ms
- id: 5
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 271
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ {"name":"ses","enabled":true,"default_from_address":"accounts@example.com","credentials":{"accessKeyId":"AKIAXXXXXXXXXXXXXXXX","secretAccessKey":"7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","region":"us-east-1"},"settings":{"message":{"configuration_set_name":"example"}}}
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider
+ method: PATCH
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"ses","enabled":true,"default_from_address":"accounts@example.com","credentials":{"region":"us-east-1"},"settings":{"message":{"configuration_set_name":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 101.922772ms
+ - id: 6
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"ses","enabled":true,"default_from_address":"accounts@example.com","credentials":{"region":"us-east-1"},"settings":{"message":{"configuration_set_name":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 113.693922ms
+ - id: 7
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"ses","enabled":true,"default_from_address":"accounts@example.com","credentials":{"region":"us-east-1"},"settings":{"message":{"configuration_set_name":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 118.64885ms
+ - id: 8
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"ses","enabled":true,"default_from_address":"accounts@example.com","credentials":{"region":"us-east-1"},"settings":{"message":{"configuration_set_name":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 102.432625ms
+ - id: 9
request:
proto: HTTP/1.1
proto_major: 1
@@ -216,8 +360,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 91.256324ms
- - id: 6
+ duration: 116.439131ms
+ - id: 10
request:
proto: HTTP/1.1
proto_major: 1
@@ -252,8 +396,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 118.364937ms
- - id: 7
+ duration: 308.397004ms
+ - id: 11
request:
proto: HTTP/1.1
proto_major: 1
@@ -288,8 +432,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 142.130031ms
- - id: 8
+ duration: 118.451201ms
+ - id: 12
request:
proto: HTTP/1.1
proto_major: 1
@@ -324,8 +468,152 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 124.650887ms
- - id: 9
+ duration: 93.877902ms
+ - id: 13
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 200
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ {"name":"mandrill","enabled":true,"default_from_address":"accounts@example.com","credentials":{"api_key":"7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"settings":{"message":{"view_content_link":true}}}
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider
+ method: PATCH
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"mandrill","enabled":true,"default_from_address":"accounts@example.com","credentials":{},"settings":{"message":{"view_content_link":true}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 103.937278ms
+ - id: 14
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"mandrill","enabled":true,"default_from_address":"accounts@example.com","credentials":{},"settings":{"message":{"view_content_link":true}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 114.358419ms
+ - id: 15
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"mandrill","enabled":true,"default_from_address":"accounts@example.com","credentials":{},"settings":{"message":{"view_content_link":true}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 97.558424ms
+ - id: 16
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"mandrill","enabled":true,"default_from_address":"accounts@example.com","credentials":{},"settings":{"message":{"view_content_link":true}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 117.365969ms
+ - id: 17
request:
proto: HTTP/1.1
proto_major: 1
@@ -360,8 +648,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 109.016873ms
- - id: 10
+ duration: 118.378838ms
+ - id: 18
request:
proto: HTTP/1.1
proto_major: 1
@@ -396,8 +684,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 125.017117ms
- - id: 11
+ duration: 185.689847ms
+ - id: 19
request:
proto: HTTP/1.1
proto_major: 1
@@ -432,8 +720,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 99.538663ms
- - id: 12
+ duration: 186.611268ms
+ - id: 20
request:
proto: HTTP/1.1
proto_major: 1
@@ -468,8 +756,152 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 103.097223ms
- - id: 13
+ duration: 105.563787ms
+ - id: 21
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 265
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ {"name":"smtp","enabled":true,"default_from_address":"accounts@example.com","credentials":{"smtp_host":"example.com","smtp_port":984,"smtp_user":"bob","smtp_pass":"secret"},"settings":{"headers":{"X-MC-ViewContentLink":"true","X-SES-Configuration-Set":"example"}}}
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider
+ method: PATCH
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"smtp","enabled":true,"default_from_address":"accounts@example.com","credentials":{"smtp_host":"example.com","smtp_port":984,"smtp_user":"bob"},"settings":{"headers":{"X-MC-ViewContentLink":"true","X-SES-Configuration-Set":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 104.980084ms
+ - id: 22
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"smtp","enabled":true,"default_from_address":"accounts@example.com","credentials":{"smtp_host":"example.com","smtp_port":984,"smtp_user":"bob"},"settings":{"headers":{"X-MC-ViewContentLink":"true","X-SES-Configuration-Set":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 105.083027ms
+ - id: 23
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"smtp","enabled":true,"default_from_address":"accounts@example.com","credentials":{"smtp_host":"example.com","smtp_port":984,"smtp_user":"bob"},"settings":{"headers":{"X-MC-ViewContentLink":"true","X-SES-Configuration-Set":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 108.802583ms
+ - id: 24
+ request:
+ proto: HTTP/1.1
+ proto_major: 1
+ proto_minor: 1
+ content_length: 5
+ transfer_encoding: [ ]
+ trailer: { }
+ host: terraform-provider-auth0-dev.eu.auth0.com
+ remote_addr: ""
+ request_uri: ""
+ body: |
+ null
+ form: { }
+ headers:
+ Content-Type:
+ - application/json
+ User-Agent:
+ - Go-Auth0-SDK/latest
+ url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/emails/provider?fields=name%2Cenabled%2Cdefault_from_address%2Ccredentials%2Csettings&include_fields=true
+ method: GET
+ response:
+ proto: HTTP/2.0
+ proto_major: 2
+ proto_minor: 0
+ transfer_encoding: [ ]
+ trailer: { }
+ content_length: -1
+ uncompressed: true
+ body: '{"name":"smtp","enabled":true,"default_from_address":"accounts@example.com","credentials":{"smtp_host":"example.com","smtp_port":984,"smtp_user":"bob"},"settings":{"headers":{"X-MC-ViewContentLink":"true","X-SES-Configuration-Set":"example"}}}'
+ headers:
+ Content-Type:
+ - application/json; charset=utf-8
+ status: 200 OK
+ code: 200
+ duration: 114.137108ms
+ - id: 25
request:
proto: HTTP/1.1
proto_major: 1
@@ -504,8 +936,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 146.999695ms
- - id: 14
+ duration: 143.874076ms
+ - id: 26
request:
proto: HTTP/1.1
proto_major: 1
@@ -540,8 +972,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 150.608009ms
- - id: 15
+ duration: 104.918612ms
+ - id: 27
request:
proto: HTTP/1.1
proto_major: 1
@@ -576,8 +1008,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 90.406542ms
- - id: 16
+ duration: 80.441748ms
+ - id: 28
request:
proto: HTTP/1.1
proto_major: 1
@@ -612,8 +1044,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 114.502213ms
- - id: 17
+ duration: 114.018449ms
+ - id: 29
request:
proto: HTTP/1.1
proto_major: 1
@@ -648,8 +1080,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 148.658055ms
- - id: 18
+ duration: 141.980471ms
+ - id: 30
request:
proto: HTTP/1.1
proto_major: 1
@@ -684,8 +1116,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 97.501372ms
- - id: 19
+ duration: 181.307544ms
+ - id: 31
request:
proto: HTTP/1.1
proto_major: 1
@@ -720,8 +1152,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 102.768642ms
- - id: 20
+ duration: 150.717409ms
+ - id: 32
request:
proto: HTTP/1.1
proto_major: 1
@@ -756,8 +1188,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 86.071956ms
- - id: 21
+ duration: 111.810141ms
+ - id: 33
request:
proto: HTTP/1.1
proto_major: 1
@@ -792,8 +1224,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 101.699668ms
- - id: 22
+ duration: 116.109233ms
+ - id: 34
request:
proto: HTTP/1.1
proto_major: 1
@@ -828,8 +1260,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 117.919342ms
- - id: 23
+ duration: 137.214282ms
+ - id: 35
request:
proto: HTTP/1.1
proto_major: 1
@@ -864,8 +1296,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 99.470161ms
- - id: 24
+ duration: 101.625758ms
+ - id: 36
request:
proto: HTTP/1.1
proto_major: 1
@@ -900,8 +1332,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 112.728143ms
- - id: 25
+ duration: 97.981112ms
+ - id: 37
request:
proto: HTTP/1.1
proto_major: 1
@@ -936,8 +1368,8 @@ interactions:
- application/json; charset=utf-8
status: 200 OK
code: 200
- duration: 114.079958ms
- - id: 26
+ duration: 144.566513ms
+ - id: 38
request:
proto: HTTP/1.1
proto_major: 1
@@ -971,8 +1403,8 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
- duration: 110.719817ms
- - id: 27
+ duration: 144.040463ms
+ - id: 39
request:
proto: HTTP/1.1
proto_major: 1
@@ -1006,4 +1438,4 @@ interactions:
- application/json; charset=utf-8
status: 204 No Content
code: 204
- duration: 107.81514ms
+ duration: 116.579374ms