Skip to content

Commit

Permalink
Minor updates to features names (#62)
Browse files Browse the repository at this point in the history
* rename "sdwan_profile_parcels.tf" to "sdwan_features.tf"

* provide default value for feature name if not explicitly set

* simplify default feature name from "profile_name-feature_name" to "feature_name"

* update changelog
  • Loading branch information
tzarski0 authored Nov 4, 2024
1 parent a8f33d7 commit 3b55348
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 0.1.1 (unreleased)

- rename "sdwan_profile_parcels.tf" to "sdwan_features.tf"
- provide default value for name if not explicitly set for sdwan_system_basic_feature, sdwan_system_omp_feature, sdwan_system_performance_monitoring_feature, sdwan_system_security_feature, sdwan_system_snmp_feature and sdwan_transport_wan_vpn_feature
- simplify default feature name from "profile_name-feature_name" to "feature_name"
- add support for sdwan_policy_object_feature_profile resource
- add support for sdwan_policy_object_class_map resource
- add support for sdwan_policy_object_data_ipv4_prefix_list resource
- add support for sdwan_policy_object_data_ipv6_prefix_list resource
- add support for sdwan_policy_object_expanded_community_list resource
- add support for sdwan_policy_object_extended_community_list resource
- add support for sdwan_policy_object_ipv4_prefix_list resource
- add support for sdwan_policy_object_ipv6_prefix_list resource
- add support for sdwan_policy_object_mirror resource
- add support for sdwan_policy_object_policer resource
- add support for sdwan_policy_object_tloc_list resource

## 0.1.0

- Initial release
32 changes: 16 additions & 16 deletions sdwan_profile_parcels.tf → sdwan_features.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "sdwan_cli_config_feature" "cli_config_feature" {
"${cli.name}-config" => cli
if try(cli.config, null) != null
}
name = try(each.value.config.name, "${each.value.name}-config")
name = try(each.value.config.name, "config")
description = try(each.value.config.description, "")
feature_profile_id = sdwan_cli_feature_profile.cli_feature_profile[each.value.name].id
cli_configuration = each.value.config.cli_configuration
Expand All @@ -16,7 +16,7 @@ resource "sdwan_other_thousandeyes_feature" "other_thousandeyes_feature" {
"${other.name}-thousandeyes" => other
if try(other.thousandeyes, null) != null
}
name = try(each.value.thousandeyes.name, "${each.value.name}-thousandeyes")
name = try(each.value.thousandeyes.name, "thousandeyes")
description = try(each.value.thousandeyes.description, "")
feature_profile_id = sdwan_other_feature_profile.other_feature_profile[each.value.name].id
virtual_application = [{
Expand Down Expand Up @@ -159,7 +159,7 @@ resource "sdwan_system_aaa_feature" "system_aaa_feature" {
"${sys.name}-aaa" => sys
if try(sys.aaa, null) != null
}
name = try(each.value.aaa.name, "${each.value.name}-aaa")
name = try(each.value.aaa.name, "aaa")
description = try(each.value.aaa.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
accounting_group = try(each.value.aaa.dot1x_accounting, null)
Expand Down Expand Up @@ -243,7 +243,7 @@ resource "sdwan_system_banner_feature" "system_banner_feature" {
"${sys.name}-banner" => sys
if try(sys.banner, null) != null
}
name = try(each.value.banner.name, "${each.value.name}-banner")
name = try(each.value.banner.name, "banner")
description = try(each.value.banner.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
login = try(each.value.banner.login, null)
Expand All @@ -258,7 +258,7 @@ resource "sdwan_system_basic_feature" "system_basic_feature" {
"${sys.name}-basic" => sys
if lookup(sys, "basic", null) != null
}
name = each.value.basic.name
name = try(each.value.basic.name, "basic")
description = try(each.value.basic.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
admin_tech_on_failure = try(each.value.basic.admin_tech_on_failure, null)
Expand Down Expand Up @@ -337,7 +337,7 @@ resource "sdwan_system_bfd_feature" "system_bfd_feature" {
"${sys.name}-bfd" => sys
if try(sys.bfd, null) != null
}
name = try(each.value.bfd.name, "${each.value.name}-bfd")
name = try(each.value.bfd.name, "bfd")
description = try(each.value.bfd.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
colors = try(length(each.value.bfd.colors) == 0, true) ? null : [for c in each.value.bfd.colors : {
Expand Down Expand Up @@ -366,7 +366,7 @@ resource "sdwan_system_flexible_port_speed_feature" "system_flexible_port_speed_
"${sys.name}-flexible_port_speed" => sys
if try(sys.flexible_port_speed, null) != null
}
name = try(each.value.flexible_port_speed.name, "${each.value.name}-flexible_port_speed")
name = try(each.value.flexible_port_speed.name, "flexible_port_speed")
description = try(each.value.flexible_port_speed.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
port_type = try(each.value.flexible_port_speed.port_type, null)
Expand All @@ -379,7 +379,7 @@ resource "sdwan_system_global_feature" "system_global_feature" {
"${sys.name}-global" => sys
if try(sys.global, null) != null
}
name = try(each.value.global.name, "${each.value.name}-global")
name = try(each.value.global.name, "global")
description = try(each.value.global.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
arp_proxy = try(each.value.global.arp_proxy, null)
Expand Down Expand Up @@ -436,7 +436,7 @@ resource "sdwan_system_logging_feature" "system_logging_feature" {
"${sys.name}-logging" => sys
if try(sys.logging, null) != null
}
name = try(each.value.logging.name, "${each.value.name}-logging")
name = try(each.value.logging.name, "logging")
description = try(each.value.logging.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
disk_file_rotate = try(each.value.logging.disk_file_rotate, null)
Expand Down Expand Up @@ -491,7 +491,7 @@ resource "sdwan_system_mrf_feature" "system_mrf_feature" {
"${sys.name}-mrf" => sys
if try(sys.mrf, null) != null
}
name = try(each.value.mrf.name, "${each.value.name}-mrf")
name = try(each.value.mrf.name, "mrf")
description = try(each.value.mrf.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
enable_migration_to_mrf = try(each.value.mrf.migration_to_mrf, null)
Expand All @@ -509,7 +509,7 @@ resource "sdwan_system_ntp_feature" "system_ntp_feature" {
"${sys.name}-ntp" => sys
if try(sys.ntp, null) != null
}
name = try(each.value.ntp.name, "${each.value.name}-ntp")
name = try(each.value.ntp.name, "ntp")
description = try(each.value.ntp.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
authentication_keys = try(length(each.value.ntp.authentication_keys) == 0, true) ? null : [for key in each.value.ntp.authentication_keys : {
Expand Down Expand Up @@ -548,7 +548,7 @@ resource "sdwan_system_omp_feature" "system_omp_feature" {
"${sys.name}-omp" => sys
if lookup(sys, "omp", null) != null
}
name = each.value.omp.name
name = try(each.value.omp.name, "omp")
description = try(each.value.omp.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
advertise_ipv4_bgp = try(each.value.omp.advertise_ipv4_bgp, null)
Expand Down Expand Up @@ -617,7 +617,7 @@ resource "sdwan_system_performance_monitoring_feature" "system_performance_monit
"${sys.name}-performance_monitoring" => sys
if lookup(sys, "performance_monitoring", null) != null
}
name = each.value.performance_monitoring.name
name = try(each.value.performance_monitoring.name, "performance_monitoring")
description = try(each.value.performance_monitoring.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
app_perf_monitor_app_group = try(each.value.performance_monitoring.app_perf_monitor_app_groups, null)
Expand All @@ -634,7 +634,7 @@ resource "sdwan_system_security_feature" "system_security_feature" {
"${sys.name}-security" => sys
if lookup(sys, "security", null) != null
}
name = each.value.security.name
name = try(each.value.security.name, "security")
description = try(each.value.security.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
anti_replay_window = try(each.value.security.anti_replay_window, null)
Expand Down Expand Up @@ -686,7 +686,7 @@ resource "sdwan_system_snmp_feature" "system_snmp_feature" {
"${sys.name}-snmp" => sys
if lookup(sys, "snmp", null) != null
}
name = each.value.snmp.name
name = try(each.value.snmp.name, "snmp")
description = try(each.value.snmp.description, null)
feature_profile_id = sdwan_system_feature_profile.system_feature_profile[each.value.name].id
communities = try(length(each.value.snmp.communities) == 0, true) ? null : [for c in each.value.snmp.communities : {
Expand Down Expand Up @@ -868,7 +868,7 @@ resource "sdwan_transport_wan_vpn_feature" "transport_wan_vpn_feature" {
"${transport.name}-wan_vpn" => transport
if lookup(transport, "wan_vpn", null) != null
}
name = each.value.wan_vpn.name
name = try(each.value.wan_vpn.name, "wan_vpn")
description = try(each.value.wan_vpn.description, null)
feature_profile_id = sdwan_transport_feature_profile.transport_feature_profile[each.value.name].id
enhance_ecmp_keying = try(each.value.wan_vpn.enhance_ecmp_keying, null)
Expand Down

0 comments on commit 3b55348

Please sign in to comment.