Skip to content

Commit

Permalink
docs: Misc documentation fixes (#133)
Browse files Browse the repository at this point in the history
## What

* Misc doc fixes.

## Why

## Notes
<!-- Add any notes here -->

## Checklist

* [x] _I have read
[CONTRIBUTING.md](https://github.com/codefresh-io/terraform-provider-codefresh/blob/master/CONTRIBUTING.md)._
* [x] _I have [allowed changes to my fork to be
made](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)._
* [x] _I have added tests, assuming new tests are warranted_.
* [x] _I understand that the `/test` comment will be ignored by the CI
trigger [unless it is made by a repo admin or
collaborator](https://codefresh.io/docs/docs/pipelines/triggers/git-triggers/#support-for-building-pull-requests-from-forks)._
  • Loading branch information
korenyoni authored Jan 29, 2024
1 parent 00721ed commit 866dfa9
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 53 deletions.
12 changes: 6 additions & 6 deletions codefresh/resource_abac_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var validSetValues = []string{"REFRESH", "SYNC", "TERMINATE_SYNC", "VIEW_POD_LOG

func resourceGitopsAbacRule() *schema.Resource {
return &schema.Resource{
Description: "Gitops Abac Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.",
Description: "Gitops ABAC Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.",
Create: resourceGitopsAbacRuleCreate,
Read: resourceGitopsAbacRuleRead,
Update: resourceGitopsAbacRuleUpdate,
Expand All @@ -32,7 +32,7 @@ func resourceGitopsAbacRule() *schema.Resource {
},
"entity_type": {
Description: `
The type of resources the abac rules applies to. Possible values:
The type of resources the ABAC rules applies to. Possible values:
* gitopsApplications
`,
Type: schema.TypeString,
Expand All @@ -42,16 +42,16 @@ The type of resources the abac rules applies to. Possible values:
}, false),
},
"teams": {
Description: "The Ids of teams the abac rules apply to.",
Description: "The IDs of the teams the ABAC rules apply to.",
Type: schema.TypeSet,
Required: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"tags": {
Description: `
The effective tags to apply the permission. It supports 2 custom tags:
* untagged is a “tag” which refers to all resources that don't have any tag.
* (the star character) means all tags.
The effective tags of the resource to apply the permission to. There are two special tags:
* untagged: Apply to all resources without tags.
* * (asterisk): Apply to all resources with any tag.
`,
Type: schema.TypeSet,
Optional: true,
Expand Down
12 changes: 6 additions & 6 deletions codefresh/resource_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func resourceAccount() *schema.Resource {
Description: `
Features toggles for this account. Default:
OfflineLogging: true
ssoManagement: true
teamsManagement: true
abac: true
customKubernetesCluster: true
* OfflineLogging: true
* ssoManagement: true
* teamsManagement: true
* abac: true
* customKubernetesCluster: true
`,
Type: schema.TypeMap,
Optional: true,
Expand All @@ -58,7 +58,7 @@ customKubernetesCluster: true
Required: true,
},
"data_retention_weeks": {
Description: "Specifies how long, in weeks, the builds be stored (default: `5`).",
Description: "Specifies the number of weeks for which to store the builds (default: `5`).",
Type: schema.TypeInt,
Optional: true,
Default: 5,
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 @@ -20,7 +20,7 @@ func resourceAccountAdmins() *schema.Resource {
},
Schema: map[string]*schema.Schema{
"account_id": {
Description: "The account id where to set up a list of admins.",
Description: "The account ID for which to set up the list of admins.",
Type: schema.TypeString,
Required: true,
},
Expand Down
2 changes: 1 addition & 1 deletion codefresh/resource_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func getConflictingContexts(context string) []string {

func resourceContext() *schema.Resource {
return &schema.Resource{
Description: "A Context is an authentication/configuration that is used by the Codefresh system and engine.",
Description: "A Context is an authentication/configuration resource used by the Codefresh system and engine.",
Create: resourceContextCreate,
Read: resourceContextRead,
Update: resourceContextUpdate,
Expand Down
8 changes: 4 additions & 4 deletions codefresh/resource_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func resourcePermission() *schema.Resource {
return &schema.Resource{
Description: "Permission are used to setup access control and allow to define which teams have access to which clusters and pipelines based on tags.",
Description: "Permissions are used to set up access control and define which teams have access to which clusters and pipelines based on tags.",
Create: resourcePermissionCreate,
Read: resourcePermissionRead,
Update: resourcePermissionUpdate,
Expand Down Expand Up @@ -85,9 +85,9 @@ Action to be allowed. Possible values:
},
"tags": {
Description: `
The effective tags to apply the permission. It supports 2 custom tags:
* untagged is a “tag” which refers to all clusters that don't have any tag.
* (the star character) means all tags.
The tags for which to apply the permission. Supports two custom tags:
* untagged: Apply to all resources without tags
* (asterisk): Apply to all resources with any tag
`,
Type: schema.TypeSet,
Optional: true,
Expand Down
18 changes: 9 additions & 9 deletions docs/resources/abac_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
page_title: "codefresh_abac_rules Resource - terraform-provider-codefresh"
subcategory: ""
description: |-
Gitops Abac Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.
Gitops ABAC Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.
---

# codefresh_abac_rules (Resource)

Gitops Abac Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.
Gitops ABAC Rules are used to setup access control and allow to define which teams have access to which resources based on tags and attributes.

See the [Access Control documentation](https://codefresh.io/docs/docs/administration/account-user-management/access-control/).
See the [GitOps Access Control documentation](https://codefresh.io/docs/docs/administration/account-user-management/gitops-abac/).

## Example usage

Expand Down Expand Up @@ -48,17 +48,17 @@ resource "codefresh_abac_rules" "app_rule" {
* TERMINATE_SYNC
* VIEW_POD_LOGS
* APP_ROLLBACK
- `entity_type` (String) The type of resources the abac rules applies to. Possible values:
- `entity_type` (String) The type of resources the ABAC rules applies to. Possible values:
* gitopsApplications
- `teams` (Set of String) The Ids of teams the abac rules apply to.
- `teams` (Set of String) The IDs of the teams the ABAC rules apply to.

### Optional

- `attribute` (Block List) Resource attribute that need to be validated (see [below for nested schema](#nestedblock--attribute))
- `id` (String) The abac rule ID.
- `tags` (Set of String) The effective tags to apply the permission. It supports 2 custom tags:
* untagged is a “tag” which refers to all resources that don't have any tag.
* (the star character) means all tags.
- `tags` (Set of String) The effective tags of the resource to apply the permission to. There are two special tags:
* untagged: Apply to all resources without tags.
* * (asterisk): Apply to all resources with any tag.

<a id="nestedblock--attribute"></a>
### Nested Schema for `attribute`
Expand All @@ -70,4 +70,4 @@ Required:

Optional:

- `key` (String)
- `key` (String)
12 changes: 6 additions & 6 deletions docs/resources/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ resource "codefresh_account" "test" {
- `build` (Block List) Build limits for this account. (see [below for nested schema](#nestedblock--build))
- `features` (Map of Boolean) Features toggles for this account. Default:

OfflineLogging: true
ssoManagement: true
teamsManagement: true
abac: true
customKubernetesCluster: true
* OfflineLogging: true
* ssoManagement: true
* teamsManagement: true
* abac: true
* customKubernetesCluster: true
- `limits` (Block List) Limits for this account. (see [below for nested schema](#nestedblock--limits))

### Read-Only
Expand Down Expand Up @@ -81,7 +81,7 @@ Required:

Optional:

- `data_retention_weeks` (Number) Specifies how long, in weeks, the builds be stored (default: `5`).
- `data_retention_weeks` (Number) Specifies the number of weeks for which to store the builds (default: `5`).

## Import
```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/account_admins.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource "codefresh_account_admins" "test" {

### Required

- `account_id` (String) The account id where to set up a list of admins.
- `account_id` (String) The account ID for which to set up the list of admins.
- `users` (Set of String) A list of users to set up as account admins.

### Read-Only
Expand Down
15 changes: 8 additions & 7 deletions docs/resources/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
page_title: "codefresh_context Resource - terraform-provider-codefresh"
subcategory: ""
description: |-
A Context is an authentication/configuration that is used by the Codefresh system and engine.
A Context is an authentication/configuration resource used by the Codefresh system and engine.
---

# codefresh_context (Resource)

A Context is an authentication/configuration that is used by the Codefresh system and engine.
A Context is an authentication/configuration resource used by the Codefresh system and engine.

## Supported types

There are multiple types of context available in Codefresh but they all have the following main components to define them:
Codefresh supports multiple types of Contexts, all of which share the following components:

* `Name`: A unique identifier for the context
* `Type`: A string representing the type of context
* `Data`: A data structure that provide the information related to the Context. This differs based on the type of context selected
For more details of the Context spec see in the [CLI official documentation](https://codefresh-io.github.io/cli/contexts/spec/)
* `Data`: A data structure that provides the information related to the Context. This differs based on the type of Context selected.

For more details of the Context spec, please refer to the [official Codefresh CLI documentation](https://codefresh-io.github.io/cli/contexts/spec/)

Currently the provider supports the following types of Context:

Expand All @@ -26,7 +27,7 @@ Currently the provider supports the following types of Context:
* `secret-yaml` (Secret YAML Configuration Context)

### Shared Configuration
A Shared Configuration is the entity in Codefresh that allow to create values in a central place that can then be consumed in pipelines to keep them DRY.
A Shared Configuration is the entity in Codefresh where you can create values in a centralized location, and then consume in pipelines to keep them [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).
More details in the official [Shared Configuration documentation](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/)

### Example Usage
Expand Down Expand Up @@ -225,4 +226,4 @@ Required:

Required:

- `data` (String) The YAML string representing the shared config.
- `data` (String) The YAML string representing the shared config.
10 changes: 5 additions & 5 deletions docs/resources/permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
page_title: "codefresh_permission Resource - terraform-provider-codefresh"
subcategory: ""
description: |-
Permission are used to setup access control and allow to define which teams have access to which clusters and pipelines based on tags.
Permissions are used to set up access control and define which teams have access to which clusters and pipelines based on tags.
---

# codefresh_permission (Resource)

Permission are used to setup access control and allow to define which teams have access to which clusters and pipelines based on tags.
Permissions are used to set up access control and define which teams have access to which clusters and pipelines based on tags.

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

Expand Down Expand Up @@ -59,9 +59,9 @@ resource "codefresh_permission" "developers" {
- `_id` (String) The permission ID.
- `related_resource` (String) Specifies the resource to use when evaluating the tags. Possible values:
* project
- `tags` (Set of String) The effective tags to apply the permission. It supports 2 custom tags:
* untagged is a “tag” which refers to all clusters that don't have any tag.
* (the star character) means all tags.
- `tags` (Set of String) The tags for which to apply the permission. Supports two custom tags:
* untagged: Apply to all resources without tags
* (asterisk): Apply to all resources with any tag

### Read-Only

Expand Down
4 changes: 2 additions & 2 deletions templates/resources/abac_rules.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-

{{ .Description | trimspace }}

See the [Access Control documentation](https://codefresh.io/docs/docs/administration/account-user-management/access-control/).
See the [GitOps Access Control documentation](https://codefresh.io/docs/docs/administration/account-user-management/gitops-abac/).

## Example usage

Expand Down Expand Up @@ -37,4 +37,4 @@ resource "codefresh_abac_rules" "app_rule" {

```

{{ .SchemaMarkdown | trimspace }}
{{ .SchemaMarkdown | trimspace }}
11 changes: 6 additions & 5 deletions templates/resources/context.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ description: |-

## Supported types

There are multiple types of context available in Codefresh but they all have the following main components to define them:
Codefresh supports multiple types of Contexts, all of which share the following components:

* `Name`: A unique identifier for the context
* `Type`: A string representing the type of context
* `Data`: A data structure that provide the information related to the Context. This differs based on the type of context selected
For more details of the Context spec see in the [CLI official documentation](https://codefresh-io.github.io/cli/contexts/spec/)
* `Data`: A data structure that provides the information related to the Context. This differs based on the type of Context selected.

For more details of the Context spec, please refer to the [official Codefresh CLI documentation](https://codefresh-io.github.io/cli/contexts/spec/)

Currently the provider supports the following types of Context:

Expand All @@ -26,7 +27,7 @@ Currently the provider supports the following types of Context:
* `secret-yaml` (Secret YAML Configuration Context)

### Shared Configuration
A Shared Configuration is the entity in Codefresh that allow to create values in a central place that can then be consumed in pipelines to keep them DRY.
A Shared Configuration is the entity in Codefresh where you can create values in a centralized location, and then consume in pipelines to keep them [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).
More details in the official [Shared Configuration documentation](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/)

### Example Usage
Expand Down Expand Up @@ -95,4 +96,4 @@ resource "codefresh_context" "test-secret-yaml" {
}
```

{{ .SchemaMarkdown | trimspace }}
{{ .SchemaMarkdown | trimspace }}

0 comments on commit 866dfa9

Please sign in to comment.