Skip to content

Commit

Permalink
Removed deprecated provider
Browse files Browse the repository at this point in the history
  • Loading branch information
marciogoda committed May 10, 2021
1 parent 1ec0dc7 commit 0ab2e80
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions modules/fastly-frontend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,28 +180,23 @@ resource "fastly_service_v1" "fastly" {

vcl {
name = "custom_vcl"
content = data.template_file.custom_vcl.rendered
content = templatefile("${path.module}/custom.vcl",
{
proxy_error_response = var.proxy_error_response
custom_vcl_backends = var.custom_vcl_backends
custom_vcl_recv = var.custom_vcl_recv
custom_vcl_recv_no_shield = var.custom_vcl_recv_no_shield
custom_vcl_recv_shield_only = var.custom_vcl_recv_shield_only
custom_vcl_error = var.custom_vcl_error
custom_vcl_deliver = var.custom_vcl_deliver
vcl_recv_default_action = var.caching == "true" ? "lookup" : "pass"
})
main = true
}

force_destroy = true
}

data "template_file" "custom_vcl" {
template = file("${path.module}/custom.vcl")

vars = {
proxy_error_response = var.proxy_error_response
custom_vcl_backends = var.custom_vcl_backends
custom_vcl_recv = var.custom_vcl_recv
custom_vcl_recv_no_shield = var.custom_vcl_recv_no_shield
custom_vcl_recv_shield_only = var.custom_vcl_recv_shield_only
custom_vcl_error = var.custom_vcl_error
custom_vcl_deliver = var.custom_vcl_deliver
vcl_recv_default_action = var.caching == "true" ? "lookup" : "pass"
}
}

# resource performing bare-domain redirection to prefix; only for live
resource "fastly_service_v1" "fastly_bare_domain_redirection" {
name = "${var.bare_redirect_domain_name}-redirection"
Expand Down

0 comments on commit 0ab2e80

Please sign in to comment.