【发布时间】:2021-06-09 16:14:37
【问题描述】:
resource "google_service_account" "myaccount" {
account_id = "dev-foo-account"
}
resource "google_service_account_key" "mykey" {
service_account_id = google_service_account.myaccount.name
}
data "google_service_account_key" "mykey" {
name = google_service_account_key.mykey.name
public_key_type = "TYPE_X509_PEM_FILE"
}
如果我创建一个服务帐户和这样的密钥 - 之后如何获取密钥?
terraform output 产生:
$ terraform output -json google_service_account_key
The output variable requested could not be found in the state
file. If you recently added this to your configuration, be
sure to run `terraform apply`, since the state won't be updated
with new output variables until that command is run.
【问题讨论】:
标签: terraform terraform-provider-gcp