HI All
I want to associate a Fortimanager Package to installation Target by Terraform
I using Fortimanager provider on Terraform and I create a Package with fortimanager_packages_pkg, but i not able to associate this package with my Fortigate device.
Do you have any idea?
I search this command on Terraform Providers
https://registry.terraform.io/providers/fortinetdev/fortimanager/latest/docs
I'll try on terraform code, as describe below, with scopemember option, but give error
resource "fortimanager_packages_pkg" "ProvaToto_Pgk_Label" {
#crea il packages ProvaToto
name = "ProvaToto_Pgk"
type = "pkg"
scopemember = {
nme = "FortiGate-VM"
}
}
Thanks a lot
Maurizio
Hello Kakakaz75,
Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Thanks,
Hello again Kakakaz75,
I found the same error in a different forum:
https://stackoverflow.com/questions/62361263/terraform-plan-returns-the-error-unsupported-argument
Can you tell us if it helped, please?
Thanks,
Hello Jean
thanks for you replay, but that idea are not valide for my case.
Maurizio
Hi there,
May I know what is the FMG version and the ADOM version (is it ADOM enable)?
Hi there,
Your code have some issue, the correct sample as follows,
1) scopemember is a block, you should not have the equal =
2) The key vdom is mandatory for the scopemember block.
resource "fortimanager_packages_pkg" "ProvaToto_Pgk_Label" {
#crea il packages ProvaToto
name = "ProvaToto_Pgk"
type = "pkg"
scopemember {
name = "FortiGate-VM"
vdom = "root"
}
}
Sample:
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# fortimanager_packages_pkg.ProvaToto_Pgk_Label will be created
+ resource "fortimanager_packages_pkg" "ProvaToto_Pgk_Label" {
+ dynamic_sort_subtable = "false"
+ id = (known after apply)
+ name = "ProvaToto_Pgk"
+ objver = (known after apply)
+ oid = (known after apply)
+ scopetype = "inherit"
+ type = "pkg"
+ scopemember {
+ name = "FortiGate-VM"
+ vdom = "root"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
fortimanager_packages_pkg.ProvaToto_Pgk_Label: Creating...
fortimanager_packages_pkg.ProvaToto_Pgk_Label: Creation complete after 0s [id=ProvaToto_Pgk]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1741 | |
1109 | |
755 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.