Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from padok-team/feat/front-security-policy
Browse files Browse the repository at this point in the history
Feat/front security policy
  • Loading branch information
edix9 authored Mar 10, 2023
2 parents 26cd8d3 + 8138014 commit 9effd40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_buckets_backends"></a> [buckets\_backends](#input\_buckets\_backends) | A map of buckets to add as the load balancer backends. | <pre>map(object({<br> hosts = list(string)<br> bucket_name = string<br> cdn_policy = optional(string)<br> path_rules = list(object({<br> paths = list(string)<br> }))<br> }))</pre> | n/a | yes |
| <a name="input_buckets_backends"></a> [buckets\_backends](#input\_buckets\_backends) | A map of buckets to add as the load balancer backends. | <pre>map(object({<br> hosts = list(string)<br> bucket_name = string<br> cdn_policy = optional(string)<br> path_rules = list(object({<br> paths = list(string)<br> }))<br> security_policy = optional(string)<br> }))</pre> | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | The load balancer name. | `string` | n/a | yes |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project to deploy the ressources to. | `string` | n/a | yes |
| <a name="input_service_backends"></a> [service\_backends](#input\_service\_backends) | A map of services to add as the load balancer backends. | <pre>map(object({<br> hosts = list(string)<br> groups = list(string)<br> path_rules = list(object({<br> paths = list(string)<br> }))<br> security_policy = optional(string)<br> }))</pre> | n/a | yes |
| <a name="input_custom_cdn_policies"></a> [custom\_cdn\_policies](#input\_custom\_cdn\_policies) | A map of additional custom CDN policies you can add to the load balancer. | <pre>map(object({<br> cache_mode = optional(string)<br> client_ttl = optional(number)<br> default_ttl = optional(number)<br> max_ttl = optional(number)<br> negative_caching = optional(bool)<br> negative_caching_policy = optional(map(object({<br> code = optional(number)<br> ttl = optional(number)<br> })))<br> serve_while_stale = optional(number)<br> signed_url_cache_max_age_sec = optional(number)<br> }))</pre> | `{}` | no |
| <a name="input_custom_cdn_policies"></a> [custom\_cdn\_policies](#input\_custom\_cdn\_policies) | A map of additional custom CDN policies you can add to the load balancer. | <pre>map(object({<br> cache_mode = optional(string, null)<br> client_ttl = optional(number, null)<br> default_ttl = optional(number, null)<br> max_ttl = optional(number, null)<br> negative_caching = optional(bool, null)<br> negative_caching_policy = optional(map(object({<br> code = optional(number, null)<br> ttl = optional(number, null)<br> })), null)<br> serve_while_stale = optional(number, null)<br> signed_url_cache_max_age_sec = optional(number, null)<br> }))</pre> | `{}` | no |
| <a name="input_ip_address"></a> [ip\_address](#input\_ip\_address) | The load balancer's IP address. | `string` | `""` | no |
| <a name="input_ssl_certificates"></a> [ssl\_certificates](#input\_ssl\_certificates) | A list of SSL certificates for the load balancer. | `list(string)` | `[]` | no |

Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ resource "google_compute_backend_bucket" "this" {
name = random_id.backend_bucket[each.key].hex
project = var.project_id

edge_security_policy = each.value.security_policy

bucket_name = each.value.bucket_name
enable_cdn = each.value.cdn_policy == null ? false : true

Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ variable "buckets_backends" {
path_rules = list(object({
paths = list(string)
}))
security_policy = optional(string)
}))
}

Expand Down

0 comments on commit 9effd40

Please sign in to comment.