Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Deploy API Proxies and Shared flows inside spaces using Maven Plugin and Cloud Build

Hi Members,

I was trying to deploy a shared flow using the CI/CD pipeline in this link, and the pipeline failed giving the following error:
[ERROR] "message": "shared flow \"internal-shared-flow\" belongs to space \"apigee-space\"",
[ERROR] "status": "PERMISSION_DENIED"

I made sure that the service account attached to the cloud build that is running this pipeline is a member of the space named "apigee-space", but it is still failing.


@ssvaidyanathan is it possible that you have seen such an issue?

Solved Solved
0 3 63
1 ACCEPTED SOLUTION

@ahmad-mahafdhah - few things 

  • Make sure you are using v2.5.2 version as thats the version that supports Spaces
    <groupId>io.apigee.build-tools.enterprise4g</groupId>
    <artifactId>apigee-edge-maven-plugin</artifactId>
    <version>2.5.2</version>​
  • In your pom file, within your Pom profile config, add the following property
    <apigee.space>${space}</apigee.space>
  • In your mvn command, make sure you add 
    -Dapigee.space=${space}​
    So in your case, you need 
    -Dapigee.space=apigee-space​

View solution in original post

3 REPLIES 3

@ahmad-mahafdhah - few things 

  • Make sure you are using v2.5.2 version as thats the version that supports Spaces
    <groupId>io.apigee.build-tools.enterprise4g</groupId>
    <artifactId>apigee-edge-maven-plugin</artifactId>
    <version>2.5.2</version>​
  • In your pom file, within your Pom profile config, add the following property
    <apigee.space>${space}</apigee.space>
  • In your mvn command, make sure you add 
    -Dapigee.space=${space}​
    So in your case, you need 
    -Dapigee.space=apigee-space​

Thank you @ssvaidyanathan , I have already tried to update the pom file and the cloudbuild.yaml before, but updating the version fixed the issue.

I just wanted to double check that this also applies to deploying API Proxies?

Thanks again.

@ahmad-mahafdhah - Glad its fixed. 

Yes - it applies to proxies as well