diff --git a/docs/data-sources/pipeline_group.md b/docs/data-sources/pipeline_group.md new file mode 100644 index 0000000..d0656d5 --- /dev/null +++ b/docs/data-sources/pipeline_group.md @@ -0,0 +1,72 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "gocd_pipeline_group Data Source - terraform-provider-gocd" +subcategory: "" +description: |- + +--- + +# gocd_pipeline_group (Data Source) +Fetches the specified pipeline group config present in GoCD by interacting with GET pipeline config [api](https://api.gocd.org/current/#get-a-pipeline-group). + +## Example Usage +```terraform +data "gocd_pipeline_group" "sample_group" { + group_id = "sample-group" +} +``` + + + +## Schema + +### Required + +- `group_id` (String) Name of the pipeline group to be retrieved. + +### Optional + +- `authorization` (Block Set) The authorization configuration for the pipeline group. (see [below for nested schema](#nestedblock--authorization)) +- `etag` (String) Etag used to track the pipeline group. +- `pipelines` (List of String) List of pipelines those are part of this pipeline group. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `authorization` + +Optional: + +- `admins` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--admins)) +- `operate` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--operate)) +- `view` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--view)) + + +### Nested Schema for `authorization.admins` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.operate` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.view` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + diff --git a/docs/resources/pipeline_group.md b/docs/resources/pipeline_group.md new file mode 100644 index 0000000..4b0b276 --- /dev/null +++ b/docs/resources/pipeline_group.md @@ -0,0 +1,89 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "gocd_pipeline_group Resource - terraform-provider-gocd" +subcategory: "" +description: |- + +--- + +# gocd_pipeline_group (Resource) +Creates pipeline group in GoCD with all below passed parameters by interacting with GoCD cluster profile [api](https://api.gocd.org/current/#create-a-pipeline-group). + +## Example Usage +```terraform +resource "gocd_pipeline_group" "sample_group_2" { + name = "sample-group-2" + pipelines = ["helm-images", "helm-drift"] + authorization { + view { + users = ["nikhil"] + roles = ["sample"] + } + operate { + users = ["nikhil"] + roles = ["sample"] + } + admins { + users = ["nikhil"] + roles = ["sample"] + } + } +} +``` + + + + + +## Schema + +### Required + +- `name` (String) Name of the pipeline group to be created or updated. + +### Optional + +- `authorization` (Block Set) The authorization configuration for the pipeline group. (see [below for nested schema](#nestedblock--authorization)) +- `etag` (String) Etag used to track the pipeline group. +- `pipelines` (List of String) List of pipelines to be associated with pipeline group. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `authorization` + +Optional: + +- `admins` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--admins)) +- `operate` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--operate)) +- `view` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--view)) + + +### Nested Schema for `authorization.admins` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.operate` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.view` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + diff --git a/templates/data-sources/pipeline_group.md.tmpl b/templates/data-sources/pipeline_group.md.tmpl new file mode 100644 index 0000000..d0656d5 --- /dev/null +++ b/templates/data-sources/pipeline_group.md.tmpl @@ -0,0 +1,72 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "gocd_pipeline_group Data Source - terraform-provider-gocd" +subcategory: "" +description: |- + +--- + +# gocd_pipeline_group (Data Source) +Fetches the specified pipeline group config present in GoCD by interacting with GET pipeline config [api](https://api.gocd.org/current/#get-a-pipeline-group). + +## Example Usage +```terraform +data "gocd_pipeline_group" "sample_group" { + group_id = "sample-group" +} +``` + + + +## Schema + +### Required + +- `group_id` (String) Name of the pipeline group to be retrieved. + +### Optional + +- `authorization` (Block Set) The authorization configuration for the pipeline group. (see [below for nested schema](#nestedblock--authorization)) +- `etag` (String) Etag used to track the pipeline group. +- `pipelines` (List of String) List of pipelines those are part of this pipeline group. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `authorization` + +Optional: + +- `admins` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--admins)) +- `operate` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--operate)) +- `view` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--view)) + + +### Nested Schema for `authorization.admins` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.operate` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.view` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + diff --git a/templates/resources/pipeline_group.md.tmpl b/templates/resources/pipeline_group.md.tmpl new file mode 100644 index 0000000..4b0b276 --- /dev/null +++ b/templates/resources/pipeline_group.md.tmpl @@ -0,0 +1,89 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "gocd_pipeline_group Resource - terraform-provider-gocd" +subcategory: "" +description: |- + +--- + +# gocd_pipeline_group (Resource) +Creates pipeline group in GoCD with all below passed parameters by interacting with GoCD cluster profile [api](https://api.gocd.org/current/#create-a-pipeline-group). + +## Example Usage +```terraform +resource "gocd_pipeline_group" "sample_group_2" { + name = "sample-group-2" + pipelines = ["helm-images", "helm-drift"] + authorization { + view { + users = ["nikhil"] + roles = ["sample"] + } + operate { + users = ["nikhil"] + roles = ["sample"] + } + admins { + users = ["nikhil"] + roles = ["sample"] + } + } +} +``` + + + + + +## Schema + +### Required + +- `name` (String) Name of the pipeline group to be created or updated. + +### Optional + +- `authorization` (Block Set) The authorization configuration for the pipeline group. (see [below for nested schema](#nestedblock--authorization)) +- `etag` (String) Etag used to track the pipeline group. +- `pipelines` (List of String) List of pipelines to be associated with pipeline group. + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `authorization` + +Optional: + +- `admins` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--admins)) +- `operate` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--operate)) +- `view` (Block Set) The list of users and roles with view permission for this pipeline group (see [below for nested schema](#nestedblock--authorization--view)) + + +### Nested Schema for `authorization.admins` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.operate` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + + + +### Nested Schema for `authorization.view` + +Optional: + +- `roles` (List of String) List of roles present in GoCD. +- `users` (List of String) List of users present in GoCD. + +