Yes, this uses a firewall resource from the puppetlabs/firewall
module.
Every server that has its firewall managed by this module will
normally be set up with the 'purge' option. This means that any
firewall rule not in the catalogue will be removed from the firewall
config.
https://forge.puppetlabs.com/puppetlabs/firewall#beginning-with-firewall
How soon the firewall rule will actually disappear depends on the
deactivation timeout for exported resources in PuppetDB, and whether
you properly decommission nodes when you shut them down. I think by
default if a node is destroyed, its exported resources are
deactivated after 30 days, after which time your server will remove
the firewall rule next time it checks in. You can speed up the
process by issuing 'puppet node deactivate
xyz.example.com' on your
puppetmaster.
If your database client checks in and doesn't declare the exported
resource (i.e. if you edit the manifest), it will disappear from the
database server on the next run anyway.
Our experience is that the system works absolutely fine in our site
of about 80 nodes, provided we remember to issue 'puppet node
deactivate' when we kill off an old server.
Cheers,
Jonathan