Skip to content
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

Add support for pagerduty_automation_actions_runner and data.pagerduty_automation_actions_runner #595

Conversation

imjaroiswebdev
Copy link
Contributor

Add support for pagerduty_automation_actions_runner and data.pagerduty_automation_actions_runner

New test cases introduced...
image

Depends on heimweh/go-pagerduty#103

@imjaroiswebdev imjaroiswebdev force-pushed the data_pagerduty_automation_actions_runner branch from 1b94809 to 21f0f96 Compare December 9, 2022 21:57
@imjaroiswebdev imjaroiswebdev marked this pull request as ready for review December 9, 2022 22:11
Comment on lines +15 to +50
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Required: true,
},
"name": {
Type: schema.TypeString,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"runner_type": {
Type: schema.TypeString,
Computed: true,
},
"creation_time": {
Type: schema.TypeString,
Computed: true,
},
"last_seen": {
Type: schema.TypeString,
Computed: true,
Optional: true,
},
"description": {
Type: schema.TypeString,
Computed: true,
Optional: true,
},
"runbook_base_uri": {
Type: schema.TypeString,
Computed: true,
Optional: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to reuse the resource schema directly here: https://github.com/PagerDuty/terraform-provider-pagerduty/pull/595/files#diff-c9f4179acaed6ea87351f857cb6180d4d178550a76e5e14bb54d18102123c33eR21-R65

And then reuse the resourcePagerDutyAutomationActionsRunnerRead() function too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree this would be a less repetitive way of creating data source schemas I would vote that we keep the code base consistent with the other data sources in the PageDuty provider. So, if we were to adopt this approach we should use it for all the applicable data sources.

Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🌮 🎉 Users are going to love this!

@imjaroiswebdev imjaroiswebdev merged commit 73411bc into PagerDuty:master Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants