]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/commitdiff
Merge pull request #36 from nauxliu/importer
authorMat Schaffer <mat@schaffer.me>
Sat, 22 Jun 2019 02:53:00 +0000 (11:53 +0900)
committerGitHub <noreply@github.com>
Sat, 22 Jun 2019 02:53:00 +0000 (11:53 +0900)
Add importer

statuscake/resource_statuscaketest.go
website/docs/r/test.html.markdown

index d32a870e935313a50d41c67874fd89f8300f3581..5af5b8fafa35283df6c81af2af4c54158f1952c2 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 f5cc5e052de787d0556e15104ec835aa5e310739..3513f732bbd5ade26d4247430f301e2e948ef09b 100644 (file)
@@ -64,3 +64,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