Work around fastly bug
The fastly provider panics in terraform plans where a dynamic value isn't known yet https://github.com/fastly/terraform-provider-fastly/issues/884 To work around this issue, lets hardcode the value of website_endpoint and once we've applied these changes we can remove the hardcoding in a follow-up PR
Arian van Putten committed
Jun 9, 2025 at 16:05 UTC
17fbfaf8a16be9ddb3b020d60e51151bc9d36e88
2 files changed
+4
-8
terraform/channels.tf
+2
-4
@@ -10,10 +10,8 @@ locals {
10
# Use the website endpoint because the bucket is configured with website
11
# enabled. This also means we can't use TLS between Fastly and AWS because
12
# the website endpoint only has port 80 open.
13
- channels_backend = aws_s3_bucket.nixpkgs-tarballs.website_endpoint
14
- # NOTE: I'd wish to use the below line to get rid of deprecation errors but then the fastly provider panics
15
- # see https://github.com/fastly/terraform-provider-fastly/issues/884
16
- # and https://gist.github.com/arianvp/263cbe52b00620bcbc388ffde8b45876
13
+ channels_backend = "nix-channels.s3-website-us-east-1.amazonaws.com"
14
+ # TODO: Uncomment this once has been applied once. This is to work around fastly bug https://github.com/fastly/terraform-provider-fastly/issues/884
15
# channels_backend = aws_s3_bucket_website_configuration.channels.website_endpoint
16
}
17
terraform/nixpkgs-tarballs.tf
+2
-4
@@ -3,10 +3,8 @@ locals {
3
# Use the website endpoint because the bucket is configured with website
4
# enabled. This also means we can't use TLS between Fastly and AWS because
5
# the website endpoint only has port 80 open.
6
- tarballs_backend = aws_s3_bucket.nixpkgs-tarballs.website_endpoint
7
- # NOTE: I'd wish to use the below line to get rid of deprecation errors but then the fastly provider panics
8
- # see https://github.com/fastly/terraform-provider-fastly/issues/884
9
- # and https://gist.github.com/arianvp/263cbe52b00620bcbc388ffde8b45876
6
+ tarballs_backend = "nixpkgs-tarballs.s3-website-eu-west-1.amazonaws.com"
7
+ # TODO: Uncomment this once has been applied once. This is to work around fastly bug https://github.com/fastly/terraform-provider-fastly/issues/884
8
# tarballs_backend = aws_s3_bucket_website_configuration.nixpkgs-tarballs.website_endpoint
9
}
10