-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provider/pagerduty: pagerduty_schedule data source #11614
Conversation
de8c640
to
a4b278c
Compare
a4b278c
to
7de8675
Compare
Tests are passing: $ make testacc TEST=./builtin/providers/pagerduty TESTARGS='-run=TestAccDataSourcePagerDutySchedule_Basic' 19:24:10
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/01 19:24:16 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v -run=TestAccDataSourcePagerDutySchedule_Basic -timeout 120m
=== RUN TestAccDataSourcePagerDutySchedule_Basic
--- PASS: TestAccDataSourcePagerDutySchedule_Basic (6.45s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/pagerduty 6.465s |
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.
1 small comment but LGTM!
Read: dataSourcePagerDutyScheduleRead, | ||
|
||
Schema: map[string]*schema.Schema{ | ||
"id": { |
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 don't need the ID here - Id is exposed internally
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.
Ah good catch, that's true. I'll push a fix straight away 👍
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.
Pushed a fix now to both data sources 🙂
LGTM! |
* Add data source * Add tests * Add documentation * Remove unnecessary id from schema
* Add data source * Add tests * Add documentation * Remove unnecessary id from schema
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This PR adds a new data source
pagerduty_schedule
So far, the only thing we store is the actual ID of the resource,
but can easily be extended to export more attributes in the future.
Example usage: