- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Terraform add device to Policy Package on FortiManager
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
- Labels:
-
FortiManager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jean
thanks for you replay, but that idea are not valide for my case.
Maurizio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
May I know what is the FMG version and the ADOM version (is it ADOM enable)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
