Skip to content

Commit

Permalink
Update README to latest format and use new container image (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpopat authored Dec 13, 2023
1 parent 6f61282 commit af3e25f
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 24 deletions.
64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ brew tap turbot/tap
brew install flowpipe
```

Clone:

```sh
git clone https://github.com/turbot/flowpipe-mod-entra.git
cd flowpipe-mod-entra
```

### Credentials

By default, the following environment variables will be used for authentication:
Expand All @@ -54,35 +47,70 @@ For more information on credentials in Flowpipe, please see [Managing Credential

### Usage

List pipelines:
[Initialize a mod](https://www.flowpipe.io/docs/mods/index#initializing-a-mod):

```sh
flowpipe pipeline list
mkdir my_mod
cd my_mod
flowpipe mod init
```

Run a pipeline:
[Install the Microsoft Entra ID mod](https://www.flowpipe.io/docs/mods/mod-dependencies#mod-dependencies) as a dependency:

```sh
flowpipe pipeline run get_user --arg user_id=12345678-1234-1234-1234-123456789012
flowpipe mod install github.com/turbot/flowpipe-mod-entra
```

You can pass in pipeline arguments as well:
[Use the dependency](https://www.flowpipe.io/docs/mods/write-pipelines/index) in a pipeline step:

```sh
flowpipe pipeline run create_user --arg user_principal_name=someuser@contoso.com --arg display_name="Some User" --arg password="SomePassword123"
vi my_pipeline.fp
```

To use a specific `credential`, specify the `cred` pipeline argument:
```hcl
pipeline "my_pipeline" {
step "pipeline" "get_user" {
pipeline = entra.pipeline.get_user
args = {
user_id = "abcdef01-2345-6789"
}
}
}
```

[Run the pipeline](https://www.flowpipe.io/docs/run/pipelines):

```sh
flowpipe pipeline run my_pipeline
```

### Developing

Clone:

```sh
git clone https://github.com/turbot/flowpipe-mod-entra.git
cd flowpipe-mod-entra
```

List pipelines:

```sh
flowpipe pipeline run get_user --arg user_id=12345678-1234-1234-1234-123456789012 --arg cred=azure_prod
flowpipe pipeline list
```

For more examples on how you can run pipelines, please see [Run Pipelines](https://flowpipe.io/docs/run/pipelines).
Run a pipeline:

### Configuration
```sh
flowpipe pipeline run get_user --arg user_id=abcdef01-2345-6789
```

No additional configuration is required.
To use a specific `credential`, specify the `cred` pipeline argument:

```sh
flowpipe pipeline run get_user --arg cred=azure_profile --arg user_id=abcdef01-2345-6789
```

## Open Source & Contributing

Expand Down
2 changes: 1 addition & 1 deletion pipelines/group/create_group.fp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pipeline "create_group" {
}

step "container" "create_group" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["ad", "group", "create", "--display-name", param.display_name, "--mail-nickname", param.mail_nickname]

env = credential.azure[param.cred].env
Expand Down
2 changes: 1 addition & 1 deletion pipelines/group/delete_group.fp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline "delete_group" {
}

step "container" "delete_group" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["ad", "group", "delete", "--group", param.group]

env = credential.azure[param.cred].env
Expand Down
2 changes: 1 addition & 1 deletion pipelines/user/create_user.fp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pipeline "create_user" {
}

step "container" "create_user" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["ad", "user", "create", "--user-principal-name", param.user_principal_name, "--display-name", param.display_name, "--password", param.password]

env = credential.azure[param.cred].env
Expand Down
2 changes: 1 addition & 1 deletion pipelines/user/delete_user.fp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline "delete_user" {
}

step "container" "delete_user" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["ad", "user", "delete", "--id", param.user_id]

env = credential.azure[param.cred].env
Expand Down
2 changes: 1 addition & 1 deletion pipelines/user/get_user.fp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline "get_user" {
}

step "container" "get_user" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = ["ad", "user", "show", "--id", param.user_id]

env = credential.azure[param.cred].env
Expand Down
2 changes: 1 addition & 1 deletion pipelines/user/update_user.fp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pipeline "update_user" {
}

step "container" "update_user" {
image = "my-azure-image"
image = "ghcr.io/turbot/flowpipe-image-azure-cli"
cmd = concat(
["ad", "user", "update", "--id", param.user_id],
param.display_name != null ? ["--display-name", param.display_name] : [],
Expand Down

0 comments on commit af3e25f

Please sign in to comment.