]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/commitdiff
Add importer
authorXiangxuan Liu <xiangxuan.liu@rightcapital.com>
Tue, 18 Jun 2019 03:21:00 +0000 (11:21 +0800)
committerXiangxuan Liu <xiangxuan.liu@rightcapital.com>
Tue, 18 Jun 2019 03:32:33 +0000 (11:32 +0800)
statuscake/resource_statuscaketest.go
website/docs/r/test.html.markdown

index b062456ae5140b72ec588a6c42c4a67a1e39ef5c..d8604e6fa88764d97e66dcac81001fc990ebff0f 100644 (file)
@@ -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": {
index 6c65f1004ab76110671e3c1f20fe68e1af3c7782..0f99fb4c4ef34ace399cbd8b2f77faae1803fd6a 100644 (file)
@@ -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