Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts : "azure"

Terraform count vs for_each for examples with map of objects

In this Terraform article I have two examples for loop and count loop. I have one map of object. Where I will use both the loops on map to show how to use them in different way. You can check my earlier articles for different loops examples - Terraform for_each loop on map example and Terraform…

Read more

Terraform fore_each for loop filter with if condition example

In this HashiCorp Terraform configuration example article, I am using if condition to filter list of variable objects. Here in this configuration I am have multiple list of resource group, Their name and location are different in the variable objects as mentioned below. 

I want to deploy only…

Read more

Terraform foreach module output to show only required results

In my previous articles I was testing my variable information to see output, one thing I observed in the output was showing all the variable content information in the output. 

Terraform testing local variables and output csv file without resource Part 1
Terraform testing variable map object va…

Read more

Terraform deploy create A Private DNS Record in Microsoft Azure from list of objects

This is an example of creating multiple private DNS records in Microsoft Azure from list of objects. Here I am starting with variables.tf, I am using below list of objects as type in variable.

#variables.tf
variable "dns_records" {
  type = list(object({
    name                =

Read more

Terraform testing variable map object values without resource configuration part 2

This is second part of earlier written article Terraform testing local variables and output csv file without resource Part 1. Idea is use same method technique to learn and verify how to assign map of object works. Below is the example of variable map object and its output.

I used this map obje…

Read more

Terraform error retrieving storage account failure responding to request StatusCode 404 StorageAccountNotFound The storage account was not found

While working with Terraform Azure provider and creating storage account with service endpoints (subnets), I was receiving below strange error.

Error: retrieving Storage Account: (name: "storageaccount" / Resource Group "resourcegroup")"  storage.AccountsClient#GetProperties: Failure responding t…

Read more

Terraform A reference to a resource type must be followed by at least one attribute access, specifying the resource name

After entering my resources information for Azure in Terraform configuration files and running a plan I was keep on receiving below error.

A reference to a resource type must be followed by at least one attribute access, specifying the resource name

terraform plan azure a reference to a resource type must be followed by at least one attribute access specifying the resource name.png

PS D:\Projects\Terraform\Module_creat…

Read more

Terraform one module deploy null or multiple resources based on input (nested for loop)

This article is about little bit advanced structure in the terraform module, Here I using terraform functions to create a module where multiple resources will be created from given map or object input. If map or object is null (not mentioned) there shouldn't be error and it should skip making those …

Read more

Hashicorp Terraform map and object inside module and variable example

This is example of map and object functions used in variable and Terraform module. Here is my tree view of module folders and tf files.

terraform hashicorp hcl tree module map and object example microsoft azure cloud resource group storage account.png

In the module variable I am using two terraform functions object and map to define data. To use object, provide information in key value pair and dictionar…

Read more

DevOps Part 1.2 SCM Git - Create Virtual Network (vNET) in Microsoft Azure

In my earlier part of this DevOps series DevOps Part 1.1 SCM Git - Create Resource Group in Microsoft Azure, I created first Azure resource - an empty Resource Group. In this example I am going to create vNET (Virtual Network) in this resource group.

An essential part of your private network inf…

Read more

DevOps Part 1.1 SCM Git - Create Resource Group in Microsoft Azure

This will be multipart article series on DevOps. In this part I am going to configure SCM git (Source control) and push my code to centralized repository on Github.com. For this first I need a system where I will complete all my DevOps Labs configuration and use it as a workstation. I will create a …

Read more

Ansible Azure An exception occurred during task execution. TypeError deprecated() got an unexpected keyword argument

After upgrading Ansible Azure plugin module, while running my old ansible scripts against Azure resources to change or get information I was receiving error of TypeError: deprecated() got an unexpected keyword argument. (My credentials are stored in the file location of vim ~/.azure/credentials

Read more

PowerShell How to find file and folders in Azure Storage Account Blobs and Containers

This script helps to find files and folders on Azure Storage Accounts blobs and containers.

There are two PowerShell variables I have mentioned, First Variable is $searchFile use file extension or names you want to search. Report are generated in file path mentioned under variable $exportCsv.

Read more

Create multiple Azure vnet (Virtual Network) using ansible

This is a second part of Deploy create Virtual Network vNET in Azure cloud using Ansible, in this part I am creating multiple vNets with single Ansible script. All the info and details related to new vNet added in separate vnet variable yml file in json format as shown below.

Azure Virtual network json ansible yaml mutliple vnets creation resources arm templates resource group address prefixes cidr location vnet name.jpg

Next in below …

Read more

Can not execute kustomize build issue installing Ansible AWX Operator

While installing Ansible AWX operator tower (Automation Controller) for the development team, I was receiving the below error. I was following the official installation guide given from https://github.com/ansible/awx-operator.

kustomize kustomization.yaml yml kubernetes manifest configuration vmware vsphere ansible awx operator azure ansible platform automation controller tower setup sevalsymlink git.jpg

ubuntu@AnsibleAWX:~$
ubuntu@AnsibleAWX:~$ kustomize build . …

Read more

Find and use Azure Marketplace VM images with Azure Az CLI

There is another way to Find and use Azure Marketplace VM images with Azure PowerShell. You can do the same task to fetch Azure VM information using is az cli. There are two common images UbuntuServer and MicrosoftWindowsServer. Here I will work with Ubuntu images to get information from az cli co…

Read more

Find and use Azure Marketplace VM images with Azure PowerShell

You can use this write up to find Azure Virtual Machine images available on the Azure Marketplace using PowerShell Module Az (Azure) commands. Before proceeding you need to know a few jargon vocabulary related to Azure cloud VM Images. You can use below properties to find VM templates on Azure cloud…

Read more

Azure add create a Subnet to existing Virtual Network using PowerShell

This is second part of the earlier written article Create a Azure Virtual Network with Subnet using PowerShell. Here in this blog I will create subnet in already created Azure vNET (Virtual Network). I have defined Azure vNET and subnets in Powershell variables. I am creating a Azure vNET without a…

Read more

Remove Azure Virtual Network Subnet using PowerShell

This PowerShell script will help you to remove subnet from Microsoft Azure Virtual Network (vNET). You can follow my earlier articles regarding the another topic related to Azure networking here on Azure add create a Subnet to existing Virtual Network using PowerShell and  Create a Azure Virtual…

Read more

Ansible authenticate to Microsoft Azure using credential inside yaml file

Ansible authenticate to Microsoft Azure using credential profiles Part 1
Ansible authenticate to Microsoft Azure using credential profiles Part 2

This is continuation of  the authentication to azure with ansible parts. While working on Ansible AWX tower controller, I wanted to create profile, bu…

Read more

20 blog posts

Blog Search

Page Views

11240036

Follow me on Blogarama