{% extends "common/base_resource.tf.j2" %}

{% block resources %}
{% for resource in resources %}
{{ resource_spacer() }}
resource "azurerm_redis_linked_server" "{{ resource.name }}" {
  target_redis_cache_name     = "{{ resource.properties.target_redis_cache_name }}"
  resource_group_name         = "{{ resource.properties.resource_group_name }}"
  linked_redis_cache_id       = "{{ resource.properties.linked_redis_cache_id }}"
  linked_redis_cache_location = "{{ resource.properties.linked_redis_cache_location }}"
  server_role                 = "{{ resource.properties.server_role | default('Secondary') }}"
}

{% endfor %}
{% endblock %}
