terraform{,-iam}: reformat with terraform fmt
Most of the diff is due to me not knowing that "terraform fmt" was a thing until about 4h ago.
Pierre Bourdon committed
Oct 28, 2023 at 16:10 UTC
3869fa4f1f00101c538592c89bffc4ee03eaa356
4 files changed
+30
-30
terraform-iam/outputs.tf
+1
-1
@@ -1,6 +1,6 @@
1
output "cache" {
2
value = {
3
- key = aws_iam_access_key.fastly-cache-access.id
3
+ key = aws_iam_access_key.fastly-cache-access.id
4
secret = aws_iam_access_key.fastly-cache-access.secret
5
}
6
sensitive = true
terraform/cache.tf
+10
-10
@@ -205,14 +205,14 @@ resource "fastly_service_vcl" "cache" {
205
# Authenticate Fastly<->S3 requests. See Fastly documentation:
206
# https://docs.fastly.com/en/guides/amazon-s3#using-an-amazon-s3-private-bucket
207
snippet {
208
- name = "Authenticate S3 requests"
209
- type = "miss"
208
+ name = "Authenticate S3 requests"
209
+ type = "miss"
210
priority = 100
211
content = templatefile("${path.module}/cache/s3-authn.vcl", {
212
- aws_region = aws_s3_bucket.cache.region
212
+ aws_region = aws_s3_bucket.cache.region
213
backend_domain = aws_s3_bucket.cache.bucket_domain_name
214
- access_key = local.cache-iam.key
215
- secret_key = local.cache-iam.secret
214
+ access_key = local.cache-iam.key
215
+ secret_key = local.cache-iam.secret
216
})
217
}
218
@@ -377,14 +377,14 @@ resource "fastly_service_vcl" "cache-staging" {
377
# Authenticate Fastly<->S3 requests. See Fastly documentation:
378
# https://docs.fastly.com/en/guides/amazon-s3#using-an-amazon-s3-private-bucket
379
snippet {
380
- name = "Authenticate S3 requests"
381
- type = "miss"
380
+ name = "Authenticate S3 requests"
381
+ type = "miss"
382
priority = 100
383
content = templatefile("${path.module}/cache/s3-authn.vcl", {
384
- aws_region = aws_s3_bucket.cache.region
384
+ aws_region = aws_s3_bucket.cache.region
385
backend_domain = aws_s3_bucket.cache.bucket_domain_name
386
- access_key = local.cache-iam.key
387
- secret_key = local.cache-iam.secret
386
+ access_key = local.cache-iam.key
387
+ secret_key = local.cache-iam.secret
388
})
389
}
390
terraform/channels.tf
+18
-18
@@ -94,25 +94,25 @@ resource "fastly_service_vcl" "channels" {
94
default_ttl = 3600
95
96
backend {
97
- address = local.channels_backend
98
- auto_loadbalance = false
99
- connect_timeout = 5000
100
- name = local.channels_backend
101
- override_host = local.channels_backend
102
- request_condition = "not-flake-registry"
103
- shield = local.fastly_shield
97
+ address = local.channels_backend
98
+ auto_loadbalance = false
99
+ connect_timeout = 5000
100
+ name = local.channels_backend
101
+ override_host = local.channels_backend
102
+ request_condition = "not-flake-registry"
103
+ shield = local.fastly_shield
104
}
105
106
backend {
107
# https://github.com/NixOS/flake-registry/raw/master/flake-registry.json
108
- name = "flake-registry"
109
- address = "raw.githubusercontent.com"
110
- auto_loadbalance = false
111
- override_host = "raw.githubusercontent.com"
112
- port = 443
113
- use_ssl = true
114
- ssl_check_cert = false
115
- request_condition = "flake-registry"
108
+ name = "flake-registry"
109
+ address = "raw.githubusercontent.com"
110
+ auto_loadbalance = false
111
+ override_host = "raw.githubusercontent.com"
112
+ port = 443
113
+ use_ssl = true
114
+ ssl_check_cert = false
115
+ request_condition = "flake-registry"
116
}
117
118
condition {
@@ -203,13 +203,13 @@ resource "fastly_service_vcl" "channels" {
203
}
204
205
snippet {
206
- name = "flake-registry"
207
- content = <<-EOT
206
+ name = "flake-registry"
207
+ content = <<-EOT
208
if (req.url == "/flake-registry.json") {
209
set req.url = "/NixOS/flake-registry/master/flake-registry.json";
210
}
211
EOT
212
- type = "recv"
212
+ type = "recv"
213
}
214
215
logging_s3 {
terraform/locals.tf
+1
-1
@@ -6,7 +6,7 @@ locals {
6
7
fastly_shield = "iad-va-us"
8
9
- cache-iam = data.terraform_remote_state.terraform-iam.outputs.cache
9
+ cache-iam = data.terraform_remote_state.terraform-iam.outputs.cache
10
fastlylogs = data.terraform_remote_state.terraform-iam.outputs.fastlylogs
11
12
# fastlylogs = {