Skip to content

ufw

A ufw rule for a port. Rules take effect once ufw is enabled; allow SSH before enabling it.

step "example" {
ufw {
action = "..."
port = "..."
}
}
Name Type Required Description
action string Yes allow, deny, reject or limit.
from string No Address or CIDR the rule applies to. Defaults to anywhere.
on_remove string No “delete” (default) closes the port again when the rule is removed or replaced, “forget” leaves it open.
port string Yes Port, optionally with a protocol: 22, 22/tcp or 6000:6007/tcp.

Conn3x sets these; reference them as conn3x_ufw_rule.<circuit>__<step>["<host>"].<name>.

Name Type Description
in_sync bool Whether ufw has the rule.

A step lowers to the conn3x_ufw_rule resource, one instance per host, and connects with its circuit’s ssh block.