Skip to content

Commit

Permalink
Change project_id type to string in key resource (#240)
Browse files Browse the repository at this point in the history
* Change project_id type to string

* update sentry client

* ref: update docs

---------

Co-authored-by: Jian Yuan Lee <jianyuan@gmail.com>
  • Loading branch information
sc3w and jianyuan authored Dec 13, 2023
1 parent da7bd97 commit 659bb55
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/key.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data "sentry_key" "first" {
- `dsn_secret` (String, Deprecated)
- `id` (String) The ID of this resource.
- `is_active` (Boolean) Flag indicating the key is active.
- `project_id` (Number) The ID of the project that the key belongs to.
- `project_id` (String) The ID of the project that the key belongs to.
- `public` (String) Public key portion of the client key.
- `rate_limit_count` (Number) Number of events that can be reported within the rate limit window.
- `rate_limit_window` (Number) Length of time that will be considered when checking the rate limit.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-mux v0.12.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231211183815-40941f159a08
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231213095245-b3fa073010c8
github.com/mitchellh/mapstructure v1.5.0
golang.org/x/oauth2 v0.15.0
golang.org/x/sync v0.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231211183815-40941f159a08 h1:qfx94UCxZEWQRSZbw/BJNLubr9nWrUZJMIUL1FfC03U=
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231211183815-40941f159a08/go.mod h1:YN4yg9u6/b5TfsmXy8OauRu3cyvVXRe1mJY7Pe+/Dt4=
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231213095245-b3fa073010c8 h1:Ys2Ep1sPsTb5J3Io+hfEYQ/Bv8LdvyzqqkU3sbVB490=
github.com/jianyuan/go-sentry/v2 v2.5.1-0.20231213095245-b3fa073010c8/go.mod h1:YN4yg9u6/b5TfsmXy8OauRu3cyvVXRe1mJY7Pe+/Dt4=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
Expand Down
4 changes: 2 additions & 2 deletions sentry/data_source_sentry_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func dataSourceSentryKey() *schema.Resource {
},
"project_id": {
Description: "The ID of the project that the key belongs to.",
Type: schema.TypeInt,
Type: schema.TypeString,
Computed: true,
},
"is_active": {
Expand Down Expand Up @@ -166,7 +166,7 @@ func sentryKeyAttributes(d *schema.ResourceData, key *sentry.ProjectKey) error {
d.Set("name", key.Name),
d.Set("public", key.Public),
d.Set("secret", key.Secret),
d.Set("project_id", key.ProjectID),
d.Set("project_id", key.ProjectID.String()),
d.Set("is_active", key.IsActive),
d.Set("dsn_secret", key.DSN.Secret),
d.Set("dsn_public", key.DSN.Public),
Expand Down

0 comments on commit 659bb55

Please sign in to comment.