Files

36 lines
1.5 KiB
Terraform

# 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 <- ""
# 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:
#
# provider "hpe1810" {}
#
# The explicit values below are just to show what's available.
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
}