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

Fix fastly_service_waf_configuration not updating rule attributes correctly #464

Merged
merged 3 commits into from
Aug 16, 2021

Conversation

smaeda-ks
Copy link
Contributor

@smaeda-ks smaeda-ks commented Aug 14, 2021

from code comment:

// NOTE: Fastly WAF (WAF 2020) API doesn't have a proper batch update endpoint.
// go-fastly uses the below endpoint for UpsertBatchOperation:
// "POST /waf/firewalls/:firewall_id/versions/:version_id/active-rules"
// but this endpoint only updates "status" when it comes to upsert and "revision" field is ignored.
// Therefore, when one of the rule attributes is changed we must delete it first and create it as a new rule.

@smaeda-ks smaeda-ks requested a review from Integralist August 14, 2021 23:57
@smaeda-ks smaeda-ks self-assigned this Aug 15, 2021
@smaeda-ks smaeda-ks added the bug label Aug 15, 2021
@smaeda-ks smaeda-ks changed the title [bug] existing rules must be removed before calling upsert operation [bug] fastly_service_waf_configuration resource not updating rule attributes properly Aug 15, 2021
Copy link
Collaborator

@Integralist Integralist left a comment

Choose a reason for hiding this comment

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

LGTM.

@Integralist Integralist merged commit ee55a91 into fastly:main Aug 16, 2021
@Integralist Integralist changed the title [bug] fastly_service_waf_configuration resource not updating rule attributes properly Fix fastly_service_waf_configuration not updating rule attributes correctly Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants