Skip to content

Commit 8873fa0

Browse files
patch - update docs: specify which resources require admin token (#149)
1 parent 205d0ec commit 8873fa0

23 files changed

+45
-40
lines changed

codefresh/cfclient/user.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ func (client *Client) GetAllUsers() (*[]User, error) {
228228
var allUsers []User
229229

230230
for !bIsDone {
231-
var userPaginatedResp struct{Docs []User `json:"docs"`}
231+
var userPaginatedResp struct {
232+
Docs []User `json:"docs"`
233+
}
232234

233235
opts := RequestOptions{
234236
Path: fmt.Sprintf("/admin/user?limit=%d&page=%d", limitPerQuery, nPageIndex),
@@ -248,7 +250,7 @@ func (client *Client) GetAllUsers() (*[]User, error) {
248250
}
249251

250252
if len(userPaginatedResp.Docs) > 0 {
251-
allUsers = append(allUsers,userPaginatedResp.Docs...)
253+
allUsers = append(allUsers, userPaginatedResp.Docs...)
252254
nPageIndex++
253255
} else {
254256
bIsDone = true

codefresh/data_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func dataSourceAccount() *schema.Resource {
1111
return &schema.Resource{
12-
Description: "This data source retrieves an account by _id or name.",
12+
Description: "This data source retrieves an account by _id or name. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.",
1313
Read: dataSourceAccountRead,
1414
Schema: map[string]*schema.Schema{
1515
"_id": {

codefresh/data_account_gitops_settings.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ func dataSourceAccountGitopsSettings() *schema.Resource {
1313
Read: dataSourceAccountGitopsSettingsRead,
1414
Schema: map[string]*schema.Schema{
1515
"id": {
16-
Type: schema.TypeString,
16+
Type: schema.TypeString,
1717
Description: "Account Id",
18-
Computed: true,
18+
Computed: true,
1919
},
2020
"name": {
21-
Type: schema.TypeString,
22-
Computed: true,
21+
Type: schema.TypeString,
22+
Computed: true,
2323
Description: "Account name for active account",
2424
},
2525
"git_provider": {
26-
Type: schema.TypeString,
27-
Computed: true,
26+
Type: schema.TypeString,
27+
Computed: true,
2828
Description: "Git provider name",
2929
},
3030
"git_provider_api_url": {
31-
Type: schema.TypeString,
32-
Computed: true,
31+
Type: schema.TypeString,
32+
Computed: true,
3333
Description: "Git provider API url",
3434
},
3535
"shared_config_repository": {
36-
Type: schema.TypeString,
37-
Computed: true,
36+
Type: schema.TypeString,
37+
Computed: true,
3838
Description: "Shared config repository url",
3939
},
4040
"admins": {

codefresh/data_idps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func dataSourceIdps() *schema.Resource {
1212
return &schema.Resource{
13-
Description: "This data source retrieves all Identity Providers (IdPs) in the system.",
13+
Description: "This data source retrieves all Identity Providers (IdPs) in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.",
1414
Read: dataSourceIdpRead,
1515
Schema: IdpSchema(),
1616
}

codefresh/data_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
func dataSourceUser() *schema.Resource {
1212
return &schema.Resource{
13-
Description: "This data source retrieves a user by email.",
13+
Description: "This data source retrieves a user by email. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.",
1414
Read: dataSourceUserRead,
1515
Schema: *UserSchema(),
1616
}

codefresh/data_users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func dataSourceUsers() *schema.Resource {
1111
return &schema.Resource{
12-
Description: "This data source retrieves all users in the system.",
12+
Description: "This data source retrieves all users in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.",
1313
Read: dataSourceUsersRead,
1414
Schema: map[string]*schema.Schema{
1515
"users": {

codefresh/resource_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
func resourceAccount() *schema.Resource {
99
return &schema.Resource{
1010
Description: `
11-
By creating different accounts for different teams within the same company a customer can achieve complete segregation of assets between the teams.
11+
By creating different accounts for different teams within the same company a customer can achieve complete segregation of assets between the teams. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.
1212
`,
1313
Create: resourceAccountCreate,
1414
Read: resourceAccountRead,

codefresh/resource_account_admins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
func resourceAccountAdmins() *schema.Resource {
1010
return &schema.Resource{
1111
Description: `
12-
Use this resource to set a list of admins for any account.
12+
Use this resource to set a list of admins for any account. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.
1313
`,
1414
Create: resourceAccountAdminsCreate,
1515
Read: resourceAccountAdminsRead,

codefresh/resource_account_gitops_settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ func resourceAccountGitopsSettings() *schema.Resource {
2424
Delete: resourceAccountGitopsSettingsDelete,
2525
Schema: map[string]*schema.Schema{
2626
"id": {
27-
Type: schema.TypeString,
27+
Type: schema.TypeString,
2828
Description: "Account Id",
29-
Computed: true,
29+
Computed: true,
3030
},
3131
"name": {
3232
Type: schema.TypeString,

codefresh/resource_api_key.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func resourceApiKey() *schema.Resource {
1414
return &schema.Resource{
1515
Description: `
1616
Manages an API Key tied to an Account and a User.
17+
Requires a Codefresh admin token and applies only to Codefresh on-premises installations.
1718
`,
1819
Create: resourceApiKeyCreate,
1920
Read: resourceApiKeyRead,

0 commit comments

Comments
 (0)