Create Free Azure DB
By Rob Litjens
Just a few days ago I read in an that he announced that there was a free azure database available. I am a Dutch guy. I like free. And it does fit perfectly in my dataAPI Builder stuff I am doing. Next ot the fact that I am writing this article using Github and Hugo running on Azure Static Webapp. I think this all fits in/together some how.
In fact, that LinkedIn post referers now to https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose. This page explains how you can create it and explains some of the settings.
It is not exactly where I started. I have been looking in those Azure Static Web Apps (SWA called after this) before. I looked at the one of the beta options in SWA and found out that you need to give a username and password for authentication. So.. that is my first remark on this. People want to use User Assigned Managed Identity. It is more safe and more protected. Wondering if you can do something with the snippets or the application settings.
I followed that route to create the database, but before creating it, I have added a User Assigned Managed Identity first. After creation of the account, I created the Database running serverless and using the User Assigned Managed Identity. I have set the security settings to “Mixed mode”
If you read the text on top of the Application Settings option, you think this is the way to go:
I thought it will bring to where i want to be: Adding a (User Assigned) Mananged identity to the application settings to protect access. But no, it did not. Lets Bing for azure static web app Managed identity, you will find this But, continuing my investigation, I do not need to go that route at this moment. Within the SWA I have a link for Identity. I can use that:
I will follow that route, despite my payments to MS will continue to rise. But it does fit in my MAPS subscription. Adding the User Assigned Managed Identity is simple. Just select it:
After checking the box in front of the User Assigned Managed Identity, you can press add on the bottom and it is added. And your identity is changed. I advice you to validate if your website is still working…
Next action is to make sure a connection to the database will be setup. For this you can use the “Database Connection (Preview)” link in the left menu. Opeing the page you will see that there is an option to link an exisiting database. We follow those steps.
As you can see, you need to fill in all the details. Authentication type “User Assigned Managed Identity”
This will enable all the access, despite there is a message below about granting access to the Database and that the connection is added to the repository. I will find out what that means on short notice.
For today it is done.