diff --git a/.gitignore b/.gitignore index 753e629..c2d6dc1 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ generated_*.tf # MACOS cache .DS_Store data/ -schema/ \ No newline at end of file +schema/ +log.txt \ No newline at end of file diff --git a/README.md b/README.md index 708de69..14c5adf 100644 --- a/README.md +++ b/README.md @@ -196,8 +196,11 @@ module "fmc" { | [fmc_device_cluster.cluster](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/device_cluster) | resource | | [fmc_device_physical_interfaces.physical_interface](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/device_physical_interfaces) | resource | | [fmc_device_subinterfaces.sub_interfaces](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/device_subinterfaces) | resource | +| [fmc_device_vni.vni](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/device_vni) | resource | +| [fmc_device_vtep.vtep](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/device_vtep) | resource | | [fmc_devices.device](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/devices) | resource | | [fmc_dynamic_objects.dynamicobject](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/dynamic_objects) | resource | +| [fmc_extended_acl.extended_acl](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/extended_acl) | resource | | [fmc_fqdn_objects.fqdn](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/fqdn_objects) | resource | | [fmc_ftd_autonat_rules.ftdautonatrule](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/ftd_autonat_rules) | resource | | [fmc_ftd_deploy.ftd](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/ftd_deploy) | resource | @@ -305,6 +308,7 @@ module "fmc" { | [fmc_host_objects.host](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/host_objects) | resource | | [fmc_icmpv4_objects.icmpv4](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/icmpv4_objects) | resource | | [fmc_ips_policies.ips_policy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/ips_policies) | resource | +| [fmc_network_analysis_policy.network_analysis_policy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/network_analysis_policy) | resource | | [fmc_network_group_objects.networkgroup_l1](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/network_group_objects) | resource | | [fmc_network_group_objects.networkgroup_l2](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/network_group_objects) | resource | | [fmc_network_group_objects.networkgroup_l3](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/network_group_objects) | resource | @@ -320,24 +324,33 @@ module "fmc" { | [fmc_security_zone.securityzone](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/security_zone) | resource | | [fmc_sgt_objects.sgt](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/sgt_objects) | resource | | [fmc_smart_license.license](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/smart_license) | resource | +| [fmc_standard_acl.standard_acl](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/standard_acl) | resource | | [fmc_staticIPv4_route.ipv4staticroute](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/staticIPv4_route) | resource | +| [fmc_time_range_object.time_range](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/time_range_object) | resource | | [fmc_url_object_group.urlgroup](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/url_object_group) | resource | | [fmc_url_objects.url](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/resources/url_objects) | resource | | [local_sensitive_file.defaults](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource | | [fmc_access_policies.accesspolicy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/access_policies) | data source | | [fmc_device_physical_interfaces.physical_interface](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/device_physical_interfaces) | data source | | [fmc_device_subinterfaces.sub_interfaces](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/device_subinterfaces) | data source | +| [fmc_device_vni.vni](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/device_vni) | data source | | [fmc_devices.device](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/devices) | data source | | [fmc_dynamic_objects.dynamicobject](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/dynamic_objects) | data source | +| [fmc_extended_acl.extended_acl](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/extended_acl) | data source | +| [fmc_file_policies.file_policy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/file_policies) | data source | | [fmc_ftd_nat_policies.ftdnatpolicy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/ftd_nat_policies) | data source | | [fmc_host_objects.host](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/host_objects) | data source | | [fmc_ips_policies.ips_policy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/ips_policies) | data source | +| [fmc_network_analysis_policy.network_analysis_policy](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/network_analysis_policy) | data source | | [fmc_network_group_objects.networkgroup](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/network_group_objects) | data source | | [fmc_network_objects.network](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/network_objects) | data source | | [fmc_port_group_objects.portgroup](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/port_group_objects) | data source | | [fmc_port_objects.port](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/port_objects) | data source | | [fmc_security_zones.securityzone](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/security_zones) | data source | | [fmc_sgt_objects.sgt](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/sgt_objects) | data source | +| [fmc_smart_license.smart_license](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/smart_license) | data source | +| [fmc_standard_acl.standard_acl](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/standard_acl) | data source | +| [fmc_syslog_alerts.syslog_alert](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/syslog_alerts) | data source | | [fmc_url_objects.url](https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs/data-sources/url_objects) | data source | | [utils_yaml_merge.defaults](https://registry.terraform.io/providers/netascode/utils/latest/docs/data-sources/yaml_merge) | data source | | [utils_yaml_merge.model](https://registry.terraform.io/providers/netascode/utils/latest/docs/data-sources/yaml_merge) | data source | diff --git a/fmc_access_rules.tf b/fmc_access_rules.tf index 38b4132..f2bb27e 100755 --- a/fmc_access_rules.tf +++ b/fmc_access_rules.tf @@ -100,7 +100,7 @@ resource "fmc_access_rules" "access_rule_0" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -264,7 +264,7 @@ resource "fmc_access_rules" "access_rule_1" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -430,7 +430,7 @@ resource "fmc_access_rules" "access_rule_2" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -598,7 +598,7 @@ resource "fmc_access_rules" "access_rule_3" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -768,7 +768,7 @@ resource "fmc_access_rules" "access_rule_4" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -940,7 +940,7 @@ resource "fmc_access_rules" "access_rule_5" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -1114,7 +1114,7 @@ resource "fmc_access_rules" "access_rule_6" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -1290,7 +1290,7 @@ resource "fmc_access_rules" "access_rule_7" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -1468,7 +1468,7 @@ resource "fmc_access_rules" "access_rule_8" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -1648,7 +1648,7 @@ resource "fmc_access_rules" "access_rule_9" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -1830,7 +1830,7 @@ resource "fmc_access_rules" "access_rule_10" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2014,7 +2014,7 @@ resource "fmc_access_rules" "access_rule_11" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2200,7 +2200,7 @@ resource "fmc_access_rules" "access_rule_12" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2388,7 +2388,7 @@ resource "fmc_access_rules" "access_rule_13" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2578,7 +2578,7 @@ resource "fmc_access_rules" "access_rule_14" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2770,7 +2770,7 @@ resource "fmc_access_rules" "access_rule_15" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -2964,7 +2964,7 @@ resource "fmc_access_rules" "access_rule_16" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -3160,7 +3160,7 @@ resource "fmc_access_rules" "access_rule_17" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -3358,7 +3358,7 @@ resource "fmc_access_rules" "access_rule_18" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -3558,7 +3558,7 @@ resource "fmc_access_rules" "access_rule_19" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -3760,7 +3760,7 @@ resource "fmc_access_rules" "access_rule_20" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -3964,7 +3964,7 @@ resource "fmc_access_rules" "access_rule_21" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -4170,7 +4170,7 @@ resource "fmc_access_rules" "access_rule_22" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -4378,7 +4378,7 @@ resource "fmc_access_rules" "access_rule_23" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -4588,7 +4588,7 @@ resource "fmc_access_rules" "access_rule_24" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -4800,7 +4800,7 @@ resource "fmc_access_rules" "access_rule_25" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -5014,7 +5014,7 @@ resource "fmc_access_rules" "access_rule_26" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -5230,7 +5230,7 @@ resource "fmc_access_rules" "access_rule_27" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -5448,7 +5448,7 @@ resource "fmc_access_rules" "access_rule_28" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -5668,7 +5668,7 @@ resource "fmc_access_rules" "access_rule_29" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -5890,7 +5890,7 @@ resource "fmc_access_rules" "access_rule_30" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -6114,7 +6114,7 @@ resource "fmc_access_rules" "access_rule_31" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -6340,7 +6340,7 @@ resource "fmc_access_rules" "access_rule_32" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -6568,7 +6568,7 @@ resource "fmc_access_rules" "access_rule_33" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -6798,7 +6798,7 @@ resource "fmc_access_rules" "access_rule_34" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -7030,7 +7030,7 @@ resource "fmc_access_rules" "access_rule_35" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -7264,7 +7264,7 @@ resource "fmc_access_rules" "access_rule_36" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -7500,7 +7500,7 @@ resource "fmc_access_rules" "access_rule_37" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -7738,7 +7738,7 @@ resource "fmc_access_rules" "access_rule_38" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -7978,7 +7978,7 @@ resource "fmc_access_rules" "access_rule_39" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -8220,7 +8220,7 @@ resource "fmc_access_rules" "access_rule_40" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -8464,7 +8464,7 @@ resource "fmc_access_rules" "access_rule_41" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -8710,7 +8710,7 @@ resource "fmc_access_rules" "access_rule_42" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -8958,7 +8958,7 @@ resource "fmc_access_rules" "access_rule_43" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -9208,7 +9208,7 @@ resource "fmc_access_rules" "access_rule_44" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -9460,7 +9460,7 @@ resource "fmc_access_rules" "access_rule_45" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -9714,7 +9714,7 @@ resource "fmc_access_rules" "access_rule_46" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -9970,7 +9970,7 @@ resource "fmc_access_rules" "access_rule_47" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -10228,7 +10228,7 @@ resource "fmc_access_rules" "access_rule_48" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -10488,7 +10488,7 @@ resource "fmc_access_rules" "access_rule_49" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -10750,7 +10750,7 @@ resource "fmc_access_rules" "access_rule_50" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -11014,7 +11014,7 @@ resource "fmc_access_rules" "access_rule_51" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -11280,7 +11280,7 @@ resource "fmc_access_rules" "access_rule_52" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -11548,7 +11548,7 @@ resource "fmc_access_rules" "access_rule_53" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -11818,7 +11818,7 @@ resource "fmc_access_rules" "access_rule_54" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -12090,7 +12090,7 @@ resource "fmc_access_rules" "access_rule_55" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -12364,7 +12364,7 @@ resource "fmc_access_rules" "access_rule_56" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -12640,7 +12640,7 @@ resource "fmc_access_rules" "access_rule_57" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -12918,7 +12918,7 @@ resource "fmc_access_rules" "access_rule_58" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -13198,7 +13198,7 @@ resource "fmc_access_rules" "access_rule_59" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -13480,7 +13480,7 @@ resource "fmc_access_rules" "access_rule_60" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -13764,7 +13764,7 @@ resource "fmc_access_rules" "access_rule_61" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -14050,7 +14050,7 @@ resource "fmc_access_rules" "access_rule_62" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -14338,7 +14338,7 @@ resource "fmc_access_rules" "access_rule_63" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -14628,7 +14628,7 @@ resource "fmc_access_rules" "access_rule_64" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -14920,7 +14920,7 @@ resource "fmc_access_rules" "access_rule_65" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -15214,7 +15214,7 @@ resource "fmc_access_rules" "access_rule_66" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -15510,7 +15510,7 @@ resource "fmc_access_rules" "access_rule_67" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -15808,7 +15808,7 @@ resource "fmc_access_rules" "access_rule_68" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -16108,7 +16108,7 @@ resource "fmc_access_rules" "access_rule_69" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -16410,7 +16410,7 @@ resource "fmc_access_rules" "access_rule_70" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -16714,7 +16714,7 @@ resource "fmc_access_rules" "access_rule_71" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -17020,7 +17020,7 @@ resource "fmc_access_rules" "access_rule_72" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -17328,7 +17328,7 @@ resource "fmc_access_rules" "access_rule_73" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -17638,7 +17638,7 @@ resource "fmc_access_rules" "access_rule_74" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -17950,7 +17950,7 @@ resource "fmc_access_rules" "access_rule_75" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -18264,7 +18264,7 @@ resource "fmc_access_rules" "access_rule_76" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -18580,7 +18580,7 @@ resource "fmc_access_rules" "access_rule_77" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -18898,7 +18898,7 @@ resource "fmc_access_rules" "access_rule_78" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -19218,7 +19218,7 @@ resource "fmc_access_rules" "access_rule_79" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -19540,7 +19540,7 @@ resource "fmc_access_rules" "access_rule_80" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -19864,7 +19864,7 @@ resource "fmc_access_rules" "access_rule_81" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -20190,7 +20190,7 @@ resource "fmc_access_rules" "access_rule_82" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -20518,7 +20518,7 @@ resource "fmc_access_rules" "access_rule_83" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -20848,7 +20848,7 @@ resource "fmc_access_rules" "access_rule_84" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -21180,7 +21180,7 @@ resource "fmc_access_rules" "access_rule_85" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -21514,7 +21514,7 @@ resource "fmc_access_rules" "access_rule_86" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -21850,7 +21850,7 @@ resource "fmc_access_rules" "access_rule_87" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -22188,7 +22188,7 @@ resource "fmc_access_rules" "access_rule_88" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -22528,7 +22528,7 @@ resource "fmc_access_rules" "access_rule_89" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -22870,7 +22870,7 @@ resource "fmc_access_rules" "access_rule_90" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -23214,7 +23214,7 @@ resource "fmc_access_rules" "access_rule_91" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -23560,7 +23560,7 @@ resource "fmc_access_rules" "access_rule_92" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -23908,7 +23908,7 @@ resource "fmc_access_rules" "access_rule_93" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -24258,7 +24258,7 @@ resource "fmc_access_rules" "access_rule_94" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -24610,7 +24610,7 @@ resource "fmc_access_rules" "access_rule_95" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -24964,7 +24964,7 @@ resource "fmc_access_rules" "access_rule_96" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -25320,7 +25320,7 @@ resource "fmc_access_rules" "access_rule_97" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -25678,7 +25678,7 @@ resource "fmc_access_rules" "access_rule_98" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } @@ -26038,7 +26038,7 @@ resource "fmc_access_rules" "access_rule_99" { } } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj } diff --git a/fmc_devices.tf b/fmc_devices.tf index c89cd57..2179491 100644 --- a/fmc_devices.tf +++ b/fmc_devices.tf @@ -116,6 +116,7 @@ resource "fmc_device_physical_interfaces" "physical_interface" { if_name = try(each.value.data.name, null) security_zone_id = try(local.map_securityzones[each.value.data.security_zone].id, null) enabled = try(each.value.data.enabled, local.defaults.fmc.domains.devices.physical_interfaces.enabled) + mtu = try(each.value.data.mtu, null) mode = try(each.value.data.mode, local.defaults.fmc.domains.devices.physical_interfaces.mode) ipv4_static_address = try(each.value.data.ipv4_static_address, null) ipv4_static_netmask = try(each.value.data.ipv4_static_netmask, null) @@ -168,8 +169,8 @@ resource "fmc_device_subinterfaces" "sub_interfaces" { # Optional ifname = try(each.value.data.name, null) vlan_id = try(each.value.data.vlan, null) - enable_ipv6 = try(each.value.data.enable_ipv6, null) - enabled = try(each.value.data.enable_ipv6, null) + enable_ipv6 = try(each.value.data.ipv6, null) + enabled = try(each.value.data.enabled, null) ipv4_dhcp_enabled = try(each.value.data.ipv4_dhcp, null) ipv4_dhcp_route_metric = try(each.value.data.ipv4_dhcp_route_metric, null) ipv4_static_address = try(each.value.data.ipv4_static_address, null) @@ -184,6 +185,94 @@ resource "fmc_device_subinterfaces" "sub_interfaces" { security_zone_id = try(local.map_securityzones[each.value.data.security_zone].id, null) } +### +# VTEP +### +locals { + + res_vtep_interfaces = flatten([ + for domain in local.domains : [ + for device in try(domain.devices, []) : [ + for physicalinterface in try(device.physical_interfaces, []) : [ + for vtep in try(physicalinterface.vteps, []) : { + key = "${device.name}/${physicalinterface.interface}/${vtep.encapsulation_port}" + device_id = local.map_devices[device.name].id + physicalinterface_id = data.fmc_device_physical_interfaces.physical_interface["${device.name}/${physicalinterface.interface}"].id + data = vtep + } + ] + ] + ] + ]) +} + +resource "fmc_device_vtep" "vtep" { + for_each = { for vtep in local.res_vtep_interfaces : vtep.key => vtep } + device_id = each.value.device_id + source_interface_id = each.value.physicalinterface_id + nve_vtep_id = 1 #It is fixed value + + nve_enabled = each.value.data.nve_enabled + nve_destination_port = each.value.data.encapsulation_port + nve_encapsulation_type = each.value.data.encapsulation_type + + depends_on = [ + fmc_device_physical_interfaces.physical_interface, + data.fmc_device_physical_interfaces.physical_interface, + fmc_device_subinterfaces.sub_interfaces, + data.fmc_device_subinterfaces.sub_interfaces + ] +} + +### +# VNI +### +locals { + res_vni_interfaces = flatten([ + for domain in local.domains : [ + for device in try(domain.devices, []) : [ + for vni in try(device.vnis, []) : { + key = "${device.name}/${vni.name}/${vni.vni_id}" + device_id = local.map_devices[device.name].id + data = vni + } if !contains(local.data_vni_interfaces_list, "${device.name}/${vni.name}/${vni.vni_id}") + ] + ] + ]) +} + + +resource "fmc_device_vni" "vni" { + for_each = { for vni in local.res_vni_interfaces : vni.key => vni } + device_id = each.value.device_id + security_zone_id = try(local.map_securityzones[each.value.data.security_zone].id, null) + if_name = each.value.data.name + enabled = try(each.value.data.enabled, null) + description = try(each.value.data.description, local.defaults.fmc.domains.devices.vnis.description, "VNI Interface") + priority = try(each.value.data.priority, null) + vnid = each.value.data.vni_id + segment_id = try(each.value.data.vni_segment_id, null) + multicast_groupaddress = try(each.value.data.multicast_group_address, null) + + enable_proxy = try(each.value.data.vne_to_vtep_mapping, null) + ipv4 { + static { + address = try(each.value.data.ipv4_static_address, null) + netmask = try(each.value.data.ipv4_static_netmask, null) + } + dhcp { + enable_default_route_dhcp = try(each.value.data.ipv4_dhcp, false) ? each.value.data.ipv4_dhcp_default_route : null + dhcp_route_metric = try(each.value.data.ipv4_dhcp, false) ? each.value.data.ipv4_dhcp_route_metric : null + } + } + depends_on = [ + fmc_device_physical_interfaces.physical_interface, + data.fmc_device_physical_interfaces.physical_interface, + fmc_device_subinterfaces.sub_interfaces, + data.fmc_device_subinterfaces.sub_interfaces + ] +} + ### # IPV4 STATIC ROUTE ### @@ -250,7 +339,7 @@ locals { "name" = nat_policy.name "objects" = compact(flatten([ for domain in local.domains : [ - for device in try(domain.devices, []) : contains(keys(device), "nat_policy") && device.nat_policy == nat_policy.name ? device.name : null + for device in try(domain.devices, []) : contains(keys(device), "nat_policy") && try(device.nat_policy, null) == nat_policy.name ? device.name : null ] ])) } diff --git a/fmc_existing.tf b/fmc_existing.tf index 13def5c..0ee64d1 100644 --- a/fmc_existing.tf +++ b/fmc_existing.tf @@ -3,24 +3,29 @@ ### locals { - data_devices = [for obj in try(local.data_existing.fmc.domains[0].devices, []) : obj.name] - data_clusters = [for obj in try(local.data_existing.fmc.domains[0].clusters, []) : obj.name] - data_accesspolicies = [for obj in try(local.data_existing.fmc.domains[0].access_policies, []) : obj.name] - data_ftdnatpolicies = [for obj in try(local.data_existing.fmc.domains[0].ftd_nat_policies, []) : obj.name] - data_ipspolicies = [for obj in try(local.data_existing.fmc.domains[0].ips_policies, []) : obj.name] - #data_filepolicies = [for obj in try(local.data_existing.fmc.domains[0].file_policies, []) : obj.name] - data_hosts = [for obj in try(local.data_existing.fmc.domains[0].objects.hosts, []) : obj.name] - data_networks = [for obj in try(local.data_existing.fmc.domains[0].objects.networks, []) : obj.name] - #data_ranges = [] + data_smart_license = contains(keys(local.data_existing.fmc), "smart_license") ? [local.data_existing.fmc.smart_license] : [] + data_devices = [for obj in try(local.data_existing.fmc.domains[0].devices, []) : obj.name] + data_clusters = [for obj in try(local.data_existing.fmc.domains[0].clusters, []) : obj.name] + data_accesspolicies = [for obj in try(local.data_existing.fmc.domains[0].access_policies, []) : obj.name] + data_ftdnatpolicies = [for obj in try(local.data_existing.fmc.domains[0].ftd_nat_policies, []) : obj.name] + data_ipspolicies = [for obj in try(local.data_existing.fmc.domains[0].ips_policies, []) : obj.name] + data_filepolicies = [for obj in try(local.data_existing.fmc.domains[0].file_policies, []) : obj.name] + data_network_analysis_policies = [for obj in try(local.data_existing.fmc.domains[0].network_analysis_policies, []) : obj.name] + data_hosts = [for obj in try(local.data_existing.fmc.domains[0].objects.hosts, []) : obj.name] + data_networks = [for obj in try(local.data_existing.fmc.domains[0].objects.networks, []) : obj.name] + #data_ranges = [] data_networkgroups = [for obj in try(local.data_existing.fmc.domains[0].objects.network_groups, []) : obj.name] data_ports = [for obj in try(local.data_existing.fmc.domains[0].objects.ports, []) : obj.name] data_portgroups = [for obj in try(local.data_existing.fmc.domains[0].objects.port_groups, []) : obj.name] - #data_icmpv_4s = [] - data_securityzones = [for obj in try(local.data_existing.fmc.domains[0].objects.security_zones, []) : obj.name] - data_urls = [for obj in try(local.data_existing.fmc.domains[0].objects.urls, []) : obj.name] - #data_syslogalerts = [] - data_sgts = [for obj in try(local.data_existing.fmc.domains[0].objects.sgts, []) : obj.name] - data_dynamicobjects = [for obj in try(local.data_existing.fmc.domains[0].objects.dynamic_objects, []) : obj.name] + #data_icmpv_4s = [] + data_securityzones = [for obj in try(local.data_existing.fmc.domains[0].objects.security_zones, []) : obj.name] + data_urls = [for obj in try(local.data_existing.fmc.domains[0].objects.urls, []) : obj.name] + data_syslog_alerts = [for obj in try(local.data_existing.fmc.domains[0].syslog_alerts, []) : obj.name] + data_sgts = [for obj in try(local.data_existing.fmc.domains[0].objects.sgts, []) : obj.name] + data_dynamicobjects = [for obj in try(local.data_existing.fmc.domains[0].objects.dynamic_objects, []) : obj.name] + data_time_ranges = [for obj in try(local.data_existing.fmc.domains[0].objects.time_ranges, []) : obj.name] + data_standard_access_lists = [for obj in try(local.data_existing.fmc.domains[0].objects.standard_access_lists, []) : obj.name] + data_extended_access_lists = [for obj in try(local.data_existing.fmc.domains[0].objects.extended_access_lists, []) : obj.name] data_sub_interfaces = flatten([ for device in try(local.data_existing.fmc.domains[0].devices, []) : [ @@ -43,6 +48,28 @@ locals { ] ]) + data_vni_interfaces = flatten([ + for device in try(local.data_existing.fmc.domains[0].devices, []) : [ + for vni in try(device.vnis, []) : { + key = "${device.name}/${vni.name}/${vni.vni_id}" + device_id = local.map_devices[device.name].id + vni_name = vni + } + ] + ]) + + data_vni_interfaces_list = flatten([ + for device in try(local.data_existing.fmc.domains[0].devices, []) : [ + for vni in try(device.vnis, []) : "${device.name}/${vni.name}/${vni.vni_id}" + ] + ]) + +} + +data "fmc_smart_license" "smart_license" { + for_each = toset(local.data_smart_license) + + virtual_account = try(each.key, null) } data "fmc_access_policies" "accesspolicy" { @@ -101,6 +128,18 @@ data "fmc_port_group_objects" "portgroup" { # name = each.key #} +data "fmc_standard_acl" "standard_acl" { + for_each = toset(local.data_standard_access_lists) + + name = each.key +} + +data "fmc_extended_acl" "extended_acl" { + for_each = toset(local.data_extended_access_lists) + + name = each.key +} + data "fmc_security_zones" "securityzone" { for_each = toset(local.data_securityzones) @@ -119,11 +158,17 @@ data "fmc_ips_policies" "ips_policy" { name = each.key } -# data "fmc_file_policies" "file_policy" { -# for_each = toset(local.data_filepolicies) +data "fmc_file_policies" "file_policy" { + for_each = toset(local.data_filepolicies) -# name = each.key -# } + name = each.key +} + +data "fmc_network_analysis_policy" "network_analysis_policy" { + for_each = toset(local.data_network_analysis_policies) + + name = each.key +} data "fmc_devices" "device" { for_each = toset(local.data_devices) @@ -161,6 +206,13 @@ data "fmc_device_subinterfaces" "sub_interfaces" { ] } +data "fmc_device_vni" "vni" { + for_each = { for object in local.data_vni_interfaces : object.key => object } + + name = each.value.vni_name + device_id = each.value.device_id +} + data "fmc_sgt_objects" "sgt" { for_each = toset(local.data_sgts) @@ -173,4 +225,10 @@ data "fmc_url_objects" "url" { name = each.key } +data "fmc_syslog_alerts" "syslog_alert" { + for_each = toset(local.data_syslog_alerts) + + name = each.key +} + # diff --git a/fmc_objects.tf b/fmc_objects.tf index 29e8fcd..8ba035a 100644 --- a/fmc_objects.tf +++ b/fmc_objects.tf @@ -482,9 +482,7 @@ resource "fmc_port_group_objects" "portgroup" { name = each.value.name dynamic "objects" { - for_each = { for obj in try(each.value.objects, {}) : - obj => obj - } + for_each = { for obj in try(each.value.objects, {}) : obj => obj } content { id = local.map_ports[objects.value].id type = local.map_ports[objects.value].type @@ -535,8 +533,7 @@ resource "fmc_url_object_group" "urlgroup" { name = each.value.name dynamic "objects" { - for_each = { for obj in try(each.value.objects, {}) : - obj => obj + for_each = { for obj in try(each.value.objects, {}) : obj => obj } content { id = local.map_urls[objects.value].id @@ -556,6 +553,42 @@ resource "fmc_url_object_group" "urlgroup" { # Optional description = try(each.value.description, local.defaults.fmc.domains.objects.url_groups.description, null) } +### +# TIME RANGE +### +locals { + res_time_ranges = flatten([ + for domains in local.domains : [ + for object in try(domains.objects.time_ranges, []) : object if !contains(local.data_time_ranges, object.name) + ] + ]) +} + +resource "fmc_time_range_object" "time_range" { + for_each = { for time_range in local.res_time_ranges : time_range.name => time_range } + #Mandatory + name = each.value.name + + effective_start_date = each.value.effective_start_date + effective_end_date = each.value.effective_end_date + + #Optional + description = try(each.value.description, null) + + dynamic "recurrence" { + for_each = { for obj in try(each.value.recurrences, {}) : obj.recurrence_type => obj } + content { + recurrence_type = try(recurrence.value.recurrence_type, null) + daily_end_time = try(recurrence.value.daily_end_time, null) + daily_start_time = try(recurrence.value.daily_start_time, null) + days = try(recurrence.value.days, []) + end_day = try(recurrence.value.end_day, null) + end_time = try(recurrence.value.end_time, null) + start_day = try(recurrence.value.start_day, null) + start_time = try(recurrence.value.start_time, null) + } + } +} ### # SECURITY ZONE @@ -575,3 +608,92 @@ resource "fmc_security_zone" "securityzone" { name = each.value.name interface_mode = try(each.value.interface_type, local.defaults.fmc.domains.objects.security_zones.interface_type) } + +### +# STANDARD ACL +### +locals { + res_standard_acl = flatten([ + for domains in local.domains : [ + for object in try(domains.objects.standard_access_lists, []) : { + name = object.name + entries = object.entries + } if !contains(local.data_standard_access_lists, object.name) + ] + ]) +} + + +resource "fmc_standard_acl" "standard_acl" { + for_each = { for standard_acl in local.res_standard_acl : standard_acl.name => standard_acl } + + #Mandatory + name = each.value.name + action = each.value.entries[0].action + object_id = try(local.map_networkobjects[each.value.entries[0].objects[0]].id, null) + literal_value = try(each.value.entries[0].literals[0], null) +} + +### +# EXTENDED ACL +### +locals { + res_extended_acl = flatten([ + for domains in local.domains : [ + for object in try(domains.objects.extended_access_lists, []) : { + name = object.name + logging = object.logging + log_interval = object.log_interval + log_level = object.log_level + entries = [for entry in try(object.entries, []) : { + destination_network_literals = [for dst_net_lit in try(entry.destination_network_literals, []) : { + destination_network_literal_type = can(regex("/", dst_net_lit)) ? "Network" : "Host" + destination_network_literal_value = dst_net_lit + }] + source_network_literals = [for src_net_lit in try(entry.source_network_literals, []) : { + source_network_literal_type = can(regex("/", src_net_lit)) ? "Network" : "Host" + source_network_literal_value = src_net_lit + }] + destination_network_objects = try(entry.destination_network_objects, null) + destination_port_literals = try(entry.destination_port_literals, null) # bug in provider + destination_port_objects = try(entry.destination_port_objects, null) + source_network_objects = try(entry.source_network_objects, null) + source_port_literals = try(entry.source_port_literals, null) + source_port_objects = try(entry.source_port_objects, null) + action = try(entry.action, null) + } + ] + } if !contains(local.data_extended_access_lists, object.name) + ] + ]) +} + +resource "fmc_extended_acl" "extended_acl" { + for_each = { for extended_acl in local.res_extended_acl : extended_acl.name => extended_acl } + + #Mandatory + name = each.value.name + + logging = each.value.logging + #Only if logging != "DISABLED" + log_level = try(each.value.log_level, local.defaults.fmc.domains.objects.extended_access_lists.log_level, null) + log_interval = try(each.value.log_interval, local.defaults.fmc.domains.objects.extended_access_lists.log_interval, null) + + #To be fixed in the new provider + #Optional + #for literals there is a bug in provider + action = each.value.entries[0].action + #destination_network_literal_type = try(each.value.entries[0].destination_network_literals[0].destination_network_literal_type, null) + #destination_network_literal_value = try(each.value.entries[0].destination_network_literals[0].destination_network_literal_value, null) + destination_network_object_id = try(local.map_networkobjects[each.value.entries[0].destination_network_objects[0]].id, null) + #destination_port_literal_port = try(each.value.entries[0].destination_port_literals[0].port, null) + #destination_port_literal_protocol = try(each.value.entries[0].destination_port_literals[0].protocol, null) + destination_port_object_id = try(local.map_ports[each.value.entries[0].destination_port_objects[0]].id, null) + #source_network_literal_type = try(each.value.entries[0].source_network_literals[0].source_network_literal_type, null) + #source_network_literal_value = try(each.value.entries[0].source_network_literals[0].source_network_literal_value, null) + source_network_object_id = try(local.map_networkobjects[each.value.entries[0].source_network_objects[0]].id, null) + #source_port_literal_port = try(each.value.entries[0].source_port_literals[0].port, null) + #source_port_literal_protocol = try(each.value.entries[0].source_port_literals[0].protocol, null) + source_port_object_id = try(local.map_ports[each.value.entries[0].source_port_objects[0]].id, null) + +} \ No newline at end of file diff --git a/fmc_policies.tf b/fmc_policies.tf index 4f6df7f..c5e0945 100644 --- a/fmc_policies.tf +++ b/fmc_policies.tf @@ -217,3 +217,29 @@ resource "fmc_ips_policies" "ips_policy" { data.fmc_ips_policies.ips_policy ] } + +### +# Network Analysis Policy +### +locals { + res_network_analysis_policies = flatten([ + for domains in local.domains : [ + for object in try(domains.network_analysis_policies, []) : object + ] + ]) +} + +resource "fmc_network_analysis_policy" "network_analysis_policy" { + for_each = { for net_analysis_policy in local.res_network_analysis_policies : net_analysis_policy.name => net_analysis_policy } + + # Mandatory + name = each.value.name + base_policy { + name = each.value.base_policy + } + + # Optional + description = try(each.value.description, local.defaults.fmc.domains.network_analysis_policies.description, null) + snort_engine = try(each.value.snort_engine, local.defaults.fmc.domains.network_analysis_policies.snort_engine, null) + +} \ No newline at end of file diff --git a/main.tf b/main.tf index 1443018..d32159c 100644 --- a/main.tf +++ b/main.tf @@ -153,7 +153,7 @@ locals { for physical_interface in try(device.physical_interfaces, []) : [ for subinterface in try(physical_interface.subinterfaces, []) : { "name" : try(subinterface.name, null) - "object" : fmc_device_subinterfaces.sub_interfaces["${device.name}/${physical_interface.interface}/${subinterface.id}"].if_name + "object" : fmc_device_subinterfaces.sub_interfaces["${device.name}/${physical_interface.interface}/${subinterface.id}"].name } ] ]) : int_name.name => int_name.object diff --git a/templates/fmc_access_rules.tftpl b/templates/fmc_access_rules.tftpl index 8a60761..a7dfdda 100644 --- a/templates/fmc_access_rules.tftpl +++ b/templates/fmc_access_rules.tftpl @@ -131,7 +131,7 @@ resource "fmc_access_rules" "access_rule_${index}" { } dynamic "source_dynamic_objects" { - for_each = try(length(each.value.data.source_netwsource_dynamic_objectsorks), 0) != 0 ? ["1"] : [] + for_each = try(length(each.value.data.source_dynamic_objects), 0) != 0 ? ["1"] : [] content { dynamic "source_dynamic_object" { for_each = { for obj in try(each.value.data.source_dynamic_objects, []) : obj => obj }