Skip to main content

Posts

How I Fixed an Azure SQL Server Error: Retrieving Long Term Retention Policies for Database Using Terraform

During my recent project, I encountered a deployment issue while configuring Azure SQL Server and Long Term Retention (LTR) Policies using Terraform . The error occurred when attempting to retrieve the LTR policies, and the root cause was twofold: Incorrect Dependency References : The problem stemmed from an incorrect reference within the SQL Server identity block, which led to Terraform not properly managing dependencies. Specifically, it failed to establish the necessary order for operations. Race Condition with Key Vault Encryption : In addition, there was a race condition with the Key Vault encryption key , where the SQL Server identity was trying to assign access policies before the encryption key was fully created and available. These challenges resulted in deployment failures, manifesting in errors such as "retrieving Long Term Retention Policies" and improper assignment of access policies to the SQL Server identity. How I Fixed It To resolve the issue: I ensured tha...
Recent posts

Printing - NATO phonetic alphabet #python3

  Hi Foks, This code illustrates how to print the NATO phonetic alphabet in Python3. prompt_response = str ( input ( "Enter your name?" )) dict = { 'A' : 'Alpha' , 'B' : 'Bravo' , 'C' : 'Charlie' , 'D' : 'Delta' , 'E' : 'Echo' , 'F' : 'Foxtrot' , 'G' : 'Golf' , "H" : "Hotel" , 'I' : 'India' , 'J' : 'Juliet' , 'K' : 'Kilo' , 'L' : 'Lima' , 'M' : 'Mike' , 'N' : 'November' , 'O' : 'Oscar' , 'P' : 'Papa' , 'Q' : 'Quebec' , 'R' : 'Romeo' , 'S' : 'Sierra' , 'T' : 'Tango' , 'U' : 'Uniform' , 'V' : 'Victor' , 'W' : 'Whiskey' , 'X' : 'Xray' , 'Y' : 'Yankee' , 'Z' : '...

Using Azure SDK, upload files to Azure storage

 Here is a script to upload files to azure storage using the latest SDK. #!/usr/bin/env python from azure.storage.blob import BlobClient import os import uuid storage_access_key = "storage_account_access_key" storage_name = "storage_account_name" CNTR_STORAGE_NAME = "container_name" con_str = f'DefaultEndpointsProtocol=https;AccountName= { storage_name } ;AccountKey= { storage_access_key } ' # Create a local directory to hold blob data if the path not exist local_path = "./data" if not os.path.exists(local_path): os.mkdir(local_path) # Create a file in the local data directory to upload and download local_file_name = str (uuid.uuid4()) + ".txt" upload_file_path = os.path.join(local_path, local_file_name) # Write text to the file file = open (upload_file_path, 'w' ) file.write( "Hello, World!" ) file.close() blob = BlobClient.from_connection_string( conn_str =con_str, container_name =CNTR_STORAGE_NAME, blob_...

01 Azure DevOps in Hindi

Hello Folks, This is my first video about Azure DevOps in Hindi.

01 Getting Started with Git in Hindi

01 - Getting start with Git in Hindi

Hi Folks, I have started git video series in Hindi.  find the below youtube link.

How to achieve Node Affinity (Hard) in K8S 1/2

 If you are running with a multi-mode cluster and when you want to place your pods on specific nodes then node affinity is the best option. to achieve the node affinity you have to mention in the manifest specification. There are two types of affinity: hard and soft.  requiredDuringSchedulingIgnoredDuringExecution ( Hard) preferredDuringSchedulingIgnoredDuringExecution (soft) when we use required that means hard affinity and preferred means soft affinity. In simple way when you want to place pod on specific node then you can use the required option and when you have two nodes then you can mention the weight to place the pods. Request: you need place a nginx pod to k8s-n2 with 2 replicas. Hard Affinity -     I have 3 node cluster as follows;           my manifest file as follows. In my manifest file if you see closely the match expression has set to key and value pairs. the key is "servers" and value is "qrst-ap...