I'm trying to reserve a global static external IP address on GCP with the Terraform code below:
provider "google" {
credentials = file("myCredentials.json")
project = "myproject-638932"
region = "asia-northeast1"
}
resource "google_compute_global_address" "default" {
name = "global-appserver-ip"
}
But I got this error:
Error creating GlobalAddress: googleapi: Error 403: Required 'compute.globalAddresses.create' permission for 'projects/myproject-638932/global/addresses/global-appserver-ip', forbidden
So now, I'm trying to add a role to solve this error above but there are too many roles to choose:
What role do I need to choose?
Choose the role "Compute Network Admin":
If you want to choose a more specific role, choose the role "Compute Public IP Admin":
Then, you can reserve a global static external IP address: