Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosGoogle Chrome: Unfinished Projects: Solange’s Public Sculpture(21.09.2026 um 17:02 Uhr)
Windows Tipps & SecurityBlurry or pixelated video in Microsoft Teams(21.09.2026 um 14:34 Uhr)
Sicherheitslücken (CVE)USN-8791-1: Ghostscript vulnerability(21.09.2026 um 14:51 Uhr)
Sicherheitslücken (CVE)USN-8792-1: Memcached vulnerability(21.09.2026 um 15:02 Uhr)
Sichere ProgrammierungI stopped rewriting the same Electron boilerplate — so I packaged it(21.09.2026 um 17:28 Uhr)
YouTube Security VideosGoogle Chrome: Unfinished Projects: Solange’s Public Sculpture(21.09.2026 um 17:02 Uhr)
Windows Tipps & SecurityBlurry or pixelated video in Microsoft Teams(21.09.2026 um 14:34 Uhr)
Sicherheitslücken (CVE)USN-8791-1: Ghostscript vulnerability(21.09.2026 um 14:51 Uhr)
Sicherheitslücken (CVE)USN-8792-1: Memcached vulnerability(21.09.2026 um 15:02 Uhr)
Sichere ProgrammierungI stopped rewriting the same Electron boilerplate — so I packaged it(21.09.2026 um 17:28 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Automating Azure SFTP deployment with Terraform

In a previous blog, I walked through how to set up SFTP on Azure step-by-step through the Azure Portal. That’s a great way to get familiar with the service, but if you're deploying this regularly, across different environments, for m…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Automating Azure SFTP deployment with Terraform



In a previous blog, I walked through how to set up SFTP on Azure step-by-step through the Azure Portal. That’s a great way to get familiar with the service, but if you're deploying this regularly, across different environments, for multiple clients, or as part of a DevOps process, you need a way to automate it.



That’s where Terraform comes in.



Terraform is an Infrastructure as Code (IaC) tool that allows you to define and deploy Azure resources using configuration files. This means you can create your Azure SFTP setup in a version controlled way and replicate it in multiple environments with minimal effort.






The Terraform Code



I’ve published a GitHub repository containing the Terraform configuration you need to create:




  • An Azure resource group

  • A premium block blob storage account

  • SFTP enabled on that storage account

  • A local SFTP user with password authentication

  • An initial container for file storage



You can clone the repo and follow the tutorial below to deploy the SFTP setup to suit your needs.




git clone https://github.com/weeyin83/sftp-azure-terraform.git
cd sftp-azure-terraform










Pre-requisites




  • An Azure subscription

  • Basic understanding of Azure

  • Basic understanding of Terraform


  • Visual Studio Code (or similar) installed on your machine

  • Azure CLI installed on your machine

  • Terraform installed on your machine






Customising the deployment



Within the GitHub repo I have created the following files:




  • main.tf - Main Terraform configuration

  • variables.tf - Variable definitions

  • outputs.tf - Output definitions



Within the variables.tf file, I have defined defaults for each variable that needs inputs. You can either change that file directly, or, the way I prefer to work, create a .tfvars file and define the variable details there.



To do that, create a new file and name it something like prod.tfvars.



Within the file copy the following and then replace them with values that make sense for your deployment




location = "yourazurelocation"
account_replication_type = "LRSorZRS"
container_name = "containername"
sftp_local_user = "username"
tag_environment = "environmentname"
tag_project = "projectname"
tag_creator = "creatorname”
azure_subscription_id = "azuresubscriptionid"







With this file in place we can start to deploy the Terraform code. Ensure that you are are logged into your Azure environment through your command line tool. First, run terraform init in the command line. This will download any required providers needed to deploy the Terraform code.



Then run terraform plan -var-file="prod.tfvars". This will plan out any changes and new resources that need created within your environment to match the template file.



Then you can run _ terraform apply -var-file=”prod.tfvars” , if you add on _-auto-approve then it will deploy the resources without any further prompts or confirmation from yourself.



💡



If you need a refresher on Terraform and the deployment process you can check out my "Introduction to Terraform” blog post.



Once the deployment is finished, the console will output the SFTP hostname and username you need to connect. The password will not be shown initially, as it is a sensitive value.



Automating Azure SFTP deployment with Terraform

Terraform output



To see the password you can type the following into the console:




terraform output -raw sftp_password







This will display the password in clear text for you.



You have now created the Azure SFTP setup and have the information required to connect to it and upload, download and share files.






Managing costs



Just like I mentioned in the manual setup guide, remember SFTP in Azure costs $0.30/hour while it’s enabled. If you don’t need it running 24/7, consider automating the enable/disable process. This can be handled with the Azure CLI, PowerShell, an Azure Automation Runbook, or you could even re-run the Terraform template, changing line 69 of the main.tf file to “false” to disable the SFTP feature.






Wrapping Up



Using Terraform to deploy Azure SFTP means you can spin up secure file transfer endpoints quickly and consistently. However, if you are new to the Azure SFTP offering, I recommend checking out my original blog post for a deeper explanation of what SFTP is, how Azure supports it, and how to connect.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Automating Azure SFTP deployment with Terraform

Thematisch verwandte Begriffe: Automating, Azure, SFTP, deployment · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94393 | When a user creates or edits a report inside an event, MISP can identify…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick