diff --git a/appoptics/resource_appoptics_alert.go b/appoptics/resource_appoptics_alert.go index 1bfd290..c7447bb 100644 --- a/appoptics/resource_appoptics_alert.go +++ b/appoptics/resource_appoptics_alert.go @@ -20,6 +20,9 @@ func resourceAppOpticsAlert() *schema.Resource { Read: resourceAppOpticsAlertRead, Update: resourceAppOpticsAlertUpdate, Delete: resourceAppOpticsAlertDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/appoptics/resource_appoptics_service.go b/appoptics/resource_appoptics_service.go index 0ef02cc..97d724a 100644 --- a/appoptics/resource_appoptics_service.go +++ b/appoptics/resource_appoptics_service.go @@ -19,6 +19,9 @@ func resourceAppOpticsService() *schema.Resource { Read: resourceAppOpticsServiceRead, Update: resourceAppOpticsServiceUpdate, Delete: resourceAppOpticsServiceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "type": { diff --git a/website/docs/r/alert.html.markdown b/website/docs/r/alert.html.markdown index 0ecb328..ad12b9c 100644 --- a/website/docs/r/alert.html.markdown +++ b/website/docs/r/alert.html.markdown @@ -65,3 +65,11 @@ Conditions (`condition`) support the following: Attributes (`attributes`) support the following: * `runbook_url` - a URL for the runbook to be followed when this alert is firing. Used in the AppOptics UI if set. + +## Import + +Alerts can be imported using the `id`, e.g. + +``` +$ terraform import appoptics_alert.foobar 13581321 +``` diff --git a/website/docs/r/service.html.markdown b/website/docs/r/service.html.markdown index 654a662..18e8de1 100644 --- a/website/docs/r/service.html.markdown +++ b/website/docs/r/service.html.markdown @@ -43,3 +43,11 @@ The following attributes are exported: * `type` - The type of notificaion. * `title` - The alert title. * `settings` - a JSON hash of settings specific to the alert type. + +## Import + +Services can be imported using the `id`, e.g. + +``` +$ terraform import appoptics_service.foobar 13581321 +```