Closed DARB-CCM-S-20 closed 1 year ago
Hi @DARB-CCM-S-20
Thank you for raising this problem. May I know which FGT and FMG version are you using, I just add an Azure FGT VM on my FMG by using the following code. everything works as expected, you don't need a token to achieve this operation, and make sure you give right rpc-permit
to FMG.
resource "fortimanager_dvm_cmd_add_device" "trname" {
fmgadom = "root"
device {
ip = "1.2.3.4"
name = "Terraform-FGT-VM"
adm_usr = "admin"
adm_pass = "password"
sn = "FGTAZR_OACL..."
}
}
config system admin user
edit "admin"
set password ENC SH2OiytVkNzI8gq5AgPwaB/QNqk06qUbPXspNzk24QIXHacMIvZ8o3Aq54hAAE=
set profileid "Super_User"
set rpc-permit read-write
Thanks, Maxx
Hi @MaxxLiu22 Thanks for the response.
It seems to be that I hadn't set the rpc-permit
. Can I suggest a link to the guide is put on the homepage since it is essential to use the provider.
Also seems to be that the error message is a bit misleading.
Hi @DARB-CCM-S-20 ,
We are continuing improve our doc to be more user-friendly, Thank you for your suggestion, I will go ahead to close this case, if you still have questions feel free to reopen it,
Thanks, Maxx
Error updating
DvmCmdDevice
resource: err -11: No permissions for the resourceterraform init
initialises the configuration fine. Fortigate is online and can be discovered through the fortimanager GUI when trying to carry out the above action manually.Initially tried passing the fortigate admin credentials but on coming across, https://docs.fortinet.com/document/fortigate/7.2.4/administration-guide/763117/terraform-fortios-as-a-provider, a REST API admin was created and these credentials were passed to
adm_usr
andadm_pass
instead (since there did not seem to be an option to authenticate via api token). Same error persisted.Credentials passed to the fortigate are the admin credentials that can be used to login via the GUI. Do we need to create a similar REST API user in the Fortimanager instance as well?
Debug logs: