-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store dashboard widget IDs #815
Conversation
This adds a new attribute to dashboard widgets to store their IDs for future references. Closes #301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, with a comment about Int64
.
@@ -540,6 +540,11 @@ func getNonGroupWidgetSchema() map[string]*schema.Schema { | |||
Schema: getWidgetLayoutSchema(), | |||
}, | |||
}, | |||
"id": { | |||
Type: schema.TypeInt, | |||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for computed: true
@@ -540,6 +540,11 @@ func getNonGroupWidgetSchema() map[string]*schema.Schema { | |||
Schema: getWidgetLayoutSchema(), | |||
}, | |||
}, | |||
"id": { | |||
Type: schema.TypeInt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had some trouble in the past with widget IDs big enough to require Int64 when represented in Go. I think schema.TypeInt
will work (they don't seem to provide an explicitly Int64
version) but I'm not familiar enough to gauge this properly.
Just wanted to put this on your radar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment: terraform does indeed the right thing, and TypeInt is int64 capable.
This adds a new attribute to dashboard widgets to store their IDs for
future references.
Closes #301