def azure_layer() -> Mock: layer = Mock(spec=Layer) layer.parent = None layer.cloud = "azurerm" layer.name = "blah" layer.providers = { "azurerm": { "location": "centralus", "tenant_id": "blahbc17-blah-blah-blah-blah291d395b", "subscription_id": "blah99ae-blah-blah-blah-blahd2a04788", } } layer.root.return_value = layer layer.gen_providers.return_value = { "terraform": { "backend": { "azurerm": { "resource_group_name": "dummy_resource_group", "storage_account_name": "dummy_storage_account", "container_name": "dummy_container_name", "key": "dummy_key", } } }, "provider": { "azurerm": { "location": "centralus", "tenant_id": "blahbc17-blah-blah-blah-blah291d395b", "subscription_id": "blah99ae-blah-blah-blah-blahd2a04788", } }, } layer.get_cluster_name.return_value = "mocked_cluster_name" return layer