This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
222 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sonarcloud_quality_gate Data Source - terraform-provider-sonarcloud" | ||
subcategory: "" | ||
description: |- | ||
This Data Source retrieves a single Quality Gate for the configured Organization. | ||
--- | ||
|
||
# sonarcloud_quality_gate (Data Source) | ||
|
||
This Data Source retrieves a single Quality Gate for the configured Organization. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "sonarcloud_quality_gate" "awesome" { | ||
name = "my_awesome_quality_gate" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the Quality Gate | ||
|
||
### Optional | ||
|
||
- `conditions` (Attributes List) The conditions of this quality gate. (see [below for nested schema](#nestedatt--conditions)) | ||
|
||
### Read-Only | ||
|
||
- `gate_id` (Number) Id created by SonarCloud | ||
- `id` (String) Id for Terraform backend | ||
- `is_built_in` (Boolean) Is this Quality gate built in? | ||
- `is_default` (Boolean) Is this the default Quality gate for this project? | ||
|
||
<a id="nestedatt--conditions"></a> | ||
### Nested Schema for `conditions` | ||
|
||
Optional: | ||
|
||
- `op` (String) Operation on which the metric is evaluated must be either: LT, GT | ||
|
||
Read-Only: | ||
|
||
- `error` (String) The value on which the condition errors. | ||
- `id` (Number) ID of the Condition. | ||
- `metric` (String) The metric on which the condition is based. Must be one of: https://docs.sonarqube.org/latest/user-guide/metric-definitions/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sonarcloud_quality_gates Data Source - terraform-provider-sonarcloud" | ||
subcategory: "" | ||
description: |- | ||
This data source retrieves all Quality Gates for the configured organization. | ||
--- | ||
|
||
# sonarcloud_quality_gates (Data Source) | ||
|
||
This data source retrieves all Quality Gates for the configured organization. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "sonarcloud_quality_gates" "all" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The index of the Quality Gate | ||
- `quality_gates` (Attributes List) A quality gate (see [below for nested schema](#nestedatt--quality_gates)) | ||
|
||
<a id="nestedatt--quality_gates"></a> | ||
### Nested Schema for `quality_gates` | ||
|
||
Optional: | ||
|
||
- `conditions` (Attributes List) The conditions of this quality gate. (see [below for nested schema](#nestedatt--quality_gates--conditions)) | ||
|
||
Read-Only: | ||
|
||
- `gate_id` (Number) Id created by SonarCloud | ||
- `id` (String) Id for Terraform backend | ||
- `is_built_in` (Boolean) Is this Quality gate built in? | ||
- `is_default` (Boolean) Is this the default Quality gate for this project? | ||
- `name` (String) Name of the Quality Gate | ||
|
||
<a id="nestedatt--quality_gates--conditions"></a> | ||
### Nested Schema for `quality_gates.conditions` | ||
|
||
Optional: | ||
|
||
- `op` (String) Operation on which the metric is evaluated must be either: LT, GT | ||
|
||
Read-Only: | ||
|
||
- `error` (String) The value on which the condition errors. | ||
- `id` (Number) ID of the Condition. | ||
- `metric` (String) The metric on which the condition is based. Must be one of: https://docs.sonarqube.org/latest/user-guide/metric-definitions/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sonarcloud_quality_gate Resource - terraform-provider-sonarcloud" | ||
subcategory: "" | ||
description: |- | ||
This resource manages a Quality Gate | ||
--- | ||
|
||
# sonarcloud_quality_gate (Resource) | ||
|
||
This resource manages a Quality Gate | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "sonarcloud_quality_gate" "awesome" { | ||
name = "My Awesome Quality Gate" | ||
is_default = true | ||
conditions = [ | ||
// Less than 100% coverage | ||
{ | ||
metric = "coverage" | ||
error = 100 | ||
Op = "LT" | ||
}, | ||
// Less than 100% coverage on new code | ||
{ | ||
metric = "new_coverage" | ||
error = 100 | ||
Op = "LT" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the Quality Gate. | ||
|
||
### Optional | ||
|
||
- `conditions` (Attributes Set) The conditions of this quality gate. (see [below for nested schema](#nestedatt--conditions)) | ||
- `is_default` (Boolean) Defines whether the quality gate is the defualt gate for an organization. **WARNING**: Must be assigned to one quality gate per organization at all times | ||
|
||
### Read-Only | ||
|
||
- `gate_id` (Number) Id computed by SonarCloud servers | ||
- `id` (String) Implicit Terraform ID | ||
- `is_built_in` (Boolean) Defines whether the quality gate is built in. | ||
|
||
<a id="nestedatt--conditions"></a> | ||
### Nested Schema for `conditions` | ||
|
||
Required: | ||
|
||
- `error` (String) The value on which the condition errors. | ||
- `metric` (String) The metric on which the condition is based. Must be one of: https://docs.sonarqube.org/latest/user-guide/metric-definitions/ | ||
|
||
Optional: | ||
|
||
- `op` (String) Operation on which the metric is evaluated must be either: LT, GT | ||
|
||
Read-Only: | ||
|
||
- `id` (Number) Index/ID of the Condition. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sonarcloud_quality_gate_selection Resource - terraform-provider-sonarcloud" | ||
subcategory: "" | ||
description: |- | ||
This resource selects a quality gate for one or more projects | ||
--- | ||
|
||
# sonarcloud_quality_gate_selection (Resource) | ||
|
||
This resource selects a quality gate for one or more projects | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "sonarcloud_quality_gate" "awesome_qg" { | ||
name = "my_awesome_quality_gate" | ||
} | ||
data "sonarcloud_projects" "all" {} | ||
resource "sonarcloud_quality_gate_selection" "example_quality_gate_selection" { | ||
gate_id = data.sonarcloud_quality_gate.awesome_qg.gate_id | ||
project_keys = [for project in data.sonarcloud_projects.all : project.key if project.name == "My Awesome Project"] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `gate_id` (String) The ID of the quality gate that is selected for the project(s). | ||
- `project_keys` (Set of String) The Keys of the projects which have been selected on the referenced quality gate | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The implicit ID of the resource | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters