Skip to content

Commit

Permalink
update docs - specify which resources require admin token
Browse files Browse the repository at this point in the history
  • Loading branch information
ilia-medvedev-codefresh committed Jul 10, 2024
1 parent 4ed8435 commit 0b4167c
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion codefresh/data_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.",
Read: dataSourceAccountRead,
Schema: map[string]*schema.Schema{
"_id": {
Expand Down
2 changes: 1 addition & 1 deletion codefresh/data_idps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.",
Read: dataSourceIdpRead,
Schema: IdpSchema(),
}
Expand Down
2 changes: 1 addition & 1 deletion codefresh/data_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.",
Read: dataSourceUserRead,
Schema: *UserSchema(),
}
Expand Down
2 changes: 1 addition & 1 deletion codefresh/data_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.",
Read: dataSourceUsersRead,
Schema: map[string]*schema.Schema{
"users": {
Expand Down
2 changes: 1 addition & 1 deletion codefresh/resource_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
`,
Create: resourceAccountCreate,
Read: resourceAccountRead,
Expand Down
2 changes: 1 addition & 1 deletion codefresh/resource_account_admins.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
`,
Create: resourceAccountAdminsCreate,
Read: resourceAccountAdminsRead,
Expand Down
1 change: 1 addition & 0 deletions codefresh/resource_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func resourceApiKey() *schema.Resource {
return &schema.Resource{
Description: `
Manages an API Key tied to an Account and a User.
Requires Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
`,
Create: resourceApiKeyCreate,
Read: resourceApiKeyRead,
Expand Down
2 changes: 1 addition & 1 deletion codefresh/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.",
Create: resourceUsersCreate,
Read: resourceUsersRead,
Update: resourceUsersUpdate,
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
---

# 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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.

## Example Usage

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/idps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-

# 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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.

## Example Usage

Expand Down Expand Up @@ -55,7 +55,7 @@ resource "codefresh_user" "user1" {
idp_id = data.codefresh_idps.idp_azure.id
sso = true
}
login {
idp_id = data.codefresh_idps.local.id
//sso = false
Expand Down Expand Up @@ -99,4 +99,4 @@ resource "codefresh_idp_accounts" "acc_idp" {
- `cookie_key` (String)
- `id` (String) The ID of this resource.
- `scopes` (Set of String)
- `tenant` (String)
- `tenant` (String)
4 changes: 2 additions & 2 deletions docs/data-sources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
---

# codefresh_user (Data Source)
Expand Down Expand Up @@ -88,4 +88,4 @@ Read-Only:

Read-Only:

- `user_name` (String)
- `user_name` (String)
4 changes: 2 additions & 2 deletions docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
---

# codefresh_users (Data Source)
Expand Down Expand Up @@ -81,4 +81,4 @@ Read-Only:

Read-Only:

- `user_name` (String)
- `user_name` (String)
4 changes: 2 additions & 2 deletions docs/resources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-

# 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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.

See the [documentation](https://codefresh.io/docs/docs/administration/account-user-management/).

Expand Down Expand Up @@ -86,4 +86,4 @@ Optional:
## Import
```sh
terraform import codefresh_account.test xxxxxxxxxxxxxxxxxxx
```
```
4 changes: 2 additions & 2 deletions docs/resources/account_admins.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-

# 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 Codefresh admin token and hence is relevant only for on premise installations of Codefresh.

## Example usage

Expand Down Expand Up @@ -72,4 +72,4 @@ resource "codefresh_account_admins" "test" {

```sh
terraform import codefresh_account_admins.test xxxxxxxxxxxxxxxxxxx
```
```
2 changes: 1 addition & 1 deletion docs/resources/account_gitops_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 5 additions & 3 deletions docs/resources/api_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
page_title: "codefresh_api_key Resource - terraform-provider-codefresh"
subcategory: ""
description: |-
Manages an API Key tied to an Account and a User. Requires Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
Manages an API Key tied to an Account and a User.
Requires Codefresh admin token and hence is relevant only for on premise installations of Codefresh.
---

# codefresh_api_key (Resource)

Manages an API Key tied to an Account and a User.
Requires Codefresh admin token and hence is relevant only for on premise installations of Codefresh.

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.
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.


Expand Down Expand Up @@ -106,4 +108,4 @@ resource "codefresh_team" "team_1" {
### Read-Only

- `id` (String) The ID of this resource.
- `token` (String, Sensitive) The resulting API key.
- `token` (String, Sensitive) The resulting API key.
5 changes: 3 additions & 2 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-

# codefresh_user (Resource)

This resource is used to manage a Codefresh user.
This resource is used to manage a Codefresh user. Requires Codefresh admin token and hence is relevant only for on premise installations of Codefresh.



Expand Down Expand Up @@ -43,7 +43,7 @@ resource "codefresh_user" "new" {
idp_id = data.codefresh_idps.idp_azure.id
sso = true
}
login {
idp_id = data.codefresh_idps.local.id
//sso = false
Expand Down Expand Up @@ -119,3 +119,4 @@ Read-Only:
```sh
terraform import codefresh_user.new xxxxxxxxxxxxxxxxxxx
```

0 comments on commit 0b4167c

Please sign in to comment.