Skip to content

Commit

Permalink
documentation, tests, fix go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
forevanyeung committed Nov 5, 2023
1 parent 1d76791 commit bc98b24
Show file tree
Hide file tree
Showing 21 changed files with 193 additions and 503 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Release
on:
push:
tags:
- 'v*'
- "v*"

# Releases need permissions to read and write the repository contents.
# GitHub considers creating releases and uploading assets as writing contents.
Expand All @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ name: Tests
on:
pull_request:
paths-ignore:
- 'README.md'
- "README.md"
push:
paths-ignore:
- 'README.md'
- "README.md"

# Testing only needs permissions to read the repository contents.
permissions:
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true
- run: go mod download
- run: go build -v .
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true
- run: go generate ./...
- name: git diff
Expand All @@ -59,16 +59,16 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
- '1.4.*'
- "1.0.*"
- "1.1.*"
- "1.2.*"
- "1.3.*"
- "1.4.*"
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
Expand Down
32 changes: 32 additions & 0 deletions docs/data-sources/jiraassets_object_schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jiraassets_object_schema Data Source - terraform-provider-jira-assets"
subcategory: ""
description: |-
---

# jiraassets_object_schema (Data Source)





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

### Read-Only

- `can_manage` (Boolean)
- `created` (String)
- `description` (String)
- `global_id` (String)
- `id` (String) The ID of this resource.
- `id_as_int` (Number)
- `name` (String)
- `object_count` (Number)
- `object_schema_key` (String)
- `object_type_count` (Number)
- `status` (String)
- `updated` (String)
- `workspace_id` (String)
30 changes: 0 additions & 30 deletions docs/data-sources/scaffolding_example.md

This file was deleted.

18 changes: 11 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "scaffolding-framework Provider"
page_title: "jira-assets Provider"
subcategory: ""
description: |-
A Terraform provider for Jira Assets.
---

# scaffolding-framework Provider

# jira-assets Provider

A Terraform provider for Jira Assets.

## Example Usage

```terraform
provider "scaffolding" {
# example configuration here
provider "jiraassets" {
workspace_id = ""
user = ""
password = ""
}
```

Expand All @@ -23,4 +25,6 @@ provider "scaffolding" {

### Optional

- `endpoint` (String) Example provider attribute
- `password` (String, Sensitive) Personal access token for the admin or service account.
- `user` (String) Username of an admin or service account with access to the Jira API.
- `workspace_id` (String) Workspace Id of the Assets instance.
44 changes: 44 additions & 0 deletions docs/resources/jiraassets_object.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jiraassets_object Resource - terraform-provider-jira-assets"
subcategory: ""
description: |-
---

# jiraassets_object (Resource)





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

### Required

- `attributes` (Attributes Set) (see [below for nested schema](#nestedatt--attributes))
- `type_id` (String)

### Optional

- `avatar_uuid` (String)
- `has_avatar` (Boolean)

### Read-Only

- `created` (String)
- `global_id` (String)
- `id` (String) The ID of this resource.
- `label` (String)
- `object_key` (String)
- `updated` (String)
- `workspace_id` (String)

<a id="nestedatt--attributes"></a>
### Nested Schema for `attributes`

Required:

- `attr_type_id` (String)
- `attr_value` (String)
31 changes: 0 additions & 31 deletions docs/resources/scaffolding_example.md

This file was deleted.

4 changes: 4 additions & 0 deletions examples/data-sources/object_schema/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
data "object_schema" "example" {
object_type = "example"
object_id = "example"
}
3 changes: 0 additions & 3 deletions examples/data-sources/scaffolding_example/data-source.tf

This file was deleted.

6 changes: 4 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provider "scaffolding" {
# example configuration here
provider "jiraassets" {
workspace_id = ""
user = ""
password = ""
}
10 changes: 10 additions & 0 deletions examples/resources/object/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "jiraassets_object" "example_object_1" {
object_type = "example"
object_id = "example"
attributes = [
{
attr_type_id = ""
attr_value = ""
}
]
}
3 changes: 0 additions & 3 deletions examples/resources/scaffolding_example/resource.tf

This file was deleted.

105 changes: 0 additions & 105 deletions internal/provider/example_data_source.go

This file was deleted.

Loading

0 comments on commit bc98b24

Please sign in to comment.