Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update option replicate the same Products in an App #14

Closed
matias2681 opened this issue May 17, 2017 · 5 comments
Closed

Update option replicate the same Products in an App #14

matias2681 opened this issue May 17, 2017 · 5 comments

Comments

@matias2681
Copy link

I was using the org edge configuration from here and run it with the update option -Dapigee.config.options=update .

My expectations were that updates the application but keeps the same Consumer Key and Consumer Secret. However, it's adding every time the same product to the application with a different set of keys.

image

That seems to be a bug.

Is there a way to reuse the same set of keys when we are using the update option?

Also, maybe as a feature request. It would be nice to use the same JSON format to define applications and products like the response from the apps API and products API.

@msadasivam
Copy link
Member

@matias2681
To continue using existing keys please use apigee.config.options=create
mvn apigee-config:apps -Ptest -Dapigee.config.options=create
apps and developers belong to API publish phase and need not be part of each deployment.

Alternatively, to use newly created app key/secret in tests please use the "apigee.config.exportDir" option to export newly created key/secret.

Replaying an old key/secret has the risk of users tracking them in git. The above 2 options would take care of CI usecases.

On your last point, yes, the plugin uses the POST/PUT payload of management APIs. The response payload of these APIs includes additional attributes and cannot be directly used at the moment.

@ghost
Copy link

ghost commented Nov 24, 2017

@msadasivam

I think I have the same problem as described here. In terms of using:
mvn apigee-config:apps -Ptest -Dapigee.config.options=create

If the app already exists it is skipped therefore any differences between the config and what is in Apigee to the app will not get applied. What we ideally need is a way of specifying the required state of an App in config and then using apigee-config-maven-plugin to apply that state. Is that possible with apigee-config-maven-plugin please?

@dotNetkow
Copy link

Ran into this issue today, seems we're not the only ones. FWIW, if the plugin doesn't end up being updated but you'd like to accomplish this separately, use the Add API Product to Key org management endpoint.

@ssvaidyanathan
Copy link
Collaborator

ssvaidyanathan commented Apr 6, 2018

To accomplish that - you will first need to delete the app and then create the app in your pipeline using the delete and create option for the apps alone or use sync option specifically for the apps

Going back to what @dotNetkow mentioned, if we use the Add API Product to Key then you will need to have the client Id in your repository which is not recommended unless @dotNetkow is telling how to resolve it outside of the plugin

@ssvaidyanathan
Copy link
Collaborator

Fixed in v1.4.5 - README section for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants