Solve: Testing Azure Blob in LocalStack...And What to Do When Terraform Fails
Solve: Testing Azure Blob in LocalStack...And What to Do When Terraform Fails
Detailed Steps
✅ Step 1: Create a Python virtual environment (Terminal #1)
✅ Step 2: Install required Python packages (Terminal #1)
We’ll use these to talk to the LocalStack Blob backend.
✅ Step 3: Start LocalStack with Azure + S3 enabled (Terminal #1)
✅ Step 4: Open a new terminal and activate Python environment (Terminal #2)
✅ Step 5: Create a test script to upload and retrieve a blob (Terminal #2)
Run it:
✅ Step 6: Install Terraform 1.8.x (Terminal #2)
Upgrades to a Terraform version compatible with current providers.
✅ Step 7: Attempt Azure provisioning with Terraform (Terminal #2)
Paste this sample Azure Blob config into main.tf:
You’ll see this error:
🟥 Showstopper: The azurerm provider tries to talk to real Azure and cannot be redirected to LocalStack — despite what the docs suggest.
✅ Step 8: Workaround — Use S3 to Simulate Azure Blob (Terminal #2)
Paste:
Then run:
✅ Terraform provisions the bucket locally. You now have a working simulation of Azure Blob.
You'll see:
* * *
Aaron Rose is a software engineer and technology writer.
Comments
Post a Comment