forked from jbartus/fastly-magento2-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcl-service.tf
74 lines (63 loc) · 1.69 KB
/
vcl-service.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#######################################################################
## a fastly delivery service
#######################################################################
resource "fastly_service_vcl" "demo_service" {
name = var.site_name
domain {
name = "${var.site_name}.global.ssl.fastly.net"
}
backend {
address = google_compute_instance.demo_origin_instance.network_interface.0.access_config.0.nat_ip
name = "${var.site_name}-origin"
port = 443
override_host = "${var.site_name}.freetls.fastly.net"
use_ssl = "true"
ssl_check_cert = "false"
shield = "pdx-or-us"
}
product_enablement {
image_optimizer = true
}
force_destroy = true
# example vcl snippets
snippet {
name = "init"
type = "init"
content = file("vcl/init.vcl")
}
snippet {
name = "recv"
type = "recv"
content = file("vcl/recv.vcl")
}
snippet {
name = "error"
type = "error"
content = file("vcl/error.vcl")
}
snippet {
name = "deliver"
type = "deliver"
content = file("vcl/deliver.vcl")
}
logging_bigquery {
name = "bigquery"
project_id = google_service_account.bq_writer.project
dataset = google_bigquery_dataset.logs_ds.dataset_id
table = google_bigquery_table.logs_table.table_id
account_name = google_service_account.bq_writer.account_id
format = file("log_format_string.json")
}
# ignore resources the ngwaf or magento plugin change
lifecycle {
ignore_changes = [
acl,
condition,
dictionary,
dynamicsnippet,
header,
request_setting,
snippet
]
}
}