何时使用云功能访问GCP秘密

发布于 2025-01-20 17:30:51 字数 270 浏览 1 评论 0原文

GCP 对密钥的访问操作定价为每 10,000 美元 0.03 美元 (请参阅此处)。

在 Google Cloud Functions 中使用机密时,每次运行函数时都会访问它们吗?还是仅在部署了云功能时?

如果前者是真的,那么这会带来比运行云功能本身的成本更大的成本。

GCP prices access operations to secrets at $0.03 per 10,000 (see here).

When using secrets with Google Cloud Functions, are they accessed each time a function is run? Or only when the Cloud Function is deployed?

If the former is true, then this poses a much greater cost than the costs for running the Cloud Function itsself.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清风无影 2025-01-27 17:30:51

创建云功能实例时,将访问秘密。在第一个呼叫(从0开始)或在群集中添加更多实例时,创建一个实例。一段时间未使用后,实例被卸下(通常是10分钟后)。

当实例启动时,他们就可以服务流量(请参阅 function runtime runtime )。只要使用它们,就没有新的秘密访问

The secret are accessed when a Cloud Functions instance is created. One instance is created at the first call (start from 0), or when the traffic increase and more instances must be added in the cluster. After a while of unused, the instance are offloaded (usually after 10 minutes).

When the instances are started, they are able to serve traffic (see function runtime). As long as they are used, there is no new secret access

北音执念 2025-01-27 17:30:51

根据文档,您可以以卷形式附加的文件来访问机密或作为部署期间填充的环境变量。在我看来,前者是成本更高的选项,因为读取的每个文件都是对机密管理器的请求。

According to this documentation, you can access secrets as files attached as volumes or as env vars populated during deployment. Seems to me that the former is the costlier option since every file read is a request to the secrets manager.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文