1

When using the 'gcloud compute forwarding-rules create' command, the --address flag allows for you to set the address by name or IP. If you set a forwarding rule --address by name in the first entry, you cannot set it again by name. All subsequent entries give an error and you have to enter them by IP address.

Process/Output:

#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

ERROR: (gcloud.compute.forwarding-rules.create) Could not fetch resource: - Invalid resource usage: 'Wrong IP address: forwarding rules that link to a target vpn gateway should use the same IP address.'.

#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

Created by.

Has anyone else seen this issue? It seems like a bug.

peterh
  • 4,953
  • 13
  • 30
  • 44
  • I was able to reproduce this issue and filed it on [this link](https://issuetracker.google.com/65029090). Thanks for reporting. – Kamran Aug 25 '17 at 01:21

1 Answers1

1

As it was mentioned by @Kamran this issue was reported at Google Issue Tracker. This issue was on the Google side and it was fixed on Aug 27 2019. You shouldn't encounter it anymore, in case if you are still affected by it please re-open this case or open a new one.

Serhii Rohoza
  • 1,424
  • 2
  • 5
  • 15