diff --git a/codefresh/cfclient/user.go b/codefresh/cfclient/user.go index 37d47692..ec42b52a 100644 --- a/codefresh/cfclient/user.go +++ b/codefresh/cfclient/user.go @@ -228,7 +228,9 @@ func (client *Client) GetAllUsers() (*[]User, error) { var allUsers []User for !bIsDone { - var userPaginatedResp struct{Docs []User `json:"docs"`} + var userPaginatedResp struct { + Docs []User `json:"docs"` + } opts := RequestOptions{ Path: fmt.Sprintf("/admin/user?limit=%d&page=%d", limitPerQuery, nPageIndex), @@ -248,7 +250,7 @@ func (client *Client) GetAllUsers() (*[]User, error) { } if len(userPaginatedResp.Docs) > 0 { - allUsers = append(allUsers,userPaginatedResp.Docs...) + allUsers = append(allUsers, userPaginatedResp.Docs...) nPageIndex++ } else { bIsDone = true diff --git a/codefresh/data_account.go b/codefresh/data_account.go index a8875a89..0741b3d1 100644 --- a/codefresh/data_account.go +++ b/codefresh/data_account.go @@ -9,7 +9,7 @@ import ( func dataSourceAccount() *schema.Resource { return &schema.Resource{ - Description: "This data source retrieves an account by _id or name.", + Description: "This data source retrieves an account by _id or name. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.", Read: dataSourceAccountRead, Schema: map[string]*schema.Schema{ "_id": { diff --git a/codefresh/data_account_gitops_settings.go b/codefresh/data_account_gitops_settings.go index 4245a580..7875786b 100644 --- a/codefresh/data_account_gitops_settings.go +++ b/codefresh/data_account_gitops_settings.go @@ -13,28 +13,28 @@ func dataSourceAccountGitopsSettings() *schema.Resource { Read: dataSourceAccountGitopsSettingsRead, Schema: map[string]*schema.Schema{ "id": { - Type: schema.TypeString, + Type: schema.TypeString, Description: "Account Id", - Computed: true, + Computed: true, }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, Description: "Account name for active account", }, "git_provider": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, Description: "Git provider name", }, "git_provider_api_url": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, Description: "Git provider API url", }, "shared_config_repository": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, Description: "Shared config repository url", }, "admins": { diff --git a/codefresh/data_idps.go b/codefresh/data_idps.go index 0d1ca682..675d2bf0 100644 --- a/codefresh/data_idps.go +++ b/codefresh/data_idps.go @@ -10,7 +10,7 @@ import ( func dataSourceIdps() *schema.Resource { return &schema.Resource{ - Description: "This data source retrieves all Identity Providers (IdPs) in the system.", + 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.", Read: dataSourceIdpRead, Schema: IdpSchema(), } diff --git a/codefresh/data_user.go b/codefresh/data_user.go index 732646c3..ecdebbe9 100644 --- a/codefresh/data_user.go +++ b/codefresh/data_user.go @@ -10,7 +10,7 @@ import ( func dataSourceUser() *schema.Resource { return &schema.Resource{ - Description: "This data source retrieves a user by email.", + Description: "This data source retrieves a user by email. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.", Read: dataSourceUserRead, Schema: *UserSchema(), } diff --git a/codefresh/data_users.go b/codefresh/data_users.go index 5ae44de5..be01692b 100644 --- a/codefresh/data_users.go +++ b/codefresh/data_users.go @@ -9,7 +9,7 @@ import ( func dataSourceUsers() *schema.Resource { return &schema.Resource{ - Description: "This data source retrieves all users in the system.", + Description: "This data source retrieves all users in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.", Read: dataSourceUsersRead, Schema: map[string]*schema.Schema{ "users": { diff --git a/codefresh/resource_account.go b/codefresh/resource_account.go index fd19b9bd..f6a13af3 100644 --- a/codefresh/resource_account.go +++ b/codefresh/resource_account.go @@ -8,7 +8,7 @@ import ( func resourceAccount() *schema.Resource { return &schema.Resource{ Description: ` - By creating different accounts for different teams within the same company a customer can achieve complete segregation of assets between the teams. + 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. `, Create: resourceAccountCreate, Read: resourceAccountRead, diff --git a/codefresh/resource_account_admins.go b/codefresh/resource_account_admins.go index b5c777e6..a8060127 100644 --- a/codefresh/resource_account_admins.go +++ b/codefresh/resource_account_admins.go @@ -9,7 +9,7 @@ import ( func resourceAccountAdmins() *schema.Resource { return &schema.Resource{ Description: ` - Use this resource to set a list of admins for any account. + 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. `, Create: resourceAccountAdminsCreate, Read: resourceAccountAdminsRead, diff --git a/codefresh/resource_account_gitops_settings.go b/codefresh/resource_account_gitops_settings.go index 81dd852d..49e9f8bb 100644 --- a/codefresh/resource_account_gitops_settings.go +++ b/codefresh/resource_account_gitops_settings.go @@ -24,9 +24,9 @@ func resourceAccountGitopsSettings() *schema.Resource { Delete: resourceAccountGitopsSettingsDelete, Schema: map[string]*schema.Schema{ "id": { - Type: schema.TypeString, + Type: schema.TypeString, Description: "Account Id", - Computed: true, + Computed: true, }, "name": { Type: schema.TypeString, diff --git a/codefresh/resource_api_key.go b/codefresh/resource_api_key.go index 8b8935d7..6a8e45f2 100644 --- a/codefresh/resource_api_key.go +++ b/codefresh/resource_api_key.go @@ -14,6 +14,7 @@ func resourceApiKey() *schema.Resource { return &schema.Resource{ Description: ` Manages an API Key tied to an Account and a User. + Requires a Codefresh admin token and applies only to Codefresh on-premises installations. `, Create: resourceApiKeyCreate, Read: resourceApiKeyRead, diff --git a/codefresh/resource_idp.go b/codefresh/resource_idp.go index 49af78a9..105a2e86 100644 --- a/codefresh/resource_idp.go +++ b/codefresh/resource_idp.go @@ -16,7 +16,7 @@ import ( func resourceIdp() *schema.Resource { return &schema.Resource{ - Description: "Codefresh global level identity provider. Requires Codefresh admin token, hence is relevant only for on-prem deployments of Codefresh", + Description: "Codefresh global level identity provider. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.", Create: resourceIDPCreate, Read: resourceIDPRead, Update: resourceIDPUpdate, diff --git a/codefresh/resource_user.go b/codefresh/resource_user.go index c73ecf02..80bbb339 100644 --- a/codefresh/resource_user.go +++ b/codefresh/resource_user.go @@ -11,7 +11,7 @@ import ( func resourceUser() *schema.Resource { return &schema.Resource{ - Description: "This resource is used to manage a Codefresh user.", + Description: "This resource is used to manage a Codefresh user. Requires a Codefresh admin token and applies only to Codefresh on-premises installations.", Create: resourceUsersCreate, Read: resourceUsersRead, Update: resourceUsersUpdate, diff --git a/docs/data-sources/account.md b/docs/data-sources/account.md index 0b531637..58ff11a4 100644 --- a/docs/data-sources/account.md +++ b/docs/data-sources/account.md @@ -2,12 +2,12 @@ page_title: "codefresh_account Data Source - terraform-provider-codefresh" subcategory: "" description: |- - This data source retrieves an account by _id or name. + This data source retrieves an account by _id or name. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_account (Data Source) -This data source retrieves an account by _id or name. +This data source retrieves an account by _id or name. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. ## Example Usage diff --git a/docs/data-sources/idps.md b/docs/data-sources/idps.md index 0008b854..a6db434b 100644 --- a/docs/data-sources/idps.md +++ b/docs/data-sources/idps.md @@ -2,12 +2,12 @@ page_title: "codefresh_idps Data Source - terraform-provider-codefresh" subcategory: "" description: |- - This data source retrieves all Identity Providers (IdPs) in the system. + This data source retrieves all Identity Providers (IdPs) in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_idps (Data Source) -This data source retrieves all Identity Providers (IdPs) in the system. +This data source retrieves all Identity Providers (IdPs) in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. ## Example Usage diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md index 127a691f..c520e218 100644 --- a/docs/data-sources/user.md +++ b/docs/data-sources/user.md @@ -2,12 +2,12 @@ page_title: "codefresh_user Data Source - terraform-provider-codefresh" subcategory: "" description: |- - This data source retrieves a user by email. + This data source retrieves a user by email. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_user (Data Source) -This data source retrieves a user by email. +This data source retrieves a user by email. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. ## Example usage diff --git a/docs/data-sources/users.md b/docs/data-sources/users.md index 4f28c6fe..6ea3bb83 100644 --- a/docs/data-sources/users.md +++ b/docs/data-sources/users.md @@ -2,12 +2,12 @@ page_title: "codefresh_users Data Source - terraform-provider-codefresh" subcategory: "" description: |- - This data source retrieves all users in the system. + This data source retrieves all users in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_users (Data Source) -This data source retrieves all users in the system. +This data source retrieves all users in the system. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. ## Example usage diff --git a/docs/resources/account.md b/docs/resources/account.md index 0bbc6856..eb07f91f 100644 --- a/docs/resources/account.md +++ b/docs/resources/account.md @@ -2,12 +2,12 @@ page_title: "codefresh_account Resource - terraform-provider-codefresh" subcategory: "" description: |- - By creating different accounts for different teams within the same company a customer can achieve complete segregation of assets between the teams. + 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. --- # codefresh_account (Resource) -By creating different accounts for different teams within the same company a customer can achieve complete segregation of assets between the teams. +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. See the [documentation](https://codefresh.io/docs/docs/administration/account-user-management/). diff --git a/docs/resources/account_admins.md b/docs/resources/account_admins.md index 207adca6..f41fec5f 100644 --- a/docs/resources/account_admins.md +++ b/docs/resources/account_admins.md @@ -2,12 +2,12 @@ page_title: "codefresh_account_admins Resource - terraform-provider-codefresh" subcategory: "" description: |- - Use this resource to set a list of admins for any account. + 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. --- # codefresh_account_admins (Resource) -Use this resource to set a list of admins for any account. +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. ## Example usage diff --git a/docs/resources/account_gitops_settings.md b/docs/resources/account_gitops_settings.md index b8be9f7d..e522b5de 100644 --- a/docs/resources/account_gitops_settings.md +++ b/docs/resources/account_gitops_settings.md @@ -41,7 +41,7 @@ resource "codefresh_account_gitops_settings" "gitops-settings" { - `id` (String) Account Id - `name` (String) Account name for active account -[!WARNING] +~> Once internal config repository is cloned successfully by one or more runtimes it can no longer be changed and all attempted updates will fail. If you need to change the repository please contact Codefresh support. diff --git a/docs/resources/api_key.md b/docs/resources/api_key.md index 48fab687..276cb1e1 100644 --- a/docs/resources/api_key.md +++ b/docs/resources/api_key.md @@ -3,11 +3,13 @@ page_title: "codefresh_api_key Resource - terraform-provider-codefresh" subcategory: "" description: |- Manages an API Key tied to an Account and a User. + Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_api_key (Resource) Manages an API Key tied to an Account and a User. + Requires a Codefresh admin token and applies only to Codefresh on-premises installations. terraform-provider-codefresh itself uses an API key, passed as provider's attribute, but it's possible to use that API Key to generate a new one. This resource requires Codefresh system admin permissions, hence is relevant for on-prem deployments of Codefresh only. diff --git a/docs/resources/idp.md b/docs/resources/idp.md index b05d1e5b..275b8223 100644 --- a/docs/resources/idp.md +++ b/docs/resources/idp.md @@ -2,12 +2,12 @@ page_title: "codefresh_idp Resource - terraform-provider-codefresh" subcategory: "" description: |- - Codefresh global level identity provider. Requires Codefresh admin token, hence is relevant only for on-prem deployments of Codefresh + Codefresh global level identity provider. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_idp (Resource) -Codefresh global level identity provider. Requires Codefresh admin token, hence is relevant only for on-prem deployments of Codefresh +Codefresh global level identity provider. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. ## Example usage ```hcl diff --git a/docs/resources/user.md b/docs/resources/user.md index bbb2e1b2..e1d56331 100644 --- a/docs/resources/user.md +++ b/docs/resources/user.md @@ -2,12 +2,12 @@ page_title: "codefresh_user Resource - terraform-provider-codefresh" subcategory: "" description: |- - This resource is used to manage a Codefresh user. + This resource is used to manage a Codefresh user. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. --- # codefresh_user (Resource) -This resource is used to manage a Codefresh user. +This resource is used to manage a Codefresh user. Requires a Codefresh admin token and applies only to Codefresh on-premises installations. diff --git a/templates/resources/account_gitops_settings.md.tmpl b/templates/resources/account_gitops_settings.md.tmpl index 1966bbf6..c2848415 100644 --- a/templates/resources/account_gitops_settings.md.tmpl +++ b/templates/resources/account_gitops_settings.md.tmpl @@ -26,7 +26,7 @@ resource "codefresh_account_gitops_settings" "gitops-settings" { {{ .SchemaMarkdown | trimspace }} -[!WARNING] +~> Once internal config repository is cloned successfully by one or more runtimes it can no longer be changed and all attempted updates will fail. If you need to change the repository please contact Codefresh support.