Skip to content

Commit

Permalink
Add document for pipeline_group data_source and resource
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsbhat committed Sep 22, 2023
1 parent bfa8caa commit d46398a
Show file tree
Hide file tree
Showing 4 changed files with 322 additions and 0 deletions.
72 changes: 72 additions & 0 deletions docs/data-sources/pipeline_group.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--authorization"></a>
### 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))

<a id="nestedblock--authorization--admins"></a>
### 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.


<a id="nestedblock--authorization--operate"></a>
### 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.


<a id="nestedblock--authorization--view"></a>
### 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.


89 changes: 89 additions & 0 deletions docs/resources/pipeline_group.md
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--authorization"></a>
### 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))

<a id="nestedblock--authorization--admins"></a>
### 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.


<a id="nestedblock--authorization--operate"></a>
### 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.


<a id="nestedblock--authorization--view"></a>
### 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.


72 changes: 72 additions & 0 deletions templates/data-sources/pipeline_group.md.tmpl
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--authorization"></a>
### 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))

<a id="nestedblock--authorization--admins"></a>
### 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.


<a id="nestedblock--authorization--operate"></a>
### 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.


<a id="nestedblock--authorization--view"></a>
### 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.


89 changes: 89 additions & 0 deletions templates/resources/pipeline_group.md.tmpl
Original file line number Diff line number Diff line change
@@ -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 generated by tfplugindocs -->
## 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.

<a id="nestedblock--authorization"></a>
### 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))

<a id="nestedblock--authorization--admins"></a>
### 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.


<a id="nestedblock--authorization--operate"></a>
### 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.


<a id="nestedblock--authorization--view"></a>
### 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.


0 comments on commit d46398a

Please sign in to comment.