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
Add support for Fastly with envvar provisioning and config file imports #169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow thanks ❤️ . Looks really good!
👋🏻 @arunsathiya If there are any issues with the Fastly CLI that you think might make integration with 1Password easier, then do please open an issue at https://github.com/fastly/cli |
Converting to draft for now because I need help with OS-specific importers. |
Thank you for this addition, Arun! ❤️ I've looked over the importers and both look good to me. The paths also look to be correct - user config dir suffixed by Off the top of my head, I could see a possible problem on UNIX systems (aside from MacOS), in the situation where the user would have the Is it possible that this is the case, in your situation? If not, could you maybe describe what is the unexpected behaviour that you're encountering, when trying to run the file importers? Thanks! |
Thanks for taking a look, @hculea.
However, I have a positive news. Mac OS config file import is working as expected now. I am not sure what I was doing incorrectly the last week. Perhaps I didn't have any configuration profiles on the I tried testing it on Linux (Ubuntu) on Docker, but it seems that Shell Plugins aren't supported on it:
I am not too sure how to move forward in terms of Linux testing, but given that the path is correct, we could assume that it works fine on Linux. At this point in time, this PR is ready for a review! 😄 |
Side note: I generated the fastly shell plugin build on my Mac and copied to the Docker container using |
…it is only used to print out the config file or it's location
I think you should copy the config to the |
@AndyTitu, I am unable to copy to that location because that location doesn't exist:
Following this documentation, the envvar XDG_CONFIG_HOME isn't set in my Docker-based Ubuntu container, which is why I am copying to
Overall though, I believe we don't have any blockers, except that I have not tested the Linux importer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you for this contribution! ❤️
I think the issue in your tests above @arunsathiya is that the path actually doesn't exist, since those directories never got created (that happens automatically, when building a plugin). Running a One more thing to have in mind - the binaries are OS dependent, so you may want to set That being said, I don't see not having tested the Linux importer as a blocker. Good to go IMO! 🚢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the fastly profile
commands, I think it makes total sense for the 1Password Shell Plugin not to operate on those. When you're using the 1Password shell plugin for Fastly, you no longer need to use these commands, since you're managing the profiles/credentials through 1Password. So this is perfect as is 👍 🚀 We'll include it in the next 1Password CLI release.
Appreciate yet another amazing contribution, thank you @arunsathiya ! ❤️
This PR adds support for Fastly CLI. Fixes #133.
Key things to know:
API Token
s to authenticate.FASTLY_API_TOKEN
envvar (environment variable) is the easiest way to authenticate. The CLI also supports-t
,--token
as command flags to login, but environment variables are preferred.Issues that need to be discussed
Issue with profile subcommands
fastly profile
command has a bunch of sub-commandscreate
,delete
,list
,switch
,token
andupdate
. Of these commands, except forlist
subcommand, all subcommands can be used in the form of the same environment variable (I think), but that's not possible just yet because Shell Plugins does not offer a simple way to switch to another credential:Until that feature is available, I am suggesting that we opt out of 1Password authentication for
fastly profile
commands.The other command,
fastly profile list
basically looks for the list of available profiles in the config file and operate on the data available there. With Shell Plugins though, the config file will basically be void of these profiles, which in turn means that that command will just fail.Overall, to me, it makes sense to avoid 1Password authentication for
fastly profile
commands for now.Issue with config file imports
For some reason, I am unable to get MacOnly and LinuxOnly OS-specific config file imports working. It's probably something simple that I am missing. cc @hculea as we previously scheduled a call to discuss this. 🙏🏼 Thank you for any insights!