Configuration FortiOs Token


I need your help please!

I am looking to use FortiOs provider et when I make configuration in .tf file I don’t know where I can take token.

token = "jn3t3Nw7qckQzt955Htkfj5hwQ6jdb"

Can I generated token from my FortiGate or not ?

I have done some work with this but I haven’t gotten it to completely work.
You create an API User (and a API user group-like a super admin) and fro there you generate the token. That being said I haven’t gotten it to fully work after that. The provisioner connects but none of my other commands seem to work. It has also been a month or two since I was working with Terraform and Fortigate. Here is the CLI for creating the user: But I reccomend doing it in the console.

Hi @khalilbo,

You might be able to drop an issue on Github and ask to clarify setup in documentation. Fortinet maintains the provider and it could be useful feedback for them!

Let me know.

1 Like