Skip to content

Commit

Permalink
Fix Metadata resource to expect IDs in string format (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz authored Jun 18, 2024
1 parent 2b29930 commit f6b84d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GOLANGCI_LINT := golangci-lint run --disable-all \
-E staticcheck \
-E typecheck \
-E unused
VERSION := 0.10.1
VERSION := 0.10.3
.PHONY: test build

help:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/betteruptime_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ https://betterstack.com/docs/uptime/api/metadata/
### Required

- **key** (String) The key of this Metadata.
- **owner_id** (Number) The ID of the owner of this Metadata.
- **owner_id** (String) The ID of the owner of this Metadata.
- **owner_type** (String) The type of the owner of this Metadata. Valid values: `Monitor`, `Heartbeat`, `Incident`, `WebhookIntegration`, `EmailIntegration`, `IncomingWebhook`
- **value** (String) The value of this Metadata.

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/resource_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var metadataSchema = map[string]*schema.Schema{
},
"owner_id": {
Description: "The ID of the owner of this Metadata.",
Type: schema.TypeInt,
Type: schema.TypeString,
Required: true,
},
"key": {
Expand Down Expand Up @@ -75,9 +75,9 @@ func newMetadataResource() *schema.Resource {
}

type metadata struct {
ID *int `json:"id,omitempty"`
ID *string `json:"id,omitempty"`
OwnerType *string `json:"owner_type,omitempty"`
OwnerID *int `json:"owner_id,omitempty"`
OwnerID *string `json:"owner_id,omitempty"`
Key *string `json:"key,omitempty"`
Value *string `json:"value,omitempty"`
CreatedAt *string `json:"created_at,omitempty"`
Expand Down

0 comments on commit f6b84d8

Please sign in to comment.