From cd2594ff091697c56557dc139bdcc764a4193b78 Mon Sep 17 00:00:00 2001 From: Lorne Date: Wed, 16 Oct 2024 17:51:47 +0100 Subject: [PATCH] tf provider documentation update --- docs/data-sources/sonarqube_group.md | 10 +++++-- docs/data-sources/sonarqube_portfolio.md | 13 +++++++-- docs/data-sources/sonarqube_project.md | 11 ++++++-- docs/data-sources/sonarqube_qualitygate.md | 15 +++++++--- docs/data-sources/sonarqube_qualityprofile.md | 13 +++++++-- docs/data-sources/sonarqube_rule.md | 11 ++++++-- docs/data-sources/sonarqube_user.md | 12 ++++++-- docs/index.md | 17 ++++++++--- docs/resources/sonarqube_alm_azure.md | 10 ++++++- docs/resources/sonarqube_alm_github.md | 11 ++++++-- docs/resources/sonarqube_alm_gitlab.md | 11 ++++++-- docs/resources/sonarqube_azure_binding.md | 10 ++++++- docs/resources/sonarqube_github_binding.md | 12 ++++++-- docs/resources/sonarqube_gitlab_binding.md | 10 ++++++- docs/resources/sonarqube_group.md | 9 +++++- docs/resources/sonarqube_group_member.md | 9 +++++- docs/resources/sonarqube_new_code_periods.md | 9 +++++- .../sonarqube_permission_template.md | 10 ++++++- docs/resources/sonarqube_permissions.md | 9 +++++- docs/resources/sonarqube_plugin.md | 20 +++++++++++-- docs/resources/sonarqube_portfolio.md | 28 +++++++++++++------ docs/resources/sonarqube_project.md | 27 +++++++++++++----- .../sonarqube_project_main_branch.md | 18 ++++++++++-- docs/resources/sonarqube_qualitygate.md | 13 +++++++-- ...narqube_qualitygate_project_association.md | 19 ++++++++++--- ...rqube_qualitygate_usergroup_association.md | 15 ++++++++-- docs/resources/sonarqube_qualityprofile.md | 24 ++++++++++++---- .../sonarqube_qualityprofile_activate_rule.md | 13 +++++++-- ...qube_qualityprofile_project_association.md | 23 +++++++++++---- docs/resources/sonarqube_rules.md | 11 ++++++-- docs/resources/sonarqube_settings.md | 16 +++++++++-- docs/resources/sonarqube_user.md | 11 ++++++-- .../sonarqube_user_external_identity.md | 18 ++++++++---- docs/resources/sonarqube_user_token.md | 9 +++++- docs/resources/sonarqube_webhook.md | 12 ++++++-- 35 files changed, 393 insertions(+), 96 deletions(-) diff --git a/docs/data-sources/sonarqube_group.md b/docs/data-sources/sonarqube_group.md index f14c595f..eca06269 100644 --- a/docs/data-sources/sonarqube_group.md +++ b/docs/data-sources/sonarqube_group.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_group +--- +page_title: "sonarqube_group Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube Group resource +--- + +# sonarqube_group (Data Source) Use this data source to get a Sonarqube Group resource @@ -10,7 +17,6 @@ data "sonarqube_group" "group" { } ``` - ## Argument Reference The following arguments are supported: diff --git a/docs/data-sources/sonarqube_portfolio.md b/docs/data-sources/sonarqube_portfolio.md index a30ae10d..8dfe4504 100644 --- a/docs/data-sources/sonarqube_portfolio.md +++ b/docs/data-sources/sonarqube_portfolio.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_portfolio +--- +page_title: "sonarqube_portfolio Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube portfolio resource +--- + +# sonarqube_portfolio (Data Source) Use this data source to get a Sonarqube portfolio resource @@ -24,7 +31,7 @@ The following attributes are exported: - description - Description of the portfolio - qualifier - `VW` (portfolios always have this qualifier) - visibility - Portfolio visibility -- selection_mode - How the Portfolio is populated. Possible values are ``NONE``, ``MANUAL``, ``TAGS``, ``REGEXP`` or ``REST``. [See docs](https://docs.sonarqube.org/9.8/project-administration/managing-portfolios/#populating-portfolios) for how Portfolio population works +- selection_mode - How the Portfolio is populated. Possible values are `NONE`, `MANUAL`, `TAGS`, `REGEXP` or `REST`. [See docs](https://docs.sonarqube.org/9.8/project-administration/managing-portfolios/#populating-portfolios) for how Portfolio population works - branch - Which branch is analyzed - tags - The list of tags used to populate the Portfolio. Only active when `selection_mode` is `TAGS` -- regexp - The regular expression used to populate the portfolio. Only active when `selection_mode` is `REGEXP` \ No newline at end of file +- regexp - The regular expression used to populate the portfolio. Only active when `selection_mode` is `REGEXP` diff --git a/docs/data-sources/sonarqube_project.md b/docs/data-sources/sonarqube_project.md index c81d1ad5..c4f61d09 100644 --- a/docs/data-sources/sonarqube_project.md +++ b/docs/data-sources/sonarqube_project.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_project +--- +page_title: "sonarqube_project Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube project resource +--- + +# sonarqube_project (Data Source) Use this data source to get a Sonarqube project resource @@ -22,4 +29,4 @@ The following attributes are exported: - name - Name of the project - project - Key of the project -- visibility - Project visibility \ No newline at end of file +- visibility - Project visibility diff --git a/docs/data-sources/sonarqube_qualitygate.md b/docs/data-sources/sonarqube_qualitygate.md index 814422ab..34a16dbf 100644 --- a/docs/data-sources/sonarqube_qualitygate.md +++ b/docs/data-sources/sonarqube_qualitygate.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_qualitygate +--- +page_title: "sonarqube_qualitygate Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube qualitygate resource +--- + +# sonarqube_qualitygate (Data Source) Use this data source to get a Sonarqube qualitygate resource @@ -20,7 +27,7 @@ The following arguments are supported: The following attributes are exported: -- name - The name of the Quality Gate. -- copy_from - Origin of Quality Gate. +- name - The name of the Quality Gate. +- copy_from - Origin of Quality Gate. - is_default - Quality Gate default. -- condition - List of Quality Gate conditions. +- condition - List of Quality Gate conditions. diff --git a/docs/data-sources/sonarqube_qualityprofile.md b/docs/data-sources/sonarqube_qualityprofile.md index cbf0030c..81021efa 100644 --- a/docs/data-sources/sonarqube_qualityprofile.md +++ b/docs/data-sources/sonarqube_qualityprofile.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_qualityprofile +--- +page_title: "sonarqube_qualityprofile Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube qualityprofile resource +--- + +# sonarqube_qualityprofile (Data Source) Use this data source to get a Sonarqube qualityprofile resource @@ -20,6 +27,6 @@ The following arguments are supported: The following attributes are exported: -- name - The name of the Quality Profile -- language - Quality profile language. +- name - The name of the Quality Profile +- language - Quality profile language. - is_default - Quality Profile default diff --git a/docs/data-sources/sonarqube_rule.md b/docs/data-sources/sonarqube_rule.md index e9288368..2d309d72 100644 --- a/docs/data-sources/sonarqube_rule.md +++ b/docs/data-sources/sonarqube_rule.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_rule +--- +page_title: "sonarqube_rule Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube rule resource +--- + +# sonarqube_rule (Data Source) Use this data source to get a Sonarqube rule resource @@ -25,4 +32,4 @@ The following attributes are exported: - severity - Rule severity - status - Rule status - template_key - Key of the template rule -- type - Rule type \ No newline at end of file +- type - Rule type diff --git a/docs/data-sources/sonarqube_user.md b/docs/data-sources/sonarqube_user.md index 1e048154..2a1a5cda 100644 --- a/docs/data-sources/sonarqube_user.md +++ b/docs/data-sources/sonarqube_user.md @@ -1,4 +1,11 @@ -# Data Source: sonarqube_user +--- +page_title: "sonarqube_user Data Source - terraform-provider-sonarqube" +subcategory: "" +description: |- + Use this data source to get a Sonarqube User resource +--- + +# sonarqube_user (Data Source) Use this data source to get a Sonarqube User resource @@ -10,7 +17,6 @@ data "sonarqube_user" "user" { } ``` - ## Argument Reference The following arguments are supported: @@ -23,4 +29,4 @@ The following attributes are exported: - id - The ID of the User. - login_name - The login name of the user -- email - The users email. \ No newline at end of file +- email - The users email. diff --git a/docs/index.md b/docs/index.md index 4f3ff522..29eb3c0e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,15 @@ +--- +page_title: "Sonarqube Provider" +subcategory: "" +description: |- +--- + # Provider configuration The sonarqube provider is used to configure sonarqube. The provider needs to be configured with a url, and either with user and password or token. ## Example: Authenticate with username and password + ```terraform terraform { required_providers { @@ -14,12 +21,13 @@ terraform { provider "sonarqube" { user = "admin" - pass = "admin" + pass = "admin" host = "http://127.0.0.1:9000" } ``` ## Example: Authenticate with token + ```terraform terraform { required_providers { @@ -36,15 +44,16 @@ provider "sonarqube" { ``` ## Argument Reference + The following arguments are supported: - `user` - (Optional) Sonarqube user. This can also be set via the `SONARQUBE_USER` environment variable. - `pass` - (Optional) Sonarqube pass. This can also be set via the `SONARQUBE_PASS` environment variable. - `token` - (Optional) Sonarqube token. This can also be set via the `SONARQUBE_TOKEN` environment variable. - `host` - (Required) Sonarqube url. This can be also be set via the `SONARQUBE_HOST` environment variable. -- `installed_version` - (Optional) The version of the Sonarqube server. When specified, the provider will avoid requesting this from the +- `installed_version` - (Optional) The version of the Sonarqube server. When specified, the provider will avoid requesting this from the server during the initialization process. This can be helpful when using the same Terraform code to install Sonarqube and configure it. -- `tls_insecure_skip_verify` - (Optional) Allows ignoring insecure certificates when set to true. Defaults to false. Disabling TLS verification +- `tls_insecure_skip_verify` - (Optional) Allows ignoring insecure certificates when set to true. Defaults to false. Disabling TLS verification is dangerous and should only be done for local testing. -- `anonymize_user_on_delete` - (Optional) Allows anonymizing users on destroy. Requires Sonarqube version >= `9.7`. This can be helpful +- `anonymize_user_on_delete` - (Optional) Allows anonymizing users on destroy. Requires Sonarqube version >= `9.7`. This can be helpful to comply with regulations like [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation). diff --git a/docs/resources/sonarqube_alm_azure.md b/docs/resources/sonarqube_alm_azure.md index 3a873351..0f3bd10e 100644 --- a/docs/resources/sonarqube_alm_azure.md +++ b/docs/resources/sonarqube_alm_azure.md @@ -1,4 +1,12 @@ -# sonarqube_alm_azure +--- +page_title: "sonarqube_alm_azure Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Azure Devops Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops + Platform Integration for Azure Devops. +--- + +# sonarqube_alm_azure (Resource) Provides a Sonarqube Azure Devops Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops Platform Integration for Azure Devops. diff --git a/docs/resources/sonarqube_alm_github.md b/docs/resources/sonarqube_alm_github.md index dbfff025..b0ee6818 100644 --- a/docs/resources/sonarqube_alm_github.md +++ b/docs/resources/sonarqube_alm_github.md @@ -1,4 +1,12 @@ -# sonarqube_alm_github +--- +page_title: "sonarqube_alm_github Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube GitHub Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops + Platform Integration for GitHub. +--- + +# sonarqube_alm_github (Resource) Provides a Sonarqube GitHub Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops Platform Integration for GitHub. @@ -37,4 +45,3 @@ The following attributes are exported: - client_id - GitHub App Client ID. - key - The unique key of the GitHub instance setting. - url - GitHub API URL. - diff --git a/docs/resources/sonarqube_alm_gitlab.md b/docs/resources/sonarqube_alm_gitlab.md index 89ee5e19..b72edeeb 100644 --- a/docs/resources/sonarqube_alm_gitlab.md +++ b/docs/resources/sonarqube_alm_gitlab.md @@ -1,4 +1,12 @@ -# sonarqube_alm_gitlab +--- +page_title: "sonarqube_alm_gitlab Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube GitLab Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops + Platform Integration for GitLab. +--- + +# sonarqube_alm_gitlab (Resource) Provides a Sonarqube GitLab Alm/Devops Platform Integration resource. This can be used to create and manage a Alm/Devops Platform Integration for GitLab. @@ -27,4 +35,3 @@ The following attributes are exported: - key - The unique key of the GitLab instance setting. - url - GitLab API URL. - diff --git a/docs/resources/sonarqube_azure_binding.md b/docs/resources/sonarqube_azure_binding.md index 5fb9ce9b..68b9b94b 100644 --- a/docs/resources/sonarqube_azure_binding.md +++ b/docs/resources/sonarqube_azure_binding.md @@ -1,4 +1,12 @@ -# sonarqube_azure_binding +--- +page_title: "sonarqube_azure_binding Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Azure Devops binding resource. This can be used to create and manage the binding between an + Azure Devops repository and a SonarQube project +--- + +# sonarqube_azure_binding (Resource) Provides a Sonarqube Azure Devops binding resource. This can be used to create and manage the binding between an Azure Devops repository and a SonarQube project diff --git a/docs/resources/sonarqube_github_binding.md b/docs/resources/sonarqube_github_binding.md index 55124585..6cfdf558 100644 --- a/docs/resources/sonarqube_github_binding.md +++ b/docs/resources/sonarqube_github_binding.md @@ -1,4 +1,12 @@ -# sonarqube_github_binding +--- +page_title: "sonarqube_github_binding Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube GitHub binding resource. This can be used to create and manage the binding between a + GitHub repository and a SonarQube project +--- + +# sonarqube_github_binding (Resource) Provides a Sonarqube GitHub binding resource. This can be used to create and manage the binding between a GitHub repository and a SonarQube project @@ -52,4 +60,4 @@ Bindings can be imported using their ID ```terraform terraform import sonarqube_github_binding.github-binding project/repository -``` \ No newline at end of file +``` diff --git a/docs/resources/sonarqube_gitlab_binding.md b/docs/resources/sonarqube_gitlab_binding.md index 7be9ed4e..cfff9faa 100644 --- a/docs/resources/sonarqube_gitlab_binding.md +++ b/docs/resources/sonarqube_gitlab_binding.md @@ -1,4 +1,12 @@ -# sonarqube_gitlab_binding +--- +page_title: "sonarqube_gitlab_binding Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube GitLab binding resource. This can be used to create and manage the binding between a + GitLab repository and a SonarQube project +--- + +# sonarqube_gitlab_binding (Resource) Provides a Sonarqube GitLab binding resource. This can be used to create and manage the binding between a GitLab repository and a SonarQube project diff --git a/docs/resources/sonarqube_group.md b/docs/resources/sonarqube_group.md index a0256838..9f579bb8 100644 --- a/docs/resources/sonarqube_group.md +++ b/docs/resources/sonarqube_group.md @@ -1,4 +1,11 @@ -# sonarqube_group +--- +page_title: "sonarqube_group Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Group resource. This can be used to create and manage Sonarqube Groups. +--- + +# sonarqube_group (Resource) Provides a Sonarqube Group resource. This can be used to create and manage Sonarqube Groups. diff --git a/docs/resources/sonarqube_group_member.md b/docs/resources/sonarqube_group_member.md index b4c5d212..1026ee60 100644 --- a/docs/resources/sonarqube_group_member.md +++ b/docs/resources/sonarqube_group_member.md @@ -1,4 +1,11 @@ -# sonarqube_group_member +--- +page_title: "sonarqube_group_member Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Group Member resource. This can be used to add or remove user to or from Sonarqube Groups. +--- + +# sonarqube_group_member (Resource) Provides a Sonarqube Group Member resource. This can be used to add or remove user to or from Sonarqube Groups. diff --git a/docs/resources/sonarqube_new_code_periods.md b/docs/resources/sonarqube_new_code_periods.md index eaa9170a..521788a8 100644 --- a/docs/resources/sonarqube_new_code_periods.md +++ b/docs/resources/sonarqube_new_code_periods.md @@ -1,4 +1,11 @@ -# sonarqube_new_code_periods +--- +page_title: "sonarqube_new_code_periods Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube New Code Periods resource. This can be used to manage Sonarqube New Code Periods. +--- + +# sonarqube_new_code_periods (Resource) Provides a Sonarqube New Code Periods resource. This can be used to manage Sonarqube New Code Periods. diff --git a/docs/resources/sonarqube_permission_template.md b/docs/resources/sonarqube_permission_template.md index 6a46d831..aab0d3c4 100644 --- a/docs/resources/sonarqube_permission_template.md +++ b/docs/resources/sonarqube_permission_template.md @@ -1,4 +1,12 @@ -# sonarqube_permission_template +--- +page_title: "sonarqube_permission_template Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Permission template resource. This can be used to create and manage Sonarqube Permission + templates. +--- + +# sonarqube_permission_template (Resource) Provides a Sonarqube Permission template resource. This can be used to create and manage Sonarqube Permission templates. diff --git a/docs/resources/sonarqube_permissions.md b/docs/resources/sonarqube_permissions.md index 5112a8e8..2bfb3083 100644 --- a/docs/resources/sonarqube_permissions.md +++ b/docs/resources/sonarqube_permissions.md @@ -1,4 +1,11 @@ -# sonarqube_permissions +--- +page_title: "sonarqube_permissions Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Permissions resource. This can be used to manage global and project permissions. +--- + +# sonarqube_permissions (Resource) Provides a Sonarqube Permissions resource. This can be used to manage global and project permissions. diff --git a/docs/resources/sonarqube_plugin.md b/docs/resources/sonarqube_plugin.md index b8ccb872..0abc9582 100644 --- a/docs/resources/sonarqube_plugin.md +++ b/docs/resources/sonarqube_plugin.md @@ -1,7 +1,16 @@ -# sonarqube_plugin +--- +page_title: "sonarqube_plugin Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Plugin resource. This can be used to create and manage Sonarqube Plugins. +--- + +# sonarqube_plugin (Resource) + Provides a Sonarqube Plugin resource. This can be used to create and manage Sonarqube Plugins. ## Example: create a project + ```terraform resource "sonarqube_plugin" "main" { key = "cloudformation" @@ -9,15 +18,19 @@ resource "sonarqube_plugin" "main" { ``` ## Argument Reference + The following arguments are supported: - key - (Required) The key identifying the plugin to uninstall ## Attributes Reference + The following attributes are exported: + - key - (Required) The key identifying the plugin to uninstall -## Import +## Import + Projects can be imported using their plugin key ```terraform @@ -25,4 +38,5 @@ terraform import sonarqube_plugin.main key ``` ## Notes -After installing or uninstalling a plugin, the sonarqube server needs to be restarted. \ No newline at end of file + +After installing or uninstalling a plugin, the sonarqube server needs to be restarted. diff --git a/docs/resources/sonarqube_portfolio.md b/docs/resources/sonarqube_portfolio.md index 66617af2..74216a9b 100644 --- a/docs/resources/sonarqube_portfolio.md +++ b/docs/resources/sonarqube_portfolio.md @@ -1,7 +1,16 @@ -# sonarqube_portfolio -Provides a Sonarqube Portfolio resource. This can be used to create and manage Sonarqube Portfolio. Note that the SonarQube API for Portfolios is called ``views`` +--- +page_title: "sonarqube_portfolio Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Portfolio resource. This can be used to create and manage Sonarqube Portfolio. Note that the SonarQube API for Portfolios is called ``views`` +--- + +# sonarqube_portfolio (Resource) + +Provides a Sonarqube Portfolio resource. This can be used to create and manage Sonarqube Portfolio. Note that the SonarQube API for Portfolios is called `views` ## Example: create a portfolio + ```terraform resource "sonarqube_portfolio" "main" { key = "portfolio-key" @@ -11,24 +20,25 @@ resource "sonarqube_portfolio" "main" { ``` ## Argument Reference + The following arguments are supported: - key - (Required) The key of the Portfolio to create - name - (Required) The name of the Portfolio to create - description - (Required) A description of the Portfolio to create - visibility - (Optional) Whether the created portfolio should be visible to everyone, or only specific user/groups. If no visibility is specified, the default portfolio visibility will be `public`. -- selection_mode - (Optional) How to populate the Portfolio to create. Possible values are ``NONE``, ``MANUAL``, ``TAGS``, ``REGEXP`` or ``REST``. [See docs](https://docs.sonarqube.org/9.8/project-administration/managing-portfolios/#populating-portfolios) for how Portfolio population works +- selection_mode - (Optional) How to populate the Portfolio to create. Possible values are `NONE`, `MANUAL`, `TAGS`, `REGEXP` or `REST`. [See docs](https://docs.sonarqube.org/9.8/project-administration/managing-portfolios/#populating-portfolios) for how Portfolio population works - branch - (Optional) Which branch to analyze. If nothing, or "" is specified, the main branch is used. - tags - (Optional) List of Project tags to populate the Portfolio from. Only active when `selection_mode` is `TAGS` - regexp - (Optional) A regular expression that is used to match Projects with a matching name OR key. If they match, they are added to the Portfolio -- ``selected_projects`` - (Optional) Block set of projects to add to the portfolio. Only active when `selection_mode` is `MANUAL`. See [below for nested schema](#selected_projects) +- `selected_projects` - (Optional) Block set of projects to add to the portfolio. Only active when `selection_mode` is `MANUAL`. See [below for nested schema](#selected_projects) ### selected_projects The `selected_projects` block supports the following: -* `project_key` - (Required) The key of a project to add to the portfolio -* `selected_branches` (Optional) A list of branches of the project to add to the portfolio. Defaults to the `MAIN BRANCH` of the repo if omitted +- `project_key` - (Required) The key of a project to add to the portfolio +- `selected_branches` (Optional) A list of branches of the project to add to the portfolio. Defaults to the `MAIN BRANCH` of the repo if omitted Here is an example of how this option can be leveraged: @@ -52,14 +62,16 @@ resource "sonarqube_portfolio" "portfolio" { ``` ## Attributes Reference + The following attributes are exported in addition to the arguments above: + - qualifier - (Computed) Key of the portfolio (`VW` for views) - projects - (Computed) List of projects in the portfolio (only when `selection_mode` is `MANUAL`) -## Import +## Import + Portfolios can be imported using their portfolio key ```terraform terraform import sonarqube_portfolio.main my_portfolio ``` - diff --git a/docs/resources/sonarqube_project.md b/docs/resources/sonarqube_project.md index 58e624a4..0afeea20 100644 --- a/docs/resources/sonarqube_project.md +++ b/docs/resources/sonarqube_project.md @@ -1,21 +1,31 @@ -# sonarqube_project +--- +page_title: "sonarqube_project Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Project resource. This can be used to create and manage Sonarqube Project. +--- + +# sonarqube_project (Resource) + Provides a Sonarqube Project resource. This can be used to create and manage Sonarqube Project. ## Example: create a project + ```terraform resource "sonarqube_project" "main" { name = "SonarQube" project = "my_project" - visibility = "public" + visibility = "public" } ``` ## Example: a project with associated settings + ```terraform resource "sonarqube_project" "main" { name = "SonarQube" project = "my_project" - visibility = "public" + visibility = "public" setting { key = "sonar.demo" @@ -25,11 +35,12 @@ resource "sonarqube_project" "main" { ``` ## Argument Reference + The following arguments are supported: - name - (Required) The name of the Project to create - project - (Required) Key of the project. Maximum length 400. All letters, digits, dash, underscore, period or colon. -- visibility - (Optional) Whether the created project should be visible to everyone, or only specific user/groups. If no visibility is specified, the default project visibility of the organization will be used. Valid values are `public` and `private`. +- visibility - (Optional) Whether the created project should be visible to everyone, or only specific user/groups. If no visibility is specified, the default project visibility of the organization will be used. Valid values are `public` and `private`. - tags - (Optional) A list of tags to put on the project. - setting - (Optional) The definition of a Setting to be used by this Portfolio as documented in the `setting` block below. @@ -40,16 +51,18 @@ A `setting` block supports: - values - (Optional) Multi-valued setting values - field_values - (Optional) Multi-field setting values -One of value, values, field_values _must_ be supplied +One of value, values, field*values \_must* be supplied ## Attributes Reference + The following attributes are exported: + - project - (Required) Key of the project -## Import +## Import + Projects can be imported using their project key ```terraform terraform import sonarqube_project.main my_project ``` - diff --git a/docs/resources/sonarqube_project_main_branch.md b/docs/resources/sonarqube_project_main_branch.md index 300cd171..7a862f58 100644 --- a/docs/resources/sonarqube_project_main_branch.md +++ b/docs/resources/sonarqube_project_main_branch.md @@ -1,12 +1,21 @@ -# sonarqube_project_main_branch +--- +page_title: "sonarqube_project_main_branch Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Project main branch resource. This can be used to create and manage a Sonarqube Projects main branch. +--- + +# sonarqube_project_main_branch (Resource) + Provides a Sonarqube Project main branch resource. This can be used to create and manage a Sonarqube Projects main branch. ## Example: Change the name of the main branch + ```terraform resource "sonarqube_project" "main" { name = "SonarQube" project = "my_project" - visibility = "public" + visibility = "public" } resource "sonarqube_project_main_branch" "mybranch" { name = "release" @@ -15,13 +24,16 @@ resource "sonarqube_project_main_branch" "mybranch" { ``` ## Argument Reference + The following arguments are supported: - name - (Required) The name you want the main branch to have. - project - (Required) Key of the project. Maximum length 400. All letters, digits, dash, underscore, period or colon. ## Attributes Reference + The following attributes are exported: + - name - The name of the main branch - project - Key of the project @@ -31,4 +43,4 @@ Main branch can be imported using their ID ```terraform terraform import sonarqube_project_main_branch.mybranch project/name -``` \ No newline at end of file +``` diff --git a/docs/resources/sonarqube_qualitygate.md b/docs/resources/sonarqube_qualitygate.md index 5b56c742..994b3116 100644 --- a/docs/resources/sonarqube_qualitygate.md +++ b/docs/resources/sonarqube_qualitygate.md @@ -1,4 +1,11 @@ -# sonarqube_qualitygate +--- +page_title: "sonarqube_qualitygate Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Quality Gate resource. This can be used to create and manage Sonarqube Quality Gates and their Conditions. +--- + +# sonarqube_qualitygate (Resource) Provides a Sonarqube Quality Gate resource. This can be used to create and manage Sonarqube Quality Gates and their Conditions. @@ -30,13 +37,14 @@ The following arguments are supported: - name - (Required) The name of the Quality Gate to create. Maximum length 100 - copy_from - (Optional) Name of an existing Quality Gate to copy from - is_default - (Optional) When set to true this will make the added Quality Gate default -- condition - (Required) The definition of a Condition to be used by this Quality Gate as documented in the `condition` block below. At least one condition is required for a Quality Gate. +- condition - (Required) The definition of a Condition to be used by this Quality Gate as documented in the `condition` block below. At least one condition is required for a Quality Gate. A `condition` block supports: - metric - (Required) Condition metric. Only metrics of the following types are allowed: + - INT - MILLISEC - RATING @@ -46,6 +54,7 @@ A `condition` block supports: - LEVEL. The following metrics are forbidden: + - alert_status - security_hotspots - new_security_hotspots diff --git a/docs/resources/sonarqube_qualitygate_project_association.md b/docs/resources/sonarqube_qualitygate_project_association.md index 03ba0001..d86bc264 100644 --- a/docs/resources/sonarqube_qualitygate_project_association.md +++ b/docs/resources/sonarqube_qualitygate_project_association.md @@ -1,7 +1,16 @@ -# sonarqube_qualitygate_project_association +--- +page_title: "sonarqube_qualitygate_project_association Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Quality Gate Project association resource. This can be used to associate a Quality Gate to a Project +--- + +# sonarqube_qualitygate_project_association (Resource) + Provides a Sonarqube Quality Gate Project association resource. This can be used to associate a Quality Gate to a Project ## Example: create a quality gate project association + ```terraform resource "sonarqube_qualitygate" "main" { name = "my_qualitygate" @@ -16,7 +25,7 @@ resource "sonarqube_qualitygate" "main" { resource "sonarqube_project" "main" { name = "SonarQube" project = "my_project" - visibility = "public" + visibility = "public" } resource "sonarqube_qualitygate_project_association" "main" { @@ -26,14 +35,16 @@ resource "sonarqube_qualitygate_project_association" "main" { ``` ## Argument Reference + The following arguments are supported: - gatename - (Required) The name of the Quality Gate - projectkey - (Required) Key of the project. Maximum length 400. All letters, digits, dash, underscore, period or colon. -## Import +## Import + Quality Gates Project Associations can be imported using a combination of quality gate name and project key ```terraform terraform import sonarqube_qualitygate_project_association.main my_qualitygate/my_project -``` \ No newline at end of file +``` diff --git a/docs/resources/sonarqube_qualitygate_usergroup_association.md b/docs/resources/sonarqube_qualitygate_usergroup_association.md index f3e037ab..e1046bf6 100644 --- a/docs/resources/sonarqube_qualitygate_usergroup_association.md +++ b/docs/resources/sonarqube_qualitygate_usergroup_association.md @@ -1,9 +1,18 @@ -# sonarqube_qualitygate_usergroup_association +--- +page_title: "sonarqube_qualitygate_usergroup_association Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Quality Gate Usergroup association resource. This can be used to associate a Quality Gate to an User or to a Group. + The feature is available on SonarQube 9.2 or newer. +--- + +# sonarqube_qualitygate_usergroup_association (Resource) Provides a Sonarqube Quality Gate Usergroup association resource. This can be used to associate a Quality Gate to an User or to a Group. The feature is available on SonarQube 9.2 or newer. ## Example: create a quality gate group association + ```terraform resource "sonarqube_qualitygate" "main" { name = "my_qualitygate" @@ -27,6 +36,7 @@ resource "sonarqube_qualitygate_usergroup_association" "main" { ``` ## Example: create a quality gate user association + ```terraform resource "sonarqube_qualitygate" "main" { name = "my_qualitygate" @@ -51,6 +61,7 @@ resource "sonarqube_qualitygate_usergroup_association" "main" { ``` ## Argument Reference + The following arguments are supported: - `gatename` - (Required) The name of the Quality Gate @@ -65,4 +76,4 @@ The following attributes are exported: ## Import -Import is not required because SonarQube overwrites existing associations. \ No newline at end of file +Import is not required because SonarQube overwrites existing associations. diff --git a/docs/resources/sonarqube_qualityprofile.md b/docs/resources/sonarqube_qualityprofile.md index dc2fa091..9e18b157 100644 --- a/docs/resources/sonarqube_qualityprofile.md +++ b/docs/resources/sonarqube_qualityprofile.md @@ -1,7 +1,16 @@ -# sonarqube_qualityprofile +--- +page_title: "sonarqube_qualityprofile Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Quality Profile resource. This can be used to create and manage Sonarqube Quality Profiles. +--- + +# sonarqube_qualityprofile (Resource) + Provides a Sonarqube Quality Profile resource. This can be used to create and manage Sonarqube Quality Profiles. ## Example: create a quality profile + ```terraform resource "sonarqube_qualityprofile" "main" { name = "example" @@ -12,23 +21,26 @@ resource "sonarqube_qualityprofile" "main" { ``` ## Argument Reference + The following arguments are supported: -- name - (Required) The name of the Quality Profile to create. Maximum length 100 +- name - (Required) The name of the Quality Profile to create. Maximum length 100 - language - (Required) Quality profile language. Must be one of "cs", "css", "flex", "go", "java", "js", "jsp", "kotlin", "php", "py", "ruby", "scala", "ts", "vbnet", "web", "xml" - is_default - (Optional) When set to true this will make the added Quality Profile default - parent - (Optional) When a parent is provided the quality profile will inherit it's rules ## Attributes Reference + The following attributes are exported: - name - Name of the Sonarqube Quality Profile -- id - ID of the Sonarqube Quality Profile -- key - ID of the Sonarqube Quality Profile +- id - ID of the Sonarqube Quality Profile +- key - ID of the Sonarqube Quality Profile + +## Import -## Import Quality Profiles can be imported using their ID ```terraform terraform import sonarqube_qualityprofile.main AU-Tpxb--iU5OvuD2FLy -``` \ No newline at end of file +``` diff --git a/docs/resources/sonarqube_qualityprofile_activate_rule.md b/docs/resources/sonarqube_qualityprofile_activate_rule.md index ca53a426..b3a55f31 100644 --- a/docs/resources/sonarqube_qualityprofile_activate_rule.md +++ b/docs/resources/sonarqube_qualityprofile_activate_rule.md @@ -1,4 +1,11 @@ -# sonarqube_qualityprofile_activate_rule +--- +page_title: "sonarqube_qualityprofile_activate_rule Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Rules resource. This can be used to manage Sonarqube rules. +--- + +# sonarqube_qualityprofile_activate_rule (Resource) Provides a Sonarqube Rules resource. This can be used to manage Sonarqube rules. @@ -8,7 +15,7 @@ Provides a Sonarqube Rules resource. This can be used to manage Sonarqube rules. resource "sonarqube_rule" "allowed_maven_dependencies" { custom_key = "Only_use_allowed_Maven_dependencies" - markdown_description = "Description" + markdown_description = "Description" name = "Only use allowed Maven dependencies" params = "FilePattern=**/pom.xml" severity = "BLOCKER" @@ -36,7 +43,7 @@ resource "sonarqube_qualityprofile_activate_rule" "xml_rule" { The following arguments are supported -- key - (Required) Quality Profile key. Can be obtained through api/qualityprofiles/search +- key - (Required) Quality Profile key. Can be obtained through api/qualityprofiles/search - params - (Optional) Parameters as semi-colon list of key=value. Ignored if parameter reset is true. - reset - (Optional) Reset severity and parameters of activated rule. Set the values defined on parent profile or from rule default values. - Possible values true false yes no (Default false) diff --git a/docs/resources/sonarqube_qualityprofile_project_association.md b/docs/resources/sonarqube_qualityprofile_project_association.md index cb207423..9d1b5d7c 100644 --- a/docs/resources/sonarqube_qualityprofile_project_association.md +++ b/docs/resources/sonarqube_qualityprofile_project_association.md @@ -1,7 +1,16 @@ -# sonarqube_qualityprofile_project_association +--- +page_title: "sonarqube_qualityprofile_project_association Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Quality Profile Project association resource. This can be used to associate a Quality Profile to a Project +--- + +# sonarqube_qualityprofile_project_association (Resource) + Provides a Sonarqube Quality Profile Project association resource. This can be used to associate a Quality Profile to a Project ## Example: create a quality profile project association + ```terraform resource "sonarqube_qualityprofile" "main" { name = "my_quality_profile" @@ -11,7 +20,7 @@ resource "sonarqube_qualityprofile" "main" { resource "sonarqube_project" "main" { name = "SonarQube" project = "my_project" - visibility = "public" + visibility = "public" } resource "sonarqube_qualityprofile_project_association" "main" { @@ -22,15 +31,17 @@ resource "sonarqube_qualityprofile_project_association" "main" { ``` ## Argument Reference + The following arguments are supported: - quality_profile - (Required) Name of the Quality Profile -- project - (Required) Name of the project -- language - (Required) Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list +- project - (Required) Name of the project +- language - (Required) Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list + +## Import -## Import Quality Profiles Project Associations can be imported using a combination of quality profile name, project name and language ```terraform terraform import sonarqube_qualityprofile_project_association.main my_quality_profile/SonarQube/js -``` \ No newline at end of file +``` diff --git a/docs/resources/sonarqube_rules.md b/docs/resources/sonarqube_rules.md index 125bae69..de835edb 100644 --- a/docs/resources/sonarqube_rules.md +++ b/docs/resources/sonarqube_rules.md @@ -1,4 +1,11 @@ -# sonarqube_rules +--- +page_title: "sonarqube_rules Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Rules resource. This can be used to manage Sonarqube rules. +--- + +# sonarqube_rules (Resource) Provides a Sonarqube Rules resource. This can be used to manage Sonarqube rules. @@ -23,7 +30,7 @@ resource "sonarqube_rule" "rule" { The following arguments are supported -- key - (Required) key of the custom rule should only contain : a-z, 0-9, _ +- key - (Required) key of the custom rule should only contain : a-z, 0-9, \_ - markdown_description - (Required) Rule description - name - (Required) Rule name - params - (Optional) Parameters as semi-colon list of =, for example 'params=key1=v1;key2=v2' (Only for custom rule) diff --git a/docs/resources/sonarqube_settings.md b/docs/resources/sonarqube_settings.md index 6e932327..8d8c262d 100644 --- a/docs/resources/sonarqube_settings.md +++ b/docs/resources/sonarqube_settings.md @@ -1,4 +1,11 @@ -# sonarqube_settings +--- +page_title: "sonarqube_settings Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Settings resource. This can be used to manage Sonarqube settings. +--- + +# sonarqube_settings (Resource) Provides a Sonarqube Settings resource. This can be used to manage Sonarqube settings. @@ -13,13 +20,16 @@ resource "sonarqube_setting" "single_setting" { ``` ## Example: create a setting with multiple values + ```terraform resource "sonarqube_setting" "multi_value_setting" { key = "sonar.global.exclusions" values = ["foo", "bar/**/*.*"] } ``` + ## Example: create a setting with multiple field values + ```terraform resource "sonarqube_setting" "multi_field_setting" { key = "sonar.issue.ignore.multicriteria" @@ -35,6 +45,7 @@ resource "sonarqube_setting" "multi_field_setting" { ] } ``` + ## Argument Reference The following arguments are supported @@ -44,7 +55,8 @@ The following arguments are supported - values - (Optional) Multi-valued setting values - field_values - (Optional) Multi-field setting values -One of value, values, field_values _must_ be supplied +One of value, values, field*values \_must* be supplied + ## Attribute Reference The following attributes are exported: diff --git a/docs/resources/sonarqube_user.md b/docs/resources/sonarqube_user.md index 7355f64d..2357d9b3 100644 --- a/docs/resources/sonarqube_user.md +++ b/docs/resources/sonarqube_user.md @@ -1,8 +1,15 @@ -# sonarqube_user +--- +page_title: "sonarqube_user Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube User resource. This can be used to manage Sonarqube Users. +--- + +# sonarqube_user (Resource) Provides a Sonarqube User resource. This can be used to manage Sonarqube Users. -**Note**: By default Sonarqube only *deactivates* a user on `destroy` but keeps its personal data in the database. Since release `9.7` it +**Note**: By default Sonarqube only _deactivates_ a user on `destroy` but keeps its personal data in the database. Since release `9.7` it is possible to automatically anonymize the data. This can be helpful to comply with regulations like [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation). This behaviour can be activated with the `anonymize_user_on_delete` flag on the `provider` configuration. diff --git a/docs/resources/sonarqube_user_external_identity.md b/docs/resources/sonarqube_user_external_identity.md index 97108862..7526eff9 100644 --- a/docs/resources/sonarqube_user_external_identity.md +++ b/docs/resources/sonarqube_user_external_identity.md @@ -1,9 +1,17 @@ -# sonarqube_user_external_entity +--- +page_title: "sonarqube_user_external_entity Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Updates the *external identity* of a *non local* Sonarqube User. This can be used to set the *Identity Provider* which should be used to + authenticate a specific user. +--- -Updates the *external identity* of a *non local* Sonarqube User. This can be used to set the *Identity Provider* which should be used to +# sonarqube_user_external_entity (Resource) + +Updates the _external identity_ of a _non local_ Sonarqube User. This can be used to set the _Identity Provider_ which should be used to authenticate a specific user. -The Sonarqube API currently does not provide an endpoint to read the *external identity* setting of an user. +The Sonarqube API currently does not provide an endpoint to read the _external identity_ setting of an user. ## Example: change the external identity to SAML @@ -27,7 +35,7 @@ resource "sonarqube_user_external_identity" "remote_user" { The following arguments are supported: - `login_name` - (Required) The login name of the User to update. Changing this forces a new resource to be created. -- `external_identity` - (Required) The identifier of the User used by the Authentication Provider. Changing this forces a new resource to be +- `external_identity` - (Required) The identifier of the User used by the Authentication Provider. Changing this forces a new resource to be created. -- `external_provider` - (Required) The key of the Authentication Provider. The Authentication Provider must be activated on Sonarqube. Changing +- `external_provider` - (Required) The key of the Authentication Provider. The Authentication Provider must be activated on Sonarqube. Changing this forces a new resource to be created. diff --git a/docs/resources/sonarqube_user_token.md b/docs/resources/sonarqube_user_token.md index 033ad51d..04ab1f38 100644 --- a/docs/resources/sonarqube_user_token.md +++ b/docs/resources/sonarqube_user_token.md @@ -1,4 +1,11 @@ -# sonarqube_user_token +--- +page_title: "sonarqube_user_token Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube User token resource. This can be used to manage Sonarqube User tokens. +--- + +# sonarqube_user_token (Resource) Provides a Sonarqube User token resource. This can be used to manage Sonarqube User tokens. diff --git a/docs/resources/sonarqube_webhook.md b/docs/resources/sonarqube_webhook.md index b31b3c50..bc6231a0 100644 --- a/docs/resources/sonarqube_webhook.md +++ b/docs/resources/sonarqube_webhook.md @@ -1,4 +1,11 @@ -# sonarqube_webhook +--- +page_title: "sonarqube_webhook Resource - terraform-provider-sonarqube" +subcategory: "" +description: |- + Provides a Sonarqube Webhook resource. This can be used to manage Sonarqube webhooks. +--- + +# sonarqube_webhook (Resource) Provides a Sonarqube Webhook resource. This can be used to manage Sonarqube webhooks. @@ -17,7 +24,7 @@ resource "sonarqube_webhook" "webhook" { resource "sonarqube_project" "project" { name = "project" project = "project" - visibility = "public" + visibility = "public" } resource "sonarqube_webhook" "webhook" { @@ -36,7 +43,6 @@ The following arguments are supported: - project - (Optional) The key of the project that will own the webhook. - secret - (Optional) The secret to send with the event payload. - ## Attributes Reference The following attributes are exported: