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
name=$1 | |
if [[ -n "$name" ]]; then | |
echo "Got $name Parameter." | |
else | |
echo "argument error" | |
fi |
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
GROUPNAME="adrons-images" | |
LOCATION="westus2" | |
STORAGENAME="adronsimagestorage" | |
IMAGECASSANDRA="basecassandra" | |
echo 'Deleting existing image.' | |
az image delete -g $GROUPNAME -n $IMAGECASSANDRA | |
echo 'Creating the managed resource group for images.' |
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
{ | |
"variables": { | |
"client_id": "{{env `TF_VAR_clientid`}}", | |
"client_secret": "{{env `TF_VAR_clientsecret`}}", | |
"tenant_id": "{{env `TF_VAR_tenant_id`}}", | |
"subscription_id": "{{env `TF_VAR_subscription_id`}}", | |
"imagename": "", | |
"storage_account": "adronsimagestorage", | |
"resource_group_name": "adrons-images" | |
}, |
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
{ | |
"variables": { | |
"tenant_id": "{{env `TF_VAR_tenant_id`}}", | |
"subscription_id": "{{env `TF_VAR_subscription_id`}}", | |
"storage_account": "adronsimagestorage", | |
"resource_group_name": "adrons-images" | |
}, | |
"builders": [{ | |
"type": "azure-arm", |
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
{ | |
"variables": { | |
"client_id": "{{env `TF_VAR_clientid`}}", | |
"client_secret": "{{env `TF_VAR_clientsecret`}}", | |
"tenant_id": "{{env `TF_VAR_tenant_id`}}", | |
"subscription_id": "{{env `TF_VAR_subscription_id`}}", | |
"storage_account": "adronsimagestorage", | |
"resource_group_name": "adrons-images" | |
}, |
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
2019/08/08 16:07:29 [INFO] Packer version: 1.4.2 | |
2019/08/08 16:07:29 Packer Target OS/Arch: linux amd64 | |
2019/08/08 16:07:29 Built with Go Version: go1.12.6 | |
2019/08/08 16:07:29 Detected home directory from env var: /home/adron | |
2019/08/08 16:07:29 Using internal plugin for proxmox | |
2019/08/08 16:07:29 Using internal plugin for amazon-ebs | |
2019/08/08 16:07:29 Using internal plugin for amazon-ebsvolume | |
2019/08/08 16:07:29 Using internal plugin for hyperv-iso | |
2019/08/08 16:07:29 Using internal plugin for linode | |
2019/08/08 16:07:29 Using internal plugin for ncloud |
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
{ | |
"variables": { | |
"client_id": "{{env `TF_VAR_clientid`}}", | |
"client_secret": "{{env `TF_VAR_clientsecret`}}", | |
"tenant_id": "{{env `TF_VAR_tenant_id`}}", | |
"subscription_id": "{{env `TF_VAR_subscription_id`}}" | |
}, | |
"builders": [{ | |
"type": "azure-arm", |
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
export TF_VAR_subscription_id="00000000-0000-0000-0000-000000000000" | |
export TF_VAR_tenant_id="11111111-1111-1111-1111-111111111111" |
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
provider "azurerm" { | |
version = "=1.27.0" | |
subscription_id = "00000000-0000-0000-0000-000000000000" | |
tenant_id = "11111111-1111-1111-1111-111111111111" | |
} | |
resource "azurerm_resource_group" "adrons_resource_group_workspace" { | |
name = "adrons_workspace" |
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
# Update the latest packages and make sure certs, curl, https transport, and related packages are updated. | |
sudo apt-get update | |
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg | |
# Download and install the Microsoft signing key. | |
curl -sL https://packages.microsoft.com/keys/microsoft.asc | \ | |
gpg --dearmor | \ | |
sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null | |
# Add the software repository of the Azure CLI. |