-
Notifications
You must be signed in to change notification settings - Fork 0
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
PDI-1947: Rename Tool and Cleanup #1
Open
erikostien-pingidentity
wants to merge
10
commits into
main
Choose a base branch
from
PDI-1947
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
632c33e
Change tool name from 'pingctl' to 'pingcli' in all instances
erikostien-pingidentity a363970
Remove env var and viper key from http-method and data flags for cust…
erikostien-pingidentity e35adab
Add messaging for when creating new default config file
erikostien-pingidentity e0766f3
Default values and write all options to config file on start
erikostien-pingidentity 666b555
Only run pipelines on main branch
erikostien-pingidentity 0185c27
Add data env var for testing
erikostien-pingidentity b95140d
Update dependecies
erikostien-pingidentity 1d0752e
Disable pingcli config logic to just return help or use as parent com…
erikostien-pingidentity baee5e9
go mod tidy
erikostien-pingidentity 5529002
initial usage docs
samir-gandhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,91 @@ | ||
# pingcli | ||
|
||
Ping Identity Command Line Interface (CLI) tool. | ||
The Ping CLI is a unified command line interface for configuring and managing Ping Identity Services. | ||
|
||
## Install | ||
|
||
<!-- TODO --> | ||
|
||
## Configure Ping CLI | ||
|
||
Before using the Ping CLI, you need to configure your Ping Identity Service profile(s). The following steps show the quickest path to configuration. | ||
|
||
Start by running the command to create a new profile and answering the prompts. | ||
|
||
```text | ||
$ pingcli config add-profile | ||
Pingcli configuration file '/Users/<me>/.pingcli/config.yaml' does not exist. - No Action (Warning) | ||
Creating new pingcli configuration file at: /Users/<me>/.pingcli/config.yaml | ||
New profile name: : dev | ||
New profile description: : configuration for development environment | ||
Set new profile as active: : y | ||
Adding new profile 'dev'... | ||
Profile created. Update additional profile attributes via 'pingcli config set' or directly within the config file at '/Users/<me>/.pingcli/config.yaml' - Success | ||
Profile 'dev' set as active. - Success | ||
``` | ||
|
||
Run `pingcli config view-profile` to generate a set of empty configuration. | ||
|
||
```text | ||
$ pingcli config view-profile | ||
Profile: dev | ||
|
||
color: true | ||
description: configuration for development environment | ||
export: | ||
format: HCL | ||
outputdirectory: /Users/samirgandhi/projects/terraform/UAT/pingcli-uat/export | ||
overwrite: false | ||
pingone: | ||
environmentid: "" | ||
# additional configuration trimmed | ||
``` | ||
|
||
The available settings can be configured by editing the empty fields within the generated `~/.pingcli/config.yaml`. General Ping Identity service connection settings are found under the `service` key, and settings relevant to individual commands are found under their command names e.g. `export` and `request`. | ||
|
||
To see descriptions for the settings the `export` command's help option. | ||
``` | ||
pingcli platform export --help | ||
``` | ||
|
||
## Commands | ||
|
||
Ping CLI commands have the following structure: | ||
|
||
```shell | ||
pingcli <command> <subcommand> [options and parameters] | ||
``` | ||
|
||
To get the version of Ping CLI: | ||
|
||
```shell | ||
pingcli --version | ||
``` | ||
|
||
### Platform Export | ||
|
||
The `pingcli platform export` command uses your configured settings to connect to the requested services and generate [Terraform import blocks](https://developer.hashicorp.com/terraform/language/import) for every supported resource available. | ||
|
||
An example command to export a PingOne environment for HCL generation looks like: | ||
|
||
```shell | ||
pingctl platform export --services "pingone-platform,pingone-sso" | ||
``` | ||
|
||
The generated import blocks are organized into one folder with a file per resource type found. These import blocks can be used to [generate terraform configuration](https://developer.hashicorp.com/terraform/language/import/generating-configuration). | ||
|
||
### Custom Request | ||
|
||
The `pingcli request` command uses your configured settings to authenticate to the desired ping service before executing your API request. | ||
|
||
An example command to view PingOne Environments looks like: | ||
|
||
```shell | ||
pingcli request --http-method GET --service pingone environments | ||
``` | ||
|
||
## Getting Help | ||
|
||
The best way to interact with our team is through Github. You can [open an issue](https://github.com/pingidentity/pingcli/issues/new) for guidance, bug reports, or feature requests. | ||
|
||
Please check for similar open issues before opening a new one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Reference to pingctl