I had a great pleasure giving a talk on Secure infrastructure with Terraform, Azure DSC and Ansible at Microsoft Techdays 2018 in Stockholm. The blog post based on the content is in workings.
As I promised to publish my slides and demos, here they are – in a Github repo.
The demos are grouped into three folders: ansible, dsc and tf. Dsc and tf have subfolder called “hardened”. This is where a more secure version of the template is.
“Tf – > hardened -> general” subfolder has various resources I used to supply the hardened demo, such as KeyVault and Azure Policy.
You can start using the templates right away, just look for edited IDs and password replaced with xxx-yyy etc.
Or drop me a question if in doubt.
I figured it out.
count = “2”
network_interface_id = “${element(azurerm_network_interface.tfdemo.*.id, count.index)}”