Plenty of writes now works and an expanded example exists in the terraform directory

This commit is contained in:
Joachim Friberg committed 2026-08-25 20:25:08 +02:00
1 parent a6f1019175
commit fb8d468943
15 files changed
+1344 -74

No files matched your search

+21 -6
View File
@@ -1,10 +1,11 @@
# All three fields are optional. If omitted, each falls back to an env var,
# then to a default -- same pattern as config.py in the Python reference
# project (SWITCH_HOST / SWITCH_HTTPS / SWITCH_PASSWORD):
# All fields are optional. If omitted, each falls back to an env var, then
# to a default -- same pattern as config.py in the Python reference project
# (SWITCH_HOST / SWITCH_HTTPS / SWITCH_PASSWORD):
#
# host <- HPE1810_HOST <- "192.168.2.10"
# https <- HPE1810_HTTPS <- false
# password <- HPE1810_PASSWORD <- ""
# host <- HPE1810_HOST <- "192.168.2.10"
# https <- HPE1810_HTTPS <- false
# password <- HPE1810_PASSWORD <- ""
# save_running_config <- HPE1810_SAVE_RUNNING_CONFIG <- false
#
# So for the switch as currently configured (no password, plain HTTP, at its
# default IP), an empty provider block is enough:
@@ -17,4 +18,18 @@ provider "hpe1810" {
host = "192.168.2.10"
https = false
password = "" # switch currently has no password set
# If true, "Save Configuration" runs once at the end of this `tofu`
# invocation, but only if it actually wrote something -- a plan-only run,
# or an apply where nothing changed, never triggers a save. Left false by
# default: the config is already source-of-truth as IaC, and saving on
# every write wears the switch's flash for no real benefit. Flip to true
# once you actually want changes to survive a reboot/power cycle.
save_running_config = false
# hpe1810_port refuses to write to this interface under any circumstances
# -- protects the switch's uplink/management port. Matches the default,
# stated explicitly here for clarity. NEVER put this port number in
# var.ports (see variables.tf).
admin_port = 24
}