Skip to content

Commit 17fbfaf

Browse files
committed
Work around fastly bug
The fastly provider panics in terraform plans where a dynamic value isn't known yet fastly/terraform-provider-fastly#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
1 parent bf810ae commit 17fbfaf

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

terraform/channels.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ locals {
1010
# Use the website endpoint because the bucket is configured with website
1111
# enabled. This also means we can't use TLS between Fastly and AWS because
1212
# 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
1715
# channels_backend = aws_s3_bucket_website_configuration.channels.website_endpoint
1816
}
1917

terraform/nixpkgs-tarballs.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ locals {
33
# Use the website endpoint because the bucket is configured with website
44
# enabled. This also means we can't use TLS between Fastly and AWS because
55
# 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
108
# tarballs_backend = aws_s3_bucket_website_configuration.nixpkgs-tarballs.website_endpoint
119
}
1210

0 commit comments

Comments
 (0)