【问题标题】:What is the correct URL to export a config-connector config file for Google Cloud Storage?为 Google Cloud Storage 导出 config-connector 配置文件的正确 URL 是什么?
【发布时间】:2021-06-09 06:26:49
【问题描述】:

我想为现有的 Cloud Storage Bucket 导出 config-connect yaml。文档描述了运行 config-connector export [URL],但不清楚存储桶的 URL 应该是什么。

docs 链接到https://cloud.google.com/iam/docs/full-resource-names,这表明//storage.googleapis.com/projects/_/buckets/bucket-id。我试过这个:

config-connector export //storage.googleapis.com/projects/_/buckets/config-connector-experiment

得到了

error in 'config-connector' version '1.51.2': error getting unstructured: error getting next unstruct: error converting url '//storage.googleapis.com/projects/_/buckets/config-connector-experiment' to skeleton: error getting service mapping and resource config for url '//storage.googleapis.com/projects/_/buckets/config-connector-experiment': unable to find a matching resource config for uri path '/projects/_/buckets/config-connector-experiment'

docs 有一个脚注,上面写着“1 此处显示的格式与 IAM 兼容。某些服务对此资源类型使用不同的格式。”也许配置连接器有不同的格式?如果有,它是什么,可以添加到文档中吗?

谢谢!

【问题讨论】:

  • 尝试不使用完整路径,在某些情况下,例如在创建聚合接收器时,必须将 Cloud Storage 存储桶引用为全局资源,例如: storage.googleapis.com/bucket-id 。例如: gcloud logging sinks create storage.googleapis.com/ --include-children --organization= --log-filter="logName:activity"
  • 感谢您的建议!我试过了(并添加了一些新的变体)但它们没有用:(
  • 您尝试过简单的gs://bucket/path/to/file 格式吗?
  • @guillaumeblaquiere 是的,我试过gs://bucket。但是,按照设计,没有路径,对吧?
  • @PaulBiggar 为了澄清起见,gsutil URI 的正确格式是:gs://[nameOfTheBucket]/

标签: google-cloud-storage gcp-config-connector


【解决方案1】:

截至June 8th, 2021,这是不可能的,因为 config-connector 的导出功能不支持云存储。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-04
    • 2019-11-02
    • 2018-02-13
    • 2014-01-18
    • 2018-08-02
    • 2021-07-27
    • 2018-03-22
    • 2021-07-31
    相关资源
    最近更新 更多