Conversation
2b706a0 to
3e70b59
Compare
3e70b59 to
e83e819
Compare
e83e819 to
1b10843
Compare
1b10843 to
fa607f0
Compare
fa607f0 to
7c5757b
Compare
There was a problem hiding this comment.
Hi @lazarkanelov, thanks for the contribution. 🙂 I have a few comments:
- If you want to create a sample that only deploys a resource, in this case an Azure Database for PostgreSQL flexible server, using Bicep or Terraform, you should include this test in localstack-pro repo. Instead, if you want to create a full sample that also deploys a companion Web App or Functions App + Azure Database for PostgreSQL flexible server, via Bicep, Terraform, and Azure CLI, you need to extend the sample to automate the deployment of the app as well, just like the other samples.
- The name and structure of the sample are wrong. If you want to provide two samples, one in Python and and one in .NET of a Web App +Azure Database for PostgreSQL flexible server, you should replace
postgresql-flexible-server/pythonwithweb-app-postgresql-database/pythonandweb-app-postgresql-database/dotnet. - You also need to create a script that invokes the app to check whether is properly deployed and it's working as expected. This way, the GitHub Actions workflow built by @DrisDary can call this integration or validation script to test that the app deployment succeeded.
- You didn't update the main page with a link to the sample.
| exit 1 | ||
| fi | ||
|
|
||
| # Create PostgreSQL Flexible Server |
There was a problem hiding this comment.
@lazarkanelov While creating an Azure Database for PostgreSQL flexible server via REST API is not wrong, the unwritten convention for this repo is to use Azure CLI for any bash script under the scripts folder. I think it would be better to change the az rest call with a call to az postgres flexible-server create
Add a new sample demonstrating an Azure Web App backed by PostgreSQL Flexible Server. Includes a Flask notes app with full-text search, deployed via App Service with Terraform, Bicep, and ARM (scripts) deployment options. Rename sample from postgresql-flexible-server to web-app-postgresql-database to follow repo conventions. Also fix hardcoded storage connection string in function-app-storage-http/dotnet that broke on LocalStack.
7c5757b to
ceff059
Compare
|
@paolosalvatori , thanks for the review! I've addressed your feedback: Changes made:
Regarding az rest vs az postgres flexible-server create: It looks like az postgres flexible-server create performs a client-side SKU availability pre-check by calling the capabilities endpoint (/locations/{location}/capabilities). LocalStack's implementation of that endpoint currently returns an empty SKU list, so the CLI fails with ERROR: No available SKUs in this location. before it even attempts the actual server creation. This happens regardless of which --sku-name/--tier values are passed, or even if they're omitted (the CLI validates its defaults too). On the other hand, az rest sends the PUT directly to the management API (the same way Terraform does) bypassing this client-side validation. The server creation itself works fine on LocalStack. With that being said, I see a 2 paths forward:
Curious what do you think and what you will recommend. :) |
In case the So my suggestion is deploying the app against Azure and check what the infamous call returns when run against Azure. Then, change the code of the emulator to return the same list. |
Summary
run-samples.shfor CI across all deployment methodsTest plan
scripts/deploy.shandscripts/validate.shterraform/deploy.shbicep/deploy.sh