< Previous Challenge - Home - Next Challenge>
The goals for this challenge include understanding:
- Custom script extensions
- Globally unique naming context and complex dependencies
- Staging artifacts in a location accessible to the Azure Resource Manager
We have provided a script (install_apache.sh
) that configures a web server on a Linux VM. When run on the VM, the script deploys a static web page that should be available at http://<PublicIPofTheVM>/wth.html
You can find the script in the Resources folder for Bicep-Challenge-07.
Your challenge is to:
-
Extend the Bicep template to configure a webserver on the Linux VM you deployed.
-
There are two options for how to do this:
- Option 1:
- Host the script file in a secure artifact (staging) location that is only accessible to the Azure Resource Manager.
- Pull the website configuration script from the artifact location.
- Option 2:
- Read the script's body into a string and pass it as an input parameter to the Bicep template
- Option 1:
- Verify you can view the web page configured by the script
- Use an Azure Blob Storage account as the artifact location
- Secure access to the artifact location with a SAS token
- Pass these values to the ARM Template as parameters
- Read a text file using PowerShell
- Read a text file using a Linux shell