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.
#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
Has anyone else seen this issue? It seems like a bug.