【问题标题】:gcloud cli app engine domain mapping errorgcloud cli 应用引擎域映射错误
【发布时间】:2019-09-08 01:50:42
【问题描述】:

我正在尝试让多个微服务在单个项目的单个应用引擎上运行。我正在关注 GCP 的官方文档

https://cloud.google.com/appengine/docs/standard/python3/mapping-custom-domains

当我尝试创建这样的通配符映射时

gcloud app domain-mappings create '*.example.com'

以便 GCP 后端引擎可以相应地匹配请求:

[VERSION_ID].[SERVICE_ID].example.com

我收到以下错误

ERROR: (gcloud.app.domain-mappings.create) INVALID_ARGUMENT: A managed certificate cannot be created on a wildcard domain mapping. Set `ssl_management_type` to `MANUAL` and retry the domain mapping creation. You can manually create an SSL certificate with `AuthorizedCertificates.CREATE` and map it to this domain mapping with `AuthorizedCertificates.UPDATE`.

有人可以帮忙吗?

【问题讨论】:

    标签: google-app-engine google-cloud-platform


    【解决方案1】:

    默认情况下,该命令似乎尝试配置托管 SSL 证书,这些证书与通配符域映射不兼容。来自Wildcard mappings

    **Note**: Wildcard mappings are not supported for managed SSL certificates.
    

    正如错误消息所示,您可以使用一个选项禁用它。来自gcloud beta app domain-mappings create

    --certificate-management=CERTIFICATE_MANAGEMENT
    

    证书管理的类型。 “自动”将提供 SSL 证书自动,而“手动”要求用户提供 要提供的证书 ID。 CERTIFICATE_MANAGEMENT 必须是一个 作者:automaticmanual

    那就试试吧:

    gcloud app domain-mappings create '*.example.com' --certificate-management=manual
    

    我看到了一个差异:错误消息提到了ssl_management_type 选项,而文档页面显示了certificate-management。如果需要,请尝试两者 - 这可能只是一个错误,也可能是一个重命名的选项(在后台可能仍受支持,也可能不支持)。

    当然,如果您想要 SSL,您必须自己管理 SSL 证书(也许使用--certificate-id 选项,记录在同一页上?)。在这种情况下,还请查看相关的Google App Engine custom subdomain mapping for a specific version,了解变量域嵌套的潜在影响。

    【讨论】:

      猜你喜欢
      • 2021-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-18
      相关资源
      最近更新 更多