alphagov / consent-api

Service for sharing user consent to cookies across multiple domains
https://consent-api-bgzqvpmbyq-nw.a.run.app
MIT License
8 stars 0 forks source link

infra: add load balancer configuration to Pulumi #176

Closed guilhem-fry closed 11 months ago

guilhem-fry commented 11 months ago

Because the API is public, we want to introduce rate limiting as a preventive measure against DDOS attacks. In GCP, Rate Limiting is set up via a Cloud Armor policy.

Unfortunately Cloud Armor policies cannot be attached to NEG and serverless services such as Cloud Run services. Typically, they are attached to load balancers.

As such, the trick is to create a load balancer that will sit in front of our cloud run services, and attach the rate limiting policy to it.

This PR creates the Load Balancer. As part of what makes a load balancer, the following resources are created:

guilhem-fry commented 11 months ago

.deploy

(This comment will trigger a Pulumi deployment of the PR as a feature-branch environment. See this action.)

github-actions[bot] commented 11 months ago

⚠️ Cannot proceed with deployment

No matching environment target found. Please check your command and try again. You can read more about environment targets in the README of this Action.