Skip to content

Commit

Permalink
[DOC] Use terraform-plugin-docs (#75)
Browse files Browse the repository at this point in the history
* [DOC] Use terraform-plugin-docs
  • Loading branch information
fourplusone authored Jan 5, 2023
1 parent bd14e4d commit bd277e3
Show file tree
Hide file tree
Showing 45 changed files with 1,218 additions and 76 deletions.
46 changes: 46 additions & 0 deletions docs/data-sources/field.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jira_field Data Source - terraform-provider-jira"
subcategory: ""
description: |-
---

# jira_field (Data Source)



## Example Usage

```terraform
data "jira_field" "epic_link" {
name = "Epic Link"
}
resource "jira_issue" "custom_fields_example" {
issue_type = "Task"
summary = "Also Created using Terraform"
fields = {
(jira_field.epic_link.id) = jira_issue.example_epic.issue_key
}
project_key = "PROJ"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String)

### Read-Only

- `clause_names` (List of String)
- `custom` (Boolean)
- `id` (String) The ID of this resource.
- `key` (String)
- `navigable` (Boolean)
- `searchable` (Boolean)


33 changes: 33 additions & 0 deletions docs/data-sources/jql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jira_jql Data Source - terraform-provider-jira"
subcategory: ""
description: |-
---

# jira_jql (Data Source)



## Example Usage

```terraform
data "jira_jql" "issues" {
jql = "project = TRF ORDER BY key ASC"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `jql` (String)

### Read-Only

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


56 changes: 56 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
page_title: "Provider: JIRA"
description: |-
Terraform Provider for managing JIRA.
---

# JIRA Provider

Working in Operations engineering organizations infrastructure is often driven by tickets.
Why not track infrastructure using tickets but this time we will use code.

## Example Usage

Set JIRA URL, Username and Password using environment variables

```bash
export JIRA_URL=http://localhost:8080
export JIRA_USER=username
export JIRA_PASSWORD=password
```

If you prefer Personal Access Tokens

```bash
export JIRA_URL=http://localhost:8080
export JIRA_TOKEN=<Personal Access Token>
```


It's also possible to use an API-Token from JIRA cloud. In this case, set

```bash
export JIRA_URL=https://yourinstance.atlassian.net
export [email protected]
export JIRA_PASSWORD=<API-Key>
```

```terraform
provider "jira" {
url = "https://myjira.atlassian.net" # Can also be set using the JIRA_URL environment variable
user = "xxxx" # Can also be set using the JIRA_USER environment variable
password = "xxxx" # Can also be set using the JIRA_PASSWORD environment variable
token = "xxxx" # Can also be set using the JIRA_TOKEN environment variable
}
```


<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `password` (String, Sensitive) Password for the user, can also be an API Token. Can be specified with the JIRA_PASSWORD environment variable.
- `token` (String, Sensitive) Personal access token of a user. Can be specified with the JIRA_TOKEN environment variable.
- `url` (String) URL for your Jira instance. Can be specified with the JIRA_URL environment variable.
- `user` (String) Username for your user. Can be specified with the JIRA_USER environment variable.
40 changes: 40 additions & 0 deletions docs/resources/comment.md
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: "jira_comment Resource - terraform-provider-jira"
subcategory: ""
description: |-
Creates a comment for an issue
---

# jira_comment (Resource)

Creates a comment for an issue

## Example Usage

```terraform
resource "jira_issue" "example" {
issue_type = "${jira_issue_type.task.name}"
project_key = "PROJ"
summary = "Created using Terraform"
}
resource "jira_comment" "example_comment" {
body = "Commented using terraform"
issue_key = "${jira_issue.example.issue_key}"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `body` (String) The contents of the comment to be created
- `issue_key` (String)

### Read-Only

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


41 changes: 41 additions & 0 deletions docs/resources/component.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jira_component Resource - terraform-provider-jira"
subcategory: ""
description: |-
Creates a project component
---

# jira_component (Resource)

Creates a project component

## Example Usage

```terraform
resource "jira_component" "example_component" {
name = "Sample Component"
project_key = "PRJ"
description = "Sample Description"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the component
- `project_key` (String) Project Key (for example PRJ)

### Optional

- `assignee_type` (String) Default assignee type. Can be one of project_default, component_lead, project_lead or unassigned.
- `description` (String) Description of the component
- `lead` (String) Component lead

### Read-Only

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


78 changes: 78 additions & 0 deletions docs/resources/filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jira_filter Resource - terraform-provider-jira"
subcategory: ""
description: |-
---

# jira_filter (Resource)



## Example Usage

```terraform
resource "jira_filter" "filter" {
name = "Simple Filter"
jql = "project = PROJ"
// Optional Fields
description = "All Issues in PROJ"
favourite = false
// All Members of project with ID 13102
permissions {
type = "project"
project_id = "13102"
}
// All Members of Group "Team A"
permissions {
type = "group"
group_name = "Team A"
}
// Any authenticated user
permissions {
type = "authenticated"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `jql` (String) JQL expression of the filter
- `name` (String) Name of the filter

### Optional

- `description` (String) Description of the filter
- `favourite` (Boolean) Whether the filter is marked as favorite
- `permissions` (Block Set) Filter permissions (see [below for nested schema](#nestedblock--permissions))

### Read-Only

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

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

Required:

- `type` (String) Type of the permission. Needs to be one of global, group, project, project_role or authenticated

Optional:

- `group_name` (String) All Members of the of this group can access the filter
- `project_id` (String) All Members of the project with the given ID can access the filter
- `project_role_id` (String)

Read-Only:

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


33 changes: 33 additions & 0 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jira_group Resource - terraform-provider-jira"
subcategory: ""
description: |-
---

# jira_group (Resource)



## Example Usage

```terraform
// Create a group named "Terraform Managed"
resource "jira_group" "tf_group" {
name = "Terraform Managed"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String)

### Read-Only

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


40 changes: 40 additions & 0 deletions docs/resources/group_membership.md
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: "jira_group_membership Resource - terraform-provider-jira"
subcategory: ""
description: |-
---

# jira_group_membership (Resource)



## Example Usage

```terraform
// Create a group named "Terraform Managed"
resource "jira_group" "tf_group" {
name = "Terraform Managed"
}
// User "bot" will be a Member of "Terraform Managed"
resource "jira_group_membership" "gm_1" {
username = "bot"
group = "${jira_group.tf_group.name}"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `group` (String)
- `username` (String)

### Read-Only

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


Loading

0 comments on commit bd277e3

Please sign in to comment.