Skip to content

Commit 2e8b77a

Browse files
authored
Merge pull request #7 from circa10a/add-cancel-support
#minor: support cancelling an order
2 parents 35c1560 + 85dcb50 commit 2e8b77a

File tree

13 files changed

+218
-183
lines changed

13 files changed

+218
-183
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Run GoReleaser
3838
uses: goreleaser/[email protected]
3939
with:
40-
version: latest
40+
version: v1.15.2
4141
args: release --rm-dist
4242
env:
4343
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/tag.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
with:
1414
fetch-depth: '0'
1515
- name: Bump version and push tag
16-
uses: anothrNick/github-tag-action@1.61.0
16+
uses: anothrNick/github-tag-action@1.75.0
1717
id: tagging
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
WITH_V: true
2121
RELEASE_BRANCHES: main
22+
DEFAULT_BUMP: patch

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v3
4545
- uses: actions/setup-go@v3
46+
- uses: hashicorp/setup-terraform@v2
47+
with:
48+
terraform_version: 1.4.6
49+
terraform_wrapper: false
4650
- run: go generate ./...
4751
- name: git diff
4852
run: |
@@ -68,6 +72,16 @@ jobs:
6872
- '1.1.*'
6973
- '1.2.*'
7074
- '1.3.*'
75+
- '1.4.*'
76+
- '1.5.*'
77+
- '1.6.*'
78+
- '1.7.*'
79+
- '1.8.*'
80+
- '1.9.*'
81+
- '1.10.*'
82+
- '1.11.*'
83+
- '1.12.*'
84+
- '1.13.*'
7185
steps:
7286

7387
- name: Check out code into the Go module directory

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## 0.1.0 (Unreleased)
1+
## 0.5.0
22

3-
BACKWARDS INCOMPATIBILITIES / NOTES:
3+
Support properly cancelling/deleting resources with new version of go-mailform

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ HOSTNAME=github.com
33
NAMESPACE=circa10a
44
NAME=mailform
55
BINARY=terraform-provider-${NAME}
6-
VERSION=0.4.0
7-
OS_ARCH=darwin_amd64
6+
VERSION=0.5.0
7+
8+
# Detect OS and architecture automatically
9+
OS := $(shell go env GOOS)
10+
ARCH := $(shell go env GOARCH)
11+
OS_ARCH := ${OS}_${ARCH}
812

913
default: install
1014

@@ -13,6 +17,7 @@ build:
1317

1418
release:
1519
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
20+
GOOS=darwin GOARCH=arm64 go build -o ./bin/${BINARY}_${VERSION}_darwin_arm64
1621
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
1722
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
1823
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Standing on the shoulders of giants enables us to yeet mail further.
99
![GitHub release (latest by date)](https://img.shields.io/github/v/release/circa10a/terraform-provider-mailform?style=plastic)
1010
[![Buy Me A Coffee](https://img.shields.io/badge/BuyMeACoffee-Donate-ff813f.svg?logo=CoffeeScript&style=plastic)](https://www.buymeacoffee.com/caleblemoine)
1111

12-
> :warning: Orders cannot be updated/deleted (cancelled). Once created,no more modifications can be made due to API limitations. Deleted resources are simply removed from state.
1312

1413
## Usage
1514

@@ -78,12 +77,27 @@ output "order_info" {
7877

7978
1. Clone the repository
8079
1. Enter the repository directory
81-
1. Build the provider using the Go `install` command:
80+
1. Build the provider using the `make install` command:
8281

8382
```sh
84-
go install
83+
make install
8584
```
8685

86+
## Local testing
87+
88+
Example provider config for `terraform init`:
89+
90+
```hcl
91+
terraform {
92+
required_providers {
93+
mailform = {
94+
source = "github.com/circa10a/mailform"
95+
version = "= 0.5.0"
96+
}
97+
}
98+
}
99+
````
100+
87101
## Adding Dependencies
88102
89103
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).

docs/data-sources/order.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,3 @@ Read-Only:
7878
- `to_organization` (String)
7979
- `to_postcode` (String)
8080
- `to_state` (String)
81-
82-

docs/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
# generated by https://github.com/hashicorp/terraform-plugin-docs
33
page_title: "mailform Provider"
4-
subcategory: ""
54
description: |-
65
76
---

docs/resources/order.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,3 @@ Read-Only:
106106
- `to_organization` (String)
107107
- `to_postcode` (String)
108108
- `to_state` (String)
109-
110-

docs/resources/pdf.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ Render a PDF and write to a local file.
2828
### Read-Only
2929

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

0 commit comments

Comments
 (0)