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

feat(product_enablement) - Add support for Fastly Bot Management. #880

Merged

Conversation

BrooksCunningham
Copy link
Contributor

This PR adds the ability to enable Fastly Bot Management via the product_enablement field in a fastly_service_vcl resource. Below is an example with bot_management enabled.

product_enablement {
    bot_management = true
    origin_inspector = true
    domain_inspector = true
  }

I have successfully tested locally and updated the test file fastly/block_fastly_service_product_enablement_test.go to have the field bot_management = false.

Please let me know if there are any other tests that I may run or updates that I may make to help get this PR merged. Thanks!

@BrooksCunningham
Copy link
Contributor Author

@kpfleming Now that this PR (fastly/go-fastly#539) has been merged, are there are additional steps required before this PR may be merged?

@kpfleming
Copy link
Contributor

I believe the answer is:

  1. Update this line to reflect that v9.9.0 is required.
  2. Revert the local changes to the vendored copy of go-fastly.
  3. Run 'go mod vendor' to update the vendored copy to be v9.9.0.

@BrooksCunningham
Copy link
Contributor Author

@kpfleming I reverted my changes to the vendor file [vendor/github.com/fastly/go-fastly/v9/fastly/product_enablement.go]. However, now the tests are failing.

How may I pass the tests without modifying the product_enablement.go file directly?

@Integralist
Copy link
Collaborator

Your last commit 22a07f2 seems to revert the changes made by go mod vendor

@BrooksCunningham
Copy link
Contributor Author

Your last commit 22a07f2 seems to revert the changes made by go mod vendor

@Integralist Correct. Should I not do that? Or should I run go mod vendor and commit the changes made from that command? That command will modify product_enablement.go

@Integralist
Copy link
Collaborator

That's correct, run go mod vendor and the files generated you'll keep committed.

e.g. you'll see /vendor is committed as part of the repo https://github.com/fastly/terraform-provider-fastly/tree/main/vendor

@BrooksCunningham
Copy link
Contributor Author

@Integralist @kpfleming Done. Let me know if I need to make any further modifications. Thanks for the guidance!

@Integralist
Copy link
Collaborator

@kpfleming you'll probably want to run the complete e2e tests as I don't think @BrooksCunningham will have the relevant access to do that.

@kpfleming
Copy link
Contributor

@kpfleming you'll probably want to run the complete e2e tests as I don't think @BrooksCunningham will have the relevant access to do that.

Yep. We'll also need to get that product enabled on the SID we use for those tests.

@kpfleming
Copy link
Contributor

Acceptance tests for this feature pass as planned.

@kpfleming kpfleming merged commit eb72a94 into fastly:main Aug 21, 2024
9 checks passed
@kpfleming kpfleming changed the title Product enablement - Fastly Bot Management feat(products) - Add support for Fastly Bot Management. Aug 26, 2024
@kpfleming kpfleming changed the title feat(products) - Add support for Fastly Bot Management. feat(product_enablement) - Add support for Fastly Bot Management. Aug 26, 2024
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.

3 participants