首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Deployment Manager -转发规则(错误)

Google Deployment Manager -转发规则(错误)
EN

Stack Overflow用户
提问于 2016-01-07 07:30:24
回答 1查看 420关注 0票数 1

这里的帮助将是非常感谢的,这是我已经挣扎了一段时间的事情。我正在尝试使用Google Deployment Manager部署VPN。据我所知,我需要以下内容:

代码语言:javascript
复制
VpnTargetGateway
ForwardingRules
VpnTunnels
ReservedIP

我的ForwardingRules出了点问题。在这里,我指定了已经创建的保留IP地址,并将其分配给目标网关。下面是我的代码:

代码语言:javascript
复制
resources: 
 - name: vmx-forwarding-rules
   type: compute.v1.forwardingRule
   properties:
     region: us-central1
     IPAddress: https://www.googleapis.com/compute/v1/projects/{{env["project"] }/regions/us-central1/addresses/vmx-ip
     IPProtocol: "ESP"
     target: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }/regions/us-central1/targetVpnGateways/vmx-vpn-gateway

下面是我收到的错误:

message: u"Unexpected response from resource of type compute.v1.forwardingRule: 400 {statusMessage=Bad Request, errors=[{message=Invalid value for field 'resource': ''. A reserved IP should be specified for forwarding rule with target type TARGET_VPN_GATEWAY, domain=global, reason=invalid}]}">]>

有没有人有这方面的经验,或者知道更好的位置来寻找Deployment Manager的帮助?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2016-01-07 12:57:02

在您的YAML配置中尝试:

代码语言:javascript
复制
resources:
- name: vmx-ip
  type: compute.v1.address
  properties:
    region: us-central1

- name: vmx-forwarding-rules
  type: compute.v1.forwardingRule
  properties:
    region: us-central1
    IPAddress: $(ref.vmx-ip.address)
    IPProtocol: "ESP"
    target: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/regions/us-central1/targetVpnGateways/vmx-vpn-gateway
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34644837

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档