
dvrqad asked a question.
I'm attempting to configure fpt to allow me upload policies as I work on them.
I've configured fpt as described in @https://github.com/rightscale/policy_sdk/tree/master/cmd/fpt
> fpt config account sbox3
Account ID: 133226
API endpoint host: us-4.rightscale.com
Refresh token: b0aaec366b0fc366df1336622dda366875b3660c
Flexera One (true if the refresh token is from the Flexera One platform, false if it is from the RightScale dashboard): false
(the actual account id / refresh token are not the ones shown above - I changed them for this post in the interest of security.)
When I now try use fpt to upload I get the following error:
> fpt upload test\listinstance.pt
ERROR: Authentication error: Authentication failed: 400 Bad Request - {"error":"invalid_grant","error_description":"Invalid grant"}
From the UI, using the same account, I am able to administer policies (upload, apply, terminate etc...)
Does anyone have any advice on what I am missing or where I can get further details that will help me get fpt working?
thanks,
Denis
Thank you for your 2 responses.
The curl statement was successful.
> curl -i -H X-API-Version:1.5 -X POST
https://us-4.rightscale.com/api/oauth2 -d "grant_type=refresh_token" -d
"refresh_token="
HTTP/1.1 200 OK
Date: Wed, 04 Aug 2021 15:03:29 GMT
My issue is that I have configured multiple accounts - so I needed to use
the '-a' option.
> fpt -a sbox3 upload test\dvr_tag_checker.pt
Updated PolicyTemplate "dvr Untagged Resources"
(/api/governance/projects/122116/policy_templates/60fec730a0f7620001c874a7)
from test\dvr_tag_checker.pt
I don't see this option documented when I use fpt --help or review
https://github.com/rightscale/policy_sdk/tree/master/cmd/fptusage - is
there some more recent documentation that includes this option?
I have been able to cleanup the accounts
in C:\Users\\AppData\Roaming\RightScale\.fpt.yml
Thanks again - and apologies for delay in getting back to you, I was out of
the office for a few days.
--
Regards,
Denis
Denis Reynolds | Systems Engineer
QAD | Clive House, Plassey Tech Park, Limerick, Ireland
www.qad.com