marshallford / terraform-provider-pfsense

Used to configure pfSense firewall/router devices with Terraform.
https://registry.terraform.io/providers/marshallford/pfsense
MIT License
16 stars 3 forks source link

DNS Resolver (Unbound) not working for me #5

Closed trevor-crowley closed 1 year ago

trevor-crowley commented 1 year ago

This is an excellent project. I got all the exmaples to work except for the this one. terraform says the plan works but I cannot see the results in the GUI or the config file. Is there a trick to viewing this?

marshallford commented 1 year ago

Did you add include-toplevel: /var/unbound/conf.d/* to the DNS Resolver custom options input? The pfsense_dnsresolver_configfile resource simply writes files to that file path and upon apply Unbound includes the contents as a part of the main config.

trevor-crowley commented 1 year ago

Sorry, I should have read your docs more closely. Tried many times with your v0.3 and no dice. ff success but no resources to see.

pfSense = Current Base System2.7.0

I then upgraded to your v0.4 and getting some error messages around this: INPUT: pfsense_dnsresolver_configfile.example will be created

marshallford commented 1 year ago

Hmmm... state rm the resource and try again. I have not documented this, but any release below v1.0.0 is considered breaking. Assuming you are able to then get the resource to create/update, you can test your change by running the command nslookup one.two.three.subdomain.example.com with an expected response of 10.10.10.10.

marshallford commented 1 year ago

I should also bit more clear in the docs for this resource, but you will not see this config file appear in the DNS resolver UI. The only way to validate your change via the UI is by using the edit file tool to view the file /var/unbound/conf.d/wildcard-record-example.conf.

trevor-crowley commented 1 year ago

Magic! thank you.

nslookup one.two.three.subdomain.example.com Server: 192.168.88.1 Address: 192.168.88.1#53 Name: one.two.three.subdomain.example.com Address: 10.10.10.10