airnode: "Can't access storage bucket deploying Airnode on GCP"

Description

I configured an Airnode with ChainAPI and am trying to deploy it on GCP. When I run the deploy command it fails with

2022-07-05T13:51:22.017Z ✖ Airnode deployment failed due to unexpected errors.
  It is possible that some resources have been deployed on cloud provider.
  Please use the "remove" command from the deployer CLI to ensure all cloud resources are removed.
2022-07-05T13:51:22.018Z ✖ admin-288@gcp-deploy-test-355413.iam.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket.

Version

Airnode Deployer docker image 0.6.4

Steps to reproduce

  1. Create a new GCP project
  2. Enable the App Engine Admin API
  3. Create a new service account with the Owner role
  4. Create a key for the service account, download it and save it as gcp.json
  5. Run the command given by ChainAPI
GCP Deploy 1 GCP Deploy 2 GCP Deploy 3 GCP Deploy 4
$ docker run -it --rm -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd)/gcp.json:/app/gcp.json" -v "$(pwd)/config:/app/config" -v "$(pwd)/output:/app/output" api3/airnode-deployer:0.6.4 deploy --debug
  ___  _                      _      
 / _ \(_)                    | |     
/ /_\ \_ _ __ _ __   ___   __| | ___ 
|  _  | | '__| '_ \ / _ \ / _` |/ _ \
| | | | | |  | | | | (_) | (_| |  __/
\_| |_/_|_|  |_| |_|\___/ \__,_|\___|

          Airnode v0.6.4
        Deployer CLI v0.6.4

2022-07-05T13:51:20.934Z ℹ Running command deploy with arguments {"debug":true,"configuration":"config/config.json","config":"config/config.json","conf":"config/config.json","secrets":"config/secrets.env","receipt":"output/receipt.json"}
2022-07-05T13:51:20.935Z ℹ Parsing secrets file
2022-07-05T13:51:20.953Z ℹ Validating mnemonic
2022-07-05T13:51:21.341Z ℹ Creating a temporary secrets.json file
2022-07-05T13:51:21.349Z ℹ Deriving airnode wallet from mnemonic
2022-07-05T13:51:21.447Z ℹ Shortening Airnode Address
2022-07-05T13:51:21.463Z ℹ Deploying Airnode ea094b2 coingecko-1 to gcp us-central1
2022-07-05T13:51:21.465Z ℹ Checking Terraform state existence in GCP
2022-07-05T13:51:21.899Z ✖ Failed deploying Airnode ea094b2 coingecko-1 to gcp us-central1
2022-07-05T13:51:21.899Z ℹ Deleting a temporary secrets.json file
2022-07-05T13:51:21.903Z ℹ Deriving airnode wallet from mnemonic
2022-07-05T13:51:21.994Z ℹ Shortening Airnode Address
2022-07-05T13:51:21.996Z ℹ Deriving Airnode xpub from mnemonic
2022-07-05T13:51:22.012Z ℹ Writing receipt.json file
2022-07-05T13:51:22.016Z ℹ Outputted output/receipt.json
  This file does not contain any sensitive information.
2022-07-05T13:51:22.017Z ✖ Airnode deployment failed due to unexpected errors.
  It is possible that some resources have been deployed on cloud provider.
  Please use the "remove" command from the deployer CLI to ensure all cloud resources are removed.
2022-07-05T13:51:22.018Z ✖ admin-288@gcp-deploy-test-355413.iam.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

Hi @vponline; I am currently writing down a report on the regions that have all the necessary resources to successfully deploy and run the Airnode; in the meantime, I tested the Docker images of the versions you mention and the deployments seem to function properly; this also goes for the latest patches (v0.6.7 and v 0.7.5).

The google docs say the following:

If you delete the project that contains the bucket, which effectively deletes the bucket as well, the bucket name may not be released for weeks or longer.

If I try to go create buckets with the same bucket names as projects that I’ve created and ‘shut down’ in the console yesterday, the UI tells me that the bucket names are not available.

I used the gcp-quick-deploy tutorial with the following bucket name which is still unavailable:

Image

I’ve verified that this solves the problem. However, I suspect that this is not entirely what the issue is about. I first deployed with the same configuration files that an API provider has already deployed with, and got deployer@gcp-test-356713.iam.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket. Then I modified stage and redeployed, which went through. This is weird because the bucket name is composed of the short Airnode address and stage, and since the wallet mnemonics and Airnode addresses are different, there should have been no collision.