question

MDB-3323 avatar image
0 Votes"
MDB-3323 asked kobulloc-MSFT commented

SendGrid as SaaS resource - ARM template deployment

Hi,

I have noticed that Azure migrated all legacy SendGrid accounts into SaaS resources and pricing tiers names were changed as well.
I am looking for a way to enable creating and configuring SendGrid account using ARM template but did not find anything helpful so far.
The attempt to export existing SendGrid resource to ARM template from Azure Portal was unsuccessful with the following error message:

{"code":"ExportTemplateCompletedWithErrors","message":"Export template operation completed with errors. Some resources were not exported. Please see details for more information.","details":[{"code":"ResourceTypeSchemaNotFound","target":"Microsoft.SaaS/resources","message":"The schema of resource type 'Microsoft.SaaS/resources' is not available. Resources of this type will not be exported to the template."}]}

I have also tried to reach Twilio Support Team but they do not know neither - they recommended contacting Azure Support.
Does anyone know if there is any way to achieve that currently?

azure-dtl-arm-enviorments
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MDB-3323 avatar image
2 Votes"
MDB-3323 answered kobulloc-MSFT commented

On the advice of @kobulloc-MSFT I have contacted Azure Support and they helped me finding the workaround for exporting SendGrid's SaaS resource to ARM template. If anyone encounters similar issues, the solution is as follows:

The catch was to create free account first and then check the generated template:

  1. Find the deployment history in the SendGrid-service-belonging resource group and click into the deployment.
    135068-sg1.png

  2. When we click into the template of this deployment, we will see how this SaaS template looks like. (In some services, they don’t create the service by template and use rest api directly, so we may not see the deployment by this way)
    135115-sg2.png

  3. Since it is SaaS service, it required for the plan id, offer id and term id as the same. Rename the service to avoid conflict of the name.
    135069-sg3.png

  4. After creation, you will see the SendGrid like below, and you will receive an email from the SendGrid side.
    135070-sg4.png

Another not exactly straight forward thing are the SendGrid's new planIds which are:
"free-100",
"essentials40k",
"essentials100k",
"pro-100k",
"pro-300k",
"pro-700k",
"pro-1p5m",
"pro-2p5m"

Hope this will help someone.


sg1.png (59.5 KiB)
sg2.png (153.2 KiB)
sg3.png (85.3 KiB)
sg4.png (130.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MDB-3323, thank you very much for the update!

0 Votes 0 ·
kobulloc-MSFT avatar image
0 Votes"
kobulloc-MSFT answered

Hello, @MDB-3323!

As a third party solution usually we would usually recommend reaching out to SendGrid directly but it sounds like you've already done that. I'm not a SendGrid specialist but I'll do my best to try and answer your question.

One of my favorite ARM features is the ability to export an ARM template from an existing resource or resource group. This allows you to use the portal (or CLI, or PowerShell) to quickly create an ARM template base which you can edit and use for future deployments. In this case you would create your SendGrid resource, export the ARM template, edit it as needed, and then use it for future deployments:

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-portal


Resource Group:

133761-image.png


Resource:

133730-image.png


It does appear that SendGrid relies heavily on API calls, however, and there may be some configuration that you'll need to automate using connectors or through some other means:

I hope this helps!


image.png (77.7 KiB)
image.png (72.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MDB-3323 avatar image
0 Votes"
MDB-3323 answered kobulloc-MSFT commented

@kobulloc-MSFT
Thank you for the hints, but like I said in my first message - I have already tried that approach and exporting template is not possible due to an error which I also mentioned in the previous message.

It look like some kind of functionality degradation for me because it was possible before.
Screenshots below:
133809-1-window.png


133876-2-window.png



1-window.png (39.5 KiB)
2-window.png (50.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MDB-3323, thank you for the clarification. I've got one more thing I'd like to try. I'll reach out to you directly.

1 Vote 1 ·