From cfbd89c06cc2bfc2e4defc067dc3a8841404a95d Mon Sep 17 00:00:00 2001 From: Xiangxuan Liu Date: Tue, 18 Jun 2019 11:21:00 +0800 Subject: Add importer --- statuscake/resource_statuscaketest.go | 3 +++ website/docs/r/test.html.markdown | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go index b062456..d8604e6 100644 --- a/statuscake/resource_statuscaketest.go +++ b/statuscake/resource_statuscaketest.go @@ -34,6 +34,9 @@ func resourceStatusCakeTest() *schema.Resource { Update: UpdateTest, Delete: DeleteTest, Read: ReadTest, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "test_id": { diff --git a/website/docs/r/test.html.markdown b/website/docs/r/test.html.markdown index 6c65f10..0f99fb4 100644 --- a/website/docs/r/test.html.markdown +++ b/website/docs/r/test.html.markdown @@ -63,3 +63,11 @@ The following arguments are supported: The following attribute is exported: * `test_id` - A unique identifier for the test. + +## Import + +StatusCake test can be imported using the test id, e.g. + +``` +tf import statuscake_test.example 123 +``` \ No newline at end of file -- cgit v1.2.3