Attach NSG to Existing Subnet Using ARM Template

I’m looking to create a Network Security Group (NSG) in Azure and attach it to an existing subnet using an ARM Template. I’ve already come across this site: https://github.com/Azure/azure-quickstart-templates/tree/master/201-nsg-add-to-existing-subnet but the template references additional files on GitHub which my client won’t allow. Ideally i’d like to avoid nested ARM Templates if possible and just use…

How to update existing manage packer image in Azure?

I have created a ubuntu image by following code { “builders”: [{ “type”: “azure-arm”, “subscription_id”: “XXXXXX”,XXXXXXXX “client_id”: “XXXXXXX”, “client_secret”: “06XXXXXXX”, “tenant_id”: “41X”,XXXXXX “managed_image_resource_group_name”: “myResourceGroup”, “managed_image_name”: “myubuntuPackerImage1234”, “os_type”: “Linux”, “image_publisher”: “Canonical”, “image_offer”: “UbuntuServer”, “image_sku”: “16.04-LTS”, “location”: “East US”, “vm_size”: “Standard_DS2_v2” }], “provisioners”: [{ “execute_command”: “chmod +x ; sudo -E sh ””, “inline”: [ “apt-get update”, “apt-get…

python flask simple resetful api not just add 1 record user in sqlite database

i create a simple resetful api with flask and work corrent , but after add 1 record user details , don’t add next user or second user in database and give error 500. my code: @app.route(“/api/LicenseService/newcustomer”, methods=[“POST”]) def add_user(): try: data = request.get_json() new_user = User(username=data[‘username’], userid=data[‘userid’], product=data[‘product’], licenses=data[‘licenses’]) db.session.add(new_user) db.session.commit() return jsonify({‘Message’: ‘1×0001’}) except:…

NGINX real_ip_header ignore IPv6

We have Nginx behind AWS cloudfront. For using real user Ip via $remote_addr paramter, we have implemented the suggestion in this article: https://blog.jayway.com/2014/03/28/how-to-get-the-client-ip-when-using-cloudfront-and-nginx/ It works fine, but we found that when the request is from IPv6, the $remote_addr paramter is using cloudfront IP instead of client ip. For example, request with this header: X-Forwarded-For: 1.1.1.1,…