diff --git a/postgrest/nginx.sls b/postgrest/nginx.sls
index 6212505106bee605b1fa2d5c546b53e4702811af..823c328af6f7e2fe9acee5f01476422461db5df3 100644
--- a/postgrest/nginx.sls
+++ b/postgrest/nginx.sls
@@ -1,4 +1,4 @@
-{% for instance_name, instance_conf in salt['pillar.get']("postgrest:instances").iteritems() %}
+{% for instance_name, instance_conf in salt['pillar.get']("postgrest:instances").items() %}
 {% if instance_conf.nginx is defined %}
 
 postgrest_{{ instance_name }}_nginx_conf:
diff --git a/postgrest/postgrest.sls b/postgrest/postgrest.sls
index 147fea6f5a7898421328fa094e131daa556d154d..20c5f619533c1d44c42ce5eda1241fd367cbca30 100644
--- a/postgrest/postgrest.sls
+++ b/postgrest/postgrest.sls
@@ -1,4 +1,4 @@
-{% for instance_name, instance_conf in salt['pillar.get']("postgrest:instances").iteritems() %}
+{% for instance_name, instance_conf in salt['pillar.get']("postgrest:instances").items() %}
 {% set tag = instance_conf.tag %}
 
 postgrest_{{ instance_name }}_fetch:
diff --git a/postgrest/tpl/postgrest.conf b/postgrest/tpl/postgrest.conf
index bd9848f48c100225342160e160d788c8356d6848..17b94987f78761f8eba2c31d91f0173515ef1682 100644
--- a/postgrest/tpl/postgrest.conf
+++ b/postgrest/tpl/postgrest.conf
@@ -1,3 +1,3 @@
 # This file is written by salt. Don't even think about it.
-{% for key, value in postgrest_conf.iteritems() %}{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %}
+{% for key, value in postgrest_conf.items() %}{{ key }} = {% if value is string %}"{{ value }}"{% else %}{{ value }}{% endif %}
 {% endfor %}