Skip to content

Commit c8d876e

Browse files
authored
Merge pull request #114 from turbot/release/v1.0.0
Release/v1.0.0
2 parents 9929ae4 + 5789243 commit c8d876e

172 files changed

Lines changed: 1184 additions & 918 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## v1.0.0 (2024-10-22)
2+
3+
The following changes have been made for all sample mods:
4+
5+
_Breaking changes_
6+
7+
- Flowpipe v1.0.0 is now required. For a full list of CLI changes, please see the [Flowpipe v1.0.0 CHANGELOG](https://flowpipe.io/changelog/flowpipe-cli-v1-0-0).
8+
- In Flowpipe configuration files (`.fpc`), `credential` and `credential_import` resources have been renamed to `connection` and `connection_import` respectively.
9+
- Updated the following param types:
10+
- `approvers`: `list(string)` to `list(notifier)`.
11+
- `database`: `string` to `connection.steampipe`.
12+
- `notifier`: `string` to `notifier`.
13+
- Updated the following variable types:
14+
- `approvers`: `list(string)` to `list(notifier)`.
15+
- `database`: `string` to `connection.steampipe`.
16+
- `notifier`: `string` to `notifier`.
17+
- Renamed `cred` param to `conn` and updated its type from `string` to `conn`.
18+
19+
_Enhancements_
20+
21+
- Added `sample` to each mod's categories.
22+
- Updated the following pipeline tags:
23+
- `type = "featured"` to `recommended = "true"`
24+
- Added `format` to params and variables that use multiline and JSON strings.
25+
126
## v0.4.1 [2024-03-05]
227

328
_Bug fixes_

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Run a pipeline:
4848
flowpipe pipeline run http_list_pagination
4949
```
5050

51-
Some mods require [credentials](https://flowpipe.io/docs/run/credentials) and [variables](https://flowpipe.io/docs/build/mod-variables), please see each mod's README.md for specific instructions.
51+
Some mods require [connections](https://flowpipe.io/docs/run/connections) and [variables](https://flowpipe.io/docs/build/mod-variables), please see each mod's README.md for specific instructions.
5252

5353
## Open Source & Contributing
5454

access_management/add_new_user_in_microsoft_office_365/README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cd access_management/add_new_user_in_microsoft_office_365
2424
flowpipe mod install
2525
```
2626

27-
## Credentials
27+
## Connections
2828

2929
By default, the following environment variables will be used for authentication:
3030

@@ -33,14 +33,14 @@ By default, the following environment variables will be used for authentication:
3333
- `JIRA_USER`
3434
- `TEAMS_ACCESS_TOKEN`
3535

36-
You can also create `credential` resources in configuration files:
36+
You can also create `connection` resources in configuration files:
3737

3838
```sh
3939
vi ~/.flowpipe/config/jira.fpc
4040
```
4141

4242
```hcl
43-
credential "jira" "default" {
43+
connection "jira" "default" {
4444
base_url = "https://test.atlassian.net/"
4545
api_token = "ATATT3........."
4646
username = "abc@email.com"
@@ -52,26 +52,29 @@ vi ~/.flowpipe/config/teams.fpc
5252
```
5353

5454
```hcl
55-
credential "teams" "default" {
55+
connection "teams" "default" {
5656
access_token = "<access_token>"
5757
}
5858
```
5959

60-
For more information on credentials in Flowpipe, please see [Managing Credentials](https://flowpipe.io/docs/run/credentials).
60+
For more information on connections in Flowpipe, please see [Managing Connections](https://flowpipe.io/docs/run/connections).
6161

6262
## Usage
6363

6464
Run the pipeline and specify the `teams_display_name`, `teams_account_enabled`, `teams_mail_nickname`, `teams_user_principal_name`, `teams_password`, `teams_license_sku_ids`, `jira_project_key`, `teams_team_id` and `teams_message` pipeline arguments:
6565

6666
```sh
6767
flowpipe pipeline run add_new_user_in_microsoft_office_365 \
68-
--arg teams_display_name='John Doe' \
69-
--arg teams_account_enabled=true \
70-
--arg teams_mail_nickname='john.doe' \
71-
--arg teams_user_principal_name='john.doe@foo.com' \
72-
--arg teams_password='P@ssw0rd' \
73-
--arg teams_license_sku_ids='["<license_sku_id>"]' \
74-
--arg jira_project_key='project-foo' \
75-
--arg teams_team_id='<team_id>' \
76-
--arg teams_message='New user created'
68+
--arg 'teams_display_name=Hero me2' \
69+
--arg 'teams_account_enabled=true' \
70+
--arg 'teams_mail_nickname=hero.meee' \
71+
--arg 'teams_user_principal_name=testfp5@turbotad.onmicrosoft.com' \
72+
--arg 'teams_password=P@ssw0rd' \
73+
--arg 'teams_license_sku_ids=["6470687e-a428-4b7a-bef2-8a291ad947c9"]' \
74+
--arg 'jira_project_key=TEST' \
75+
--arg 'jira_issue_type=Task' \
76+
--arg 'teams_team_id=f137966a-52be-4c32-a28f-9665634ba181' \
77+
--arg 'teams_roles=["member"]' \
78+
--arg 'teams_message_content_type=text' \
79+
--arg 'teams_message=New user created'
7780
```

access_management/add_new_user_in_microsoft_office_365/add_new_user_in_microsoft_office_365.fp

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,29 @@ pipeline "add_new_user_in_microsoft_office_365" {
33
description = "Add a new user in Microsoft Office 365."
44

55
tags = {
6-
type = "featured"
6+
recommended = "true"
77
}
88

9-
param "jira_cred" {
10-
type = string
11-
description = "Name for Jira credentials to use. If not provided, the default credentials will be used."
12-
default = "default"
9+
param "jira_conn" {
10+
type = connection.jira
11+
description = "Name of Jira connection to use. If not provided, the default Jira connection will be used."
12+
default = connection.jira.default
1313
}
1414

1515
param "jira_project_key" {
1616
type = string
1717
description = "The key identifying the Jira project."
1818
}
1919

20-
param "teams_cred" {
20+
param "jira_issue_type" {
2121
type = string
22-
description = "Name for Teams credentials to use. If not provided, the default credentials will be used."
23-
default = "default"
22+
description = "The issue type the Jira project."
23+
}
24+
25+
param "teams_conn" {
26+
type = connection.teams
27+
description = "Name of Teams connection to use. If not provided, the default Teams connection will be used."
28+
default = connection.teams.default
2429
}
2530

2631
param "teams_display_name" {
@@ -48,6 +53,16 @@ pipeline "add_new_user_in_microsoft_office_365" {
4853
description = "The password for the user."
4954
}
5055

56+
param "teams_chat_type" {
57+
type = string
58+
description = "Specifies the type of chat."
59+
}
60+
61+
param "teams_message_content_type" {
62+
type = string
63+
description = "The type of the content. Possible values are text and html."
64+
}
65+
5166
param "teams_license_sku_ids" {
5267
type = list(string)
5368
description = "The unique identifier for the available licenses."
@@ -60,7 +75,6 @@ pipeline "add_new_user_in_microsoft_office_365" {
6075

6176
param "teams_roles" {
6277
type = list(string)
63-
default = ["member"] // or "owner" or other applicable roles
6478
description = "The roles for the user."
6579
}
6680

@@ -73,7 +87,7 @@ pipeline "add_new_user_in_microsoft_office_365" {
7387
step "pipeline" "create_user" {
7488
pipeline = teams.pipeline.create_user
7589
args = {
76-
cred = param.teams_cred
90+
conn = param.teams_conn
7791
password = param.teams_password
7892
user_principal_name = param.teams_user_principal_name
7993
mail_nickname = param.teams_mail_nickname
@@ -87,22 +101,22 @@ pipeline "add_new_user_in_microsoft_office_365" {
87101
depends_on = [step.pipeline.create_user]
88102
pipeline = teams.pipeline.assign_licenses_to_user
89103
args = {
90-
cred = param.teams_cred
104+
conn = param.teams_conn
91105
sku_ids = param.teams_license_sku_ids
92106
user_id = param.teams_user_principal_name
93107
}
94108
}
95109

96110
# Create JIRA issue
97111
step "pipeline" "create_issue" {
98-
depends_on = [step.pipeline.assign_licenses_to_user]
112+
depends_on = [step.pipeline.create_user]
99113
pipeline = jira.pipeline.create_issue
100114
args = {
101-
cred = param.jira_cred
115+
conn = param.jira_conn
102116
project_key = param.jira_project_key
103117
summary = "Add a new user: ${step.pipeline.create_user.output.user.userPrincipalName}"
104118
description = jsonencode(step.pipeline.create_user.output.user)
105-
issue_type = "New Feature"
119+
issue_type = param.jira_issue_type
106120
}
107121
}
108122

@@ -111,7 +125,7 @@ pipeline "add_new_user_in_microsoft_office_365" {
111125
depends_on = [step.pipeline.create_issue]
112126
pipeline = teams.pipeline.add_team_member
113127
args = {
114-
cred = param.teams_cred
128+
conn = param.teams_conn
115129
team_id = param.teams_team_id
116130
user_id = param.teams_user_principal_name
117131
roles = param.teams_roles
@@ -123,8 +137,8 @@ pipeline "add_new_user_in_microsoft_office_365" {
123137
depends_on = [step.pipeline.add_team_member]
124138
pipeline = teams.pipeline.create_chat
125139
args = {
126-
cred = param.teams_cred
127-
chat_type = "oneOnOne"
140+
conn = param.teams_conn
141+
chat_type = param.teams_chat_type
128142
user_ids = ["${param.teams_user_principal_name}"]
129143
}
130144
}
@@ -134,9 +148,10 @@ pipeline "add_new_user_in_microsoft_office_365" {
134148
depends_on = [step.pipeline.create_chat]
135149
pipeline = teams.pipeline.send_chat_message
136150
args = {
137-
cred = param.teams_cred
138-
chat_id = step.pipeline.create_chat.output.chat.id
139-
message = param.teams_message
151+
conn = param.teams_conn
152+
chat_id = step.pipeline.create_chat.output.chat.id
153+
message = param.teams_message
154+
message_content_type = param.teams_message_content_type
140155
}
141156
}
142157
}

access_management/add_new_user_in_microsoft_office_365/mod.fp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ mod "add_new_user_in_microsoft_office_365" {
22
title = "Add New User in Microsoft Office 365"
33
description = "Add a new user in Microsoft Office 365."
44
documentation = file("./README.md")
5-
categories = ["access management"]
5+
categories = ["access management", "sample"]
66

77
require {
8+
flowpipe {
9+
min_version = "1.0.0"
10+
}
811
mod "github.com/turbot/flowpipe-mod-teams" {
9-
version = "0.1.0"
12+
version = "^1"
1013
}
1114

1215
mod "github.com/turbot/flowpipe-mod-jira" {
13-
version = "0.1.0"
16+
version = "^1"
1417
}
1518
}
1619
}

access_management/create_okta_user_assign_to_group/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ cd access_management/create_okta_user_assign_to_group
2424
flowpipe mod install
2525
```
2626

27-
## Credentials
27+
## Connections
2828

2929
By default, the following environment variables will be used for authentication:
3030

3131
- `OKTA_TOKEN`
3232
- `OKTA_ORGURL`
3333

34-
You can also create `credential` resources in configuration files:
34+
You can also create `connection` resources in configuration files:
3535

3636
```sh
3737
vi ~/.flowpipe/config/okta.fpc
3838
```
3939

4040
```hcl
41-
credential "okta" "default" {
41+
connection "okta" "default" {
4242
domain = "https://test.okta.com"
4343
api_token = "00B63........"
4444
}
4545
```
4646

47-
For more information on credentials in Flowpipe, please see [Managing Credentials](https://flowpipe.io/docs/run/credentials).
47+
For more information on connections in Flowpipe, please see [Managing Connections](https://flowpipe.io/docs/run/connections).
4848

4949
## Usage
5050

access_management/create_okta_user_assign_to_group/create_okta_user_assign_to_group.fp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ pipeline "create_okta_user_assign_to_group" {
22
title = "Create User Assign Group"
33
description = "Create a user and assign it to a group."
44

5-
param "okta_cred" {
6-
type = string
7-
description = "Name for Okta credentials to use. If not provided, the default credentials will be used."
8-
default = "default"
5+
param "conn" {
6+
type = connection.okta
7+
description = "Name of Okta connection to use. If not provided, the default Okta connection will be used."
8+
default = connection.okta.default
99
}
1010

1111
param "first_name" {
@@ -41,7 +41,7 @@ pipeline "create_okta_user_assign_to_group" {
4141
step "pipeline" "create_user" {
4242
pipeline = okta.pipeline.create_user
4343
args = {
44-
cred = param.okta_cred
44+
conn = param.conn
4545
first_name = param.first_name
4646
last_name = param.last_name
4747
email = param.email
@@ -53,7 +53,7 @@ pipeline "create_okta_user_assign_to_group" {
5353
step "pipeline" "assign_user" {
5454
pipeline = okta.pipeline.assign_user
5555
args = {
56-
cred = param.okta_cred
56+
conn = param.conn
5757
group_id = param.group_id
5858
user_id = step.pipeline.create_user.output.user.id
5959
}
@@ -64,7 +64,7 @@ pipeline "create_okta_user_assign_to_group" {
6464

6565
pipeline = okta.pipeline.list_member_users
6666
args = {
67-
cred = param.okta_cred
67+
conn = param.conn
6868
group_id = param.group_id
6969
}
7070
}

access_management/create_okta_user_assign_to_group/mod.fp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ mod "create_okta_user_assign_to_group" {
22
title = "Create Okta User and Assign to Group"
33
description = "Create a user in Okta and assign to a group."
44
documentation = file("./README.md")
5-
categories = ["access management"]
5+
categories = ["access management", "sample"]
66

77
require {
8+
flowpipe {
9+
min_version = "1.0.0"
10+
}
811
mod "github.com/turbot/flowpipe-mod-okta" {
9-
version = "0.1.0"
12+
version = "^1"
1013
}
1114
}
1215
}

access_management/invite_pipes_organization_member/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@ cd access_management/invite_pipes_organization_member
2626
flowpipe mod install
2727
```
2828

29-
## Credentials
29+
## Connections
3030

3131
By default, the following environment variables will be used for authentication:
3232

3333
- `PIPES_TOKEN`
3434

35-
You can also create `credential` resources in configuration files:
35+
You can also create `connection` resources in configuration files:
3636

3737
```sh
3838
vi ~/.flowpipe/config/pipes.fpc
3939
```
4040

4141
```hcl
42-
credential "pipes" "default" {
42+
connection "pipes" "default" {
4343
token = "tpt_..."
4444
}
4545
```
4646

47-
For more information on credentials in Flowpipe, please see [Managing Credentials](https://flowpipe.io/docs/run/credentials).
47+
For more information on connections in Flowpipe, please see [Managing Connections](https://flowpipe.io/docs/run/connections).
4848

4949
## Usage
5050

0 commit comments

Comments
 (0)