Archives for September, 2022
Using -out with terraform plan – terraform plan -out
This is a short post - always use the -out option. This saves the current plan - and will execute it exactly as saved (once you pass in the saved…
Data Block External Data – Querying External Resources in Terraform
Retrieving External data Use either the data block or the terraform_remote_state block to retrieve external data. However, there are scenarios where the data block does not exist in the provider or terraform_remote_state cannot be used, such as…
Referencing outputs from one terraform file in another terraform file
Split Configuration across multiple files You can (and should) split resources across multiple files (even folders, if you so desire). The entire deployment will have a single state file managing…
data.azurerm_client_config.current.object_id returns null “”
You may be using the current client config object to retrieve the current user's object id. And that used to work just fine. object_id = However, for me, this…
Error: Error decoding “admin_ssh_key.0.public_key” for public key data
This is an error I encountered while trying to set the admin ssh key for a linux instance - and attempting to use an existing pub key in my .ssh…