# Rancher terraform

**URL:** <https://forums.suse.com/t/rancher-terraform/20807>\
**Category:** SUSE Rancher Prime\
**Created:** [July 27, 2021, 3:21pm UTC](https://forums.suse.com/t/rancher-terraform/20807 "2021-07-27T15:21:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hobbs](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/hobbs/32/7822_2.png) [@Hobbs](https://forums.suse.com/u/Hobbs)\
**Post date:** [July 27, 2021, 3:21pm UTC](https://forums.suse.com/t/rancher-terraform/20807/1 "2021-07-27T15:21:26Z")

</div>

I’d like to know if anyone has managed to cofigure Rancher 2.x wuth terraform, but specifically the audit logs, Ive tried using following but while it doesn’t fail therefore syntax must be right, it doesn’t configure the logs. If anyone has a working example or git repo that would be appreciated.

services {  
kube\_api {  
audit\_log {  
enabled = true  
configuration {  
max\_age = 7  
max\_backup = 10  
max\_size = 200  
path = “/var/log/rancher/audit/rancher-api-audit.log”  
format = “json”  
policy = jsonencode({“rules”:[{“level”: “Metadata”}], “apiVersion”: “[audit.k8s.io/v1](http://audit.k8s.io/v1)”, “kind”: “Policy”})  
}  
}  
}  
}
