-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: Import support for service integrations #12141
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heimweh
changed the title
provider/pagerduty: Import support for service integrations
[WIP] provider/pagerduty: Import support for service integrations
Feb 21, 2017
heimweh
force-pushed
the
pgpassthrough
branch
from
February 23, 2017 18:07
6e71351
to
f5177ed
Compare
heimweh
changed the title
[WIP] provider/pagerduty: Import support for service integrations
provider/pagerduty: Import support for service integrations
Feb 23, 2017
Import test passing: $ make testacc TEST=./builtin/providers/pagerduty TESTARGS='-run=TestAccPagerDutyServiceIntegration*' 20:14:34
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/23 20:14:46 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/pagerduty -v -run=TestAccPagerDutyServiceIntegration* -timeout 120m
=== RUN TestAccPagerDutyServiceIntegration_import
--- PASS: TestAccPagerDutyServiceIntegration_import (17.20s)
=== RUN TestAccPagerDutyServiceIntegration_Basic
--- PASS: TestAccPagerDutyServiceIntegration_Basic (26.01s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/pagerduty 43.238s |
LGTM Thanks for this @heimweh :) |
stack72
pushed a commit
that referenced
this pull request
Feb 23, 2017
* Remove custom imports * Add import support for service integrations
catsby
added a commit
that referenced
this pull request
Feb 23, 2017
* master: (499 commits) provider/aws: Fix the panic in ssm_association with parameters (#12215) Setting incident_urgency_rule as optional (#12211) Latest Section (#12151) provider/pagerduty: Import support for service integrations (#12141) command: fix test for new Meta type terraform: InstanceState.Meta is value type interface{} Update CHANGELOG.md flatmap: mark computed list as a computed value in Expand provider/azurerm: Bump AzureRM SDK to v8.0.1-beta (#11866) provider/profitbricks: fmt changes post cherry-pick provider/aws: Add missing SSM Links to documentation nav bar (#12202) update azure_network_interface documentation to say required for ip_configuration (#12185) Profitbricks primary nic fix (#12197) Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md Update CHANGELOG.md provider/aws: Lambda DeadLetterConfig support what was the value of the cluster id which caused the problem Corrected example code, cleared up token confusion (#12177) ...
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. |
ghost
locked and limited conversation to collaborators
Apr 16, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for importing service integrations as well as fixes an issue where
vendor
would never be set in the state.Since we need two IDs when importing a service integration (the
serviceID
and theserviceIntegrationID
) the import just tries to locate a service with the matching service integration ID,but it would be even better to be explicit here and maybe have something like:terraform import pagerduty_service_integration.main <serviceID>_<serviceIntegrationID>
Update: Since it's only possible to have one service integration for one service at a time, this should be a safe to do.
This PR also removes the unnecessary use of custom imports for the other PagerDuty resources.
Since we're not doing anything fancy with those we can just use
schema.ImportStatePassthrough
instead.Any feedback is more than welcome.