我已经在TF(0.11.14
)中创建了一个GCP角色,将其附加到服务帐户,还为以后创建了一个密钥,如下所示:
resource "google_service_account_key" "my_service_account_key" {
service_account_id = "${google_service_account.my_service_account.id}"
}
然后我以以下方式将private_key
作为输出:
output "my_service_account_private_key" {
value = "${google_service_account_key.my_service_account_key.private_key}"
sensitive = true
}
哪个会像这样打印一个很长的字符串
ewogICJK49fo34KFo4 .... 49k92kljg==
假设角色具有启用对GCS存储桶进行读/写的权限,我如何将上述凭据/私钥传递给(GKE)吊舱/部署,以便为吊舱授予特定的服务帐户(因此,能够执行相应权限所允许的操作,例如读/写存储桶?