Skip to content

Commit 0444c35

Browse files
committed
Store credentials for Fastly service account
In order to define and access a private bucket as origin for the Fastly service defined for dl.k8s.io, we store the credentials required in GCP secrets. Fastly don't support workload identity so the credentials will be accessible through [data sources](https://developer.hashicorp.com/terraform/language/data-sources) outside of this configuration.
1 parent 5a05e5c commit 0444c35

File tree

1 file changed

+33
-0
lines changed
  • infra/gcp/terraform/k8s-infra-releases-prod

1 file changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Copyright 2024 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
module "secrets" {
18+
source = "GoogleCloudPlatform/secret-manager/google"
19+
version = "~> 0.3"
20+
21+
project_id = google_project.project.project_id
22+
23+
secrets = [
24+
{
25+
name = "fastly_reader_sa_access_key"
26+
secret_data = google_storage_hmac_key.fastly_reader_key.access_id
27+
},
28+
{
29+
name = "fastly_reader_sa_secret_key"
30+
secret_data = google_storage_hmac_key.fastly_reader_key.secret
31+
},
32+
]
33+
}

0 commit comments

Comments
 (0)