Skip to content

Commit

Permalink
Merge pull request #44 from jfrog/PTRENG-3923-docs
Browse files Browse the repository at this point in the history
Add subcategory in docs
  • Loading branch information
danielmkn authored May 2, 2022
2 parents 489b52b + fbae3d6 commit 0a0a7d2
Show file tree
Hide file tree
Showing 14 changed files with 267 additions and 177 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.1.1 (Apr 29, 2022). Tested on Artifactory 7.37.15 and Xray 3.47.3

IMPROVEMENTS:

* documentation reorganized, added subcategories and templates.
[GH-44](https://github.com/jfrog/terraform-provider-xray/pull/44).


## 1.1.0 (Apr 15, 2022). Tested on Artifactory 7.37.14 and Xray 3.47.3

IMPROVEMENTS:
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,5 @@ provider "xray" {

### Optional

- **access_token** (String, Sensitive) This is a bearer token that can be given to you by your admin under `Identity and Access`
- **url** (String) URL of Artifactory. This can also be sourced from the `XRAY_URL` or `JFROG_URL` environment variable. Default to 'http://localhost:8081' if not set.
- `access_token` (String, Sensitive) This is a bearer token that can be given to you by your admin under `Identity and Access`
- `url` (String) URL of Artifactory. This can also be sourced from the `XRAY_URL` or `JFROG_URL` environment variable. Default to 'http://localhost:8081' if not set.
70 changes: 35 additions & 35 deletions docs/resources/license_policy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xray_license_policy Resource - terraform-provider-xray"
subcategory: ""
description: |-
Creates an Xray policy using V2 of the underlying APIs. Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens
subcategory: "Policies"
---

# xray_license_policy (Resource)
Creates an Xray Policy using V2 of the underlying APIs.
Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens).

[Official documentation](https://www.jfrog.com/confluence/display/JFROG/Creating+Xray+Policies+and+Rules).

[API documentation](https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-CreatePolicy).

Creates an Xray policy using V2 of the underlying APIs. Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens

## Example Usage

Expand Down Expand Up @@ -88,70 +90,68 @@ resource "xray_license_policy" "banned_licenses" {

### Required

- **name** (String) Name of the policy (must be unique)
- **rule** (Block List, Min: 1) Nested block describing a policy rule. Described below (see [below for nested schema](#nestedblock--rule))
- **type** (String) Type of the policy
- `name` (String) Name of the policy (must be unique)
- `rule` (Block List, Min: 1) Nested block describing a policy rule. Described below (see [below for nested schema](#nestedblock--rule))
- `type` (String) Type of the policy

### Optional

- **description** (String) More verbose description of the policy
- **id** (String) The ID of this resource.
- `description` (String) More verbose description of the policy
- `id` (String) The ID of this resource.

### Read-Only

- **author** (String) User, who created the policy
- **created** (String) Creation timestamp
- **modified** (String) Modification timestamp
- `author` (String) User, who created the policy
- `created` (String) Creation timestamp
- `modified` (String) Modification timestamp

<a id="nestedblock--rule"></a>
### Nested Schema for `rule`

Required:

- **criteria** (Block Set, Min: 1) Nested block describing the criteria for the policy. Described below (see [below for nested schema](#nestedblock--rule--criteria))
- **name** (String) Name of the rule
- **priority** (Number) Integer describing the rule priority. Must be at least 1
- `criteria` (Block Set, Min: 1) Nested block describing the criteria for the policy. Described below (see [below for nested schema](#nestedblock--rule--criteria))
- `name` (String) Name of the rule
- `priority` (Number) Integer describing the rule priority. Must be at least 1

Optional:

- **actions** (Block Set, Max: 1) Nested block describing the actions to be applied by the policy. Described below. (see [below for nested schema](#nestedblock--rule--actions))
- `actions` (Block Set, Max: 1) Nested block describing the actions to be applied by the policy. Described below. (see [below for nested schema](#nestedblock--rule--actions))

<a id="nestedblock--rule--criteria"></a>
### Nested Schema for `rule.criteria`

Optional:

- **allow_unknown** (Boolean) A violation will be generated for artifacts with unknown licenses (`true` or `false`).
- **allowed_licenses** (Set of String) A list of OSS license names that may be attached to a component.
- **banned_licenses** (Set of String) A list of OSS license names that may not be attached to a component.
- **multi_license_permissive** (Boolean) Do not generate a violation if at least one license is valid in cases whereby multiple licenses were detected on the component
- `allow_unknown` (Boolean) A violation will be generated for artifacts with unknown licenses (`true` or `false`).
- `allowed_licenses` (Set of String) A list of OSS license names that may be attached to a component.
- `banned_licenses` (Set of String) A list of OSS license names that may not be attached to a component.
- `multi_license_permissive` (Boolean) Do not generate a violation if at least one license is valid in cases whereby multiple licenses were detected on the component


<a id="nestedblock--rule--actions"></a>
### Nested Schema for `rule.actions`

Required:

- **block_download** (Block Set, Min: 1, Max: 1) Nested block describing artifacts that should be blocked for download if a violation is triggered. Described below. (see [below for nested schema](#nestedblock--rule--actions--block_download))
- `block_download` (Block Set, Min: 1, Max: 1) Nested block describing artifacts that should be blocked for download if a violation is triggered. Described below. (see [below for nested schema](#nestedblock--rule--actions--block_download))

Optional:

- **block_release_bundle_distribution** (Boolean) Blocks Release Bundle distribution to Edge nodes if a violation is found.
- **build_failure_grace_period_in_days** (Number) Allow grace period for certain number of days. All violations will be ignored during this time. To be used only if `fail_build` is enabled.
- **create_ticket_enabled** (Boolean) Create Jira Ticket for this Policy Violation. Requires configured Jira integration.
- **custom_severity** (String) The severity of violation to be triggered if the `criteria` are met.
- **fail_build** (Boolean) Whether or not the related CI build should be marked as failed if a violation is triggered. This option is only available when the policy is applied to an `xray_watch` resource with a `type` of `builds`.
- **mails** (Set of String) A list of email addressed that will get emailed when a violation is triggered.
- **notify_deployer** (Boolean) Sends an email message to component deployer with details about the generated Violations.
- **notify_watch_recipients** (Boolean) Sends an email message to all configured recipients inside a specific watch with details about the generated Violations.
- **webhooks** (Set of String) A list of Xray-configured webhook URLs to be invoked if a violation is triggered.
- `block_release_bundle_distribution` (Boolean) Blocks Release Bundle distribution to Edge nodes if a violation is found.
- `build_failure_grace_period_in_days` (Number) Allow grace period for certain number of days. All violations will be ignored during this time. To be used only if `fail_build` is enabled.
- `create_ticket_enabled` (Boolean) Create Jira Ticket for this Policy Violation. Requires configured Jira integration.
- `custom_severity` (String) The severity of violation to be triggered if the `criteria` are met.
- `fail_build` (Boolean) Whether or not the related CI build should be marked as failed if a violation is triggered. This option is only available when the policy is applied to an `xray_watch` resource with a `type` of `builds`.
- `mails` (Set of String) A list of email addressed that will get emailed when a violation is triggered.
- `notify_deployer` (Boolean) Sends an email message to component deployer with details about the generated Violations.
- `notify_watch_recipients` (Boolean) Sends an email message to all configured recipients inside a specific watch with details about the generated Violations.
- `webhooks` (Set of String) A list of Xray-configured webhook URLs to be invoked if a violation is triggered.

<a id="nestedblock--rule--actions--block_download"></a>
### Nested Schema for `rule.actions.block_download`

Required:

- **active** (Boolean) Whether or not to block download of artifacts that meet the artifact and severity `filters` for the associated `xray_watch` resource.
- **unscanned** (Boolean) Whether or not to block download of artifacts that meet the artifact `filters` for the associated `xray_watch` resource but have not been scanned yet.


- `active` (Boolean) Whether or not to block download of artifacts that meet the artifact and severity `filters` for the associated `xray_watch` resource.
- `unscanned` (Boolean) Whether or not to block download of artifacts that meet the artifact `filters` for the associated `xray_watch` resource but have not been scanned yet.
70 changes: 35 additions & 35 deletions docs/resources/security_policy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xray_security_policy Resource - terraform-provider-xray"
subcategory: ""
description: |-
Creates an Xray policy using V2 of the underlying APIs. Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens
subcategory: "Policies"
---

# xray_security_policy (Resource)
Creates an Xray Policy using V2 of the underlying APIs.
Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens).

[Official documentation](https://www.jfrog.com/confluence/display/JFROG/Creating+Xray+Policies+and+Rules).

[API documentation](https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-CreatePolicy).

Creates an Xray policy using V2 of the underlying APIs. Please note: It's only compatible with Bearer token auth method (Identity and Access => Access Tokens

## Example Usage

Expand Down Expand Up @@ -86,50 +88,50 @@ resource "xray_security_policy" "cvss_score" {

### Required

- **name** (String) Name of the policy (must be unique)
- **rule** (Block List, Min: 1) Nested block describing security rule. Described below (see [below for nested schema](#nestedblock--rule))
- **type** (String) Type of the policy
- `name` (String) Name of the policy (must be unique)
- `rule` (Block List, Min: 1) Nested block describing security rule. Described below (see [below for nested schema](#nestedblock--rule))
- `type` (String) Type of the policy

### Optional

- **description** (String) More verbose description of the policy
- **id** (String) The ID of this resource.
- `description` (String) More verbose description of the policy
- `id` (String) The ID of this resource.

### Read-Only

- **author** (String) User, who created the policy
- **created** (String) Creation timestamp
- **modified** (String) Modification timestamp
- `author` (String) User, who created the policy
- `created` (String) Creation timestamp
- `modified` (String) Modification timestamp

<a id="nestedblock--rule"></a>
### Nested Schema for `rule`

Required:

- **criteria** (Block Set, Min: 1, Max: 1) Nested block describing the criteria for the policy. Described below. (see [below for nested schema](#nestedblock--rule--criteria))
- **name** (String) Name of the rule
- **priority** (Number) Integer describing the rule priority. Must be at least 1
- `criteria` (Block Set, Min: 1, Max: 1) Nested block describing the criteria for the policy. Described below. (see [below for nested schema](#nestedblock--rule--criteria))
- `name` (String) Name of the rule
- `priority` (Number) Integer describing the rule priority. Must be at least 1

Optional:

- **actions** (Block Set, Max: 1) Nested block describing the actions to be applied by the policy. Described below. (see [below for nested schema](#nestedblock--rule--actions))
- `actions` (Block Set, Max: 1) Nested block describing the actions to be applied by the policy. Described below. (see [below for nested schema](#nestedblock--rule--actions))

<a id="nestedblock--rule--criteria"></a>
### Nested Schema for `rule.criteria`

Optional:

- **cvss_range** (Block List, Max: 1) Nested block describing a CVS score range to be impacted. Defined below. (see [below for nested schema](#nestedblock--rule--criteria--cvss_range))
- **fix_version_dependant** (Boolean) Default value is `false`. Issues that do not have a fixed version are not generated until a fixed version is available.
- **min_severity** (String) The minimum security vulnerability severity that will be impacted by the policy.
- `cvss_range` (Block List, Max: 1) Nested block describing a CVS score range to be impacted. Defined below. (see [below for nested schema](#nestedblock--rule--criteria--cvss_range))
- `fix_version_dependant` (Boolean) Default value is `false`. Issues that do not have a fixed version are not generated until a fixed version is available.
- `min_severity` (String) The minimum security vulnerability severity that will be impacted by the policy.

<a id="nestedblock--rule--criteria--cvss_range"></a>
### Nested Schema for `rule.criteria.cvss_range`

Required:

- **from** (Number) The beginning of the range of CVS scores (from 1-10, float) to flag.
- **to** (Number) The end of the range of CVS scores (from 1-10, float) to flag.
- `from` (Number) The beginning of the range of CVS scores (from 1-10, float) to flag.
- `to` (Number) The end of the range of CVS scores (from 1-10, float) to flag.



Expand All @@ -138,25 +140,23 @@ Required:

Required:

- **block_download** (Block Set, Min: 1, Max: 1) Nested block describing artifacts that should be blocked for download if a violation is triggered. Described below. (see [below for nested schema](#nestedblock--rule--actions--block_download))
- `block_download` (Block Set, Min: 1, Max: 1) Nested block describing artifacts that should be blocked for download if a violation is triggered. Described below. (see [below for nested schema](#nestedblock--rule--actions--block_download))

Optional:

- **block_release_bundle_distribution** (Boolean) Blocks Release Bundle distribution to Edge nodes if a violation is found.
- **build_failure_grace_period_in_days** (Number) Allow grace period for certain number of days. All violations will be ignored during this time. To be used only if `fail_build` is enabled.
- **create_ticket_enabled** (Boolean) Create Jira Ticket for this Policy Violation. Requires configured Jira integration.
- **fail_build** (Boolean) Whether or not the related CI build should be marked as failed if a violation is triggered. This option is only available when the policy is applied to an `xray_watch` resource with a `type` of `builds`.
- **mails** (Set of String) A list of email addressed that will get emailed when a violation is triggered.
- **notify_deployer** (Boolean) Sends an email message to component deployer with details about the generated Violations.
- **notify_watch_recipients** (Boolean) Sends an email message to all configured recipients inside a specific watch with details about the generated Violations.
- **webhooks** (Set of String) A list of Xray-configured webhook URLs to be invoked if a violation is triggered.
- `block_release_bundle_distribution` (Boolean) Blocks Release Bundle distribution to Edge nodes if a violation is found.
- `build_failure_grace_period_in_days` (Number) Allow grace period for certain number of days. All violations will be ignored during this time. To be used only if `fail_build` is enabled.
- `create_ticket_enabled` (Boolean) Create Jira Ticket for this Policy Violation. Requires configured Jira integration.
- `fail_build` (Boolean) Whether or not the related CI build should be marked as failed if a violation is triggered. This option is only available when the policy is applied to an `xray_watch` resource with a `type` of `builds`.
- `mails` (Set of String) A list of email addressed that will get emailed when a violation is triggered.
- `notify_deployer` (Boolean) Sends an email message to component deployer with details about the generated Violations.
- `notify_watch_recipients` (Boolean) Sends an email message to all configured recipients inside a specific watch with details about the generated Violations.
- `webhooks` (Set of String) A list of Xray-configured webhook URLs to be invoked if a violation is triggered.

<a id="nestedblock--rule--actions--block_download"></a>
### Nested Schema for `rule.actions.block_download`

Required:

- **active** (Boolean) Whether or not to block download of artifacts that meet the artifact and severity `filters` for the associated `xray_watch` resource.
- **unscanned** (Boolean) Whether or not to block download of artifacts that meet the artifact `filters` for the associated `xray_watch` resource but have not been scanned yet.


- `active` (Boolean) Whether or not to block download of artifacts that meet the artifact and severity `filters` for the associated `xray_watch` resource.
- `unscanned` (Boolean) Whether or not to block download of artifacts that meet the artifact `filters` for the associated `xray_watch` resource but have not been scanned yet.
15 changes: 9 additions & 6 deletions docs/resources/settings.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xray_settings Resource - terraform-provider-xray"
subcategory: ""
description: |-
Provides an Xray DB Sync Time resource.
subcategory: "Settings"
---

# xray_settings (Resource)

Provides an Xray DB Sync Time resource.

[API documentation](https://www.jfrog.com/confluence/display/JFROG/Xray+REST+API#XrayRESTAPI-UpdateDBSyncDailyUpdateTime).


## Example Usage

```terraform
Expand All @@ -23,4 +22,8 @@ resource "xray_settings" "db_sync" {

### Required

- **db_sync_updates_time** (String) The time of the Xray DB sync daily update job. Format HH:mm
- `db_sync_updates_time` (String) The time of the Xray DB sync daily update job. Format HH:mm

### Optional

- `id` (String) The ID of this resource.
Loading

0 comments on commit 0a0a7d2

Please sign in to comment.