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

Add new endpoint to PATCH firewall rules #36

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

tbroden84
Copy link
Contributor

@tbroden84 tbroden84 commented Aug 2, 2023

Issue with how multiple PATH firewall getting handled in the API backend. Process started to handle this with: https://github.com/84codes/account-console/commit/3a22a6671d0c286ca30f5fc399caaa14817e3206

WHY are these changes introduced?

Instead of overwrite all firewall rules, use API backend endpoint to patch one or more firewall rules and keep the rest as is.

Required by: cloudamqp/terraform-provider-cloudamqp#216

WHAT is this pull request doing?

  • Patch func to only update specific rules.
  • Ease reading of single rule from the list of rules

HOW can this pull request be tested?

Tested against new Terraform Resource.

Instead of overwriting all firewall rules with the new set.
Backend will go over each rule and only update the rule if there
is a match on 'IP' field.
@tbroden84 tbroden84 requested a review from dentarg August 2, 2023 10:46
@tbroden84
Copy link
Contributor Author

@tbroden84
Copy link
Contributor Author

Used by draft PR cloudamqp/terraform-provider-cloudamqp#216 to try out patching firewall rules.

api/security_firewall.go Outdated Show resolved Hide resolved
Copy link
Member

@jage jage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@oskgu360 oskgu360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experementing

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.

4 participants