March 3, 2020

Default Azure Search Service query key and Terraform

Need to get the default Azure Search Service query key into a variable to use in other parts of your terraform infrastructure? I did too. Unfortunately the docs for this were a bit vague, so through a bit of trial and error we got there azurerm_search_service.example.query_keys[0].key Given that these query keys are called the “default” keys, I assumed we could access this attribute by azurerm_search_service.example.query_keys.default.key. But that was not the case. Read more