当使用“gcloud compute forwarding-rules create”命令时, – 地址标志允许您通过名称或IP设置地址。 如果您设置了转发规则 – 在第一个条目中按名称地址,则不能通过名称重新设置。 所有后续条目都会给出错误,您必须通过IP地址input它们。
过程/输出:
#first entry works gcloud compute forwarding-rules create cli-test-rule-udp500 \ --region us-west1 --address cli-test-ext-ip --ip-protocol UDP \ --ports 500 --target-vpn-gateway cli-test-vpn-gw #second entry does not gcloud compute forwarding-rules create cli-test-rule-esp \ --region us-west1 **--address cli-test-ext-ip** --ip-protocol ESP \ --target-vpn-gateway cli-test-vpn-gw
错误:(gcloud.compute.forwarding-rules.create)无法获取资源: – 无效的资源使用情况:'错误的IP地址:链接到目标vpn网关的转发规则应该使用相同的IP地址'。
#You must enter subsequent entries by IP address: gcloud compute forwarding-rules create cli-test-rule-esp \ --region us-west1 **--address 35.xx.xx.xx** --ip-protocol ESP \ --target-vpn-gateway cli-test-vpn-gw
由…创build 。
有没有其他人看到这个问题? 这似乎是一个错误。