Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firewall_rule: Add enabled attribute #63

Merged
merged 3 commits into from
Mar 2, 2023

Conversation

chrishas35
Copy link
Contributor

Resolves #62

Still need to do doc updates and maybe tests? First time writing go, so feedback appreciated!

@paultyng
Copy link
Owner

paultyng commented Oct 4, 2020

I had added enabled on the unifi_port_forward but then decided to deprecate/remove it because I think its probably easier to just comment out or delete the code instead of managing this flag, but there are probably some use cases I'm not considering. Is there a reason to keep in port forwarding or firewall rules as disabled? Do you typically flip them on/off in the UI instead or something?

@chrishas35
Copy link
Contributor Author

I do have a few rules that I keep disabled and flip on occasionally via the UI (mostly "accept anything"-type rules to let me back in). I'm okay with enabled being the default, but I do think it's helpful to have available for setting to false when desired. The alternative is not having such rules in TF, but that seems less than ideal since, at least for firewall rules, one has to manage the index without duplicates.

@paultyng
Copy link
Owner

paultyng commented Oct 4, 2020

Thats a good point about firewall rules and reserving indexes.

@paultyng
Copy link
Owner

paultyng commented Oct 4, 2020

This PR looks good otherwise, but you should add a test for a disabled rule to make sure it roundtrips appropriately.

The docs are generated, you can run go run github.com/hashicorp/terraform-plugin-docs/cmd/tfpluginwebsite to generate them from the root of the repo.

@paultyng paultyng changed the base branch from master to main December 1, 2020 17:42
@joshuaspence joshuaspence marked this pull request as ready for review March 1, 2023 04:31
@joshuaspence joshuaspence merged commit 7f40f83 into paultyng:main Mar 2, 2023
@chrishas35 chrishas35 deleted the 62_firewall_enable branch March 2, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

firewall_rule: expose enabled attribute
3 participants