Created
April 1, 2024 14:48
-
-
Save treyperrone/7402ee42bb01f94d0a2b7289f5977f41 to your computer and use it in GitHub Desktop.
20240401-tf-azure-testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## using ubuntu jammy 22 lts docker image | |
docker pull ubuntu:jammy | |
apt update | |
apt install -y curl OR apt install -y wget (wget has less dependencies??) | |
##% curl dep overlap with azure-cli, so may as well curl? | |
curl https://releases.hashicorp.com/terraform/1.7.5/terraform_1.7.5_linux_arm.zip > /tmp/terraform.zip | |
apt install -y unzip | |
unzip /tmp/terraform.zip -d /usr/local/bin | |
terraform --version | |
#azure-cli https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt | |
apt-get update | |
apt-get -y install ca-certificates curl apt-transport-https lsb-release gnupg | |
curl -sLS https://packages.microsoft.com/keys/microsoft.asc \ | |
| gpg --dearmor \ | |
| tee /etc/apt/keyrings/microsoft.gpg \ | |
> /dev/null | |
chmod go+r /etc/apt/keyrings/microsoft.gpg | |
echo "source os-release vars" | |
. /etc/os-release | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $UBUNTU_CODENAME main" \ | |
| tee /etc/apt/sources.list.d/azure-cli.list | |
apt-get update | |
apt-get install azure-cli | |
az --version | |
mkdir tf-test && cd tf-test | |
vi data.tf | |
data "azurerm_client_config" "current" {} | |
terraform { | |
backend "local" { | |
} | |
} | |
provider "azurerm" { | |
features {} | |
} | |
terraform init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment