diff options
author | Mat Schaffer <mat@schaffer.me> | 2019-06-22 11:53:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-22 11:53:00 +0900 |
commit | 13dee36f20aabaf4adfc553084b77b2ac0f00cf2 (patch) | |
tree | d42a4382c78d70ddd6e56f61150c4d37bb9e14e8 | |
parent | 5d0bc79c3d814db8ea224672ed20c40952ed71cc (diff) | |
parent | cfbd89c06cc2bfc2e4defc067dc3a8841404a95d (diff) | |
download | terraform-provider-statuscake-13dee36f20aabaf4adfc553084b77b2ac0f00cf2.tar.gz terraform-provider-statuscake-13dee36f20aabaf4adfc553084b77b2ac0f00cf2.tar.zst terraform-provider-statuscake-13dee36f20aabaf4adfc553084b77b2ac0f00cf2.zip |
Merge pull request #36 from nauxliu/importer
Add importer
-rw-r--r-- | statuscake/resource_statuscaketest.go | 3 | ||||
-rw-r--r-- | website/docs/r/test.html.markdown | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/statuscake/resource_statuscaketest.go b/statuscake/resource_statuscaketest.go index d32a870..5af5b8f 100644 --- a/statuscake/resource_statuscaketest.go +++ b/statuscake/resource_statuscaketest.go | |||
@@ -34,6 +34,9 @@ func resourceStatusCakeTest() *schema.Resource { | |||
34 | Update: UpdateTest, | 34 | Update: UpdateTest, |
35 | Delete: DeleteTest, | 35 | Delete: DeleteTest, |
36 | Read: ReadTest, | 36 | Read: ReadTest, |
37 | Importer: &schema.ResourceImporter{ | ||
38 | State: schema.ImportStatePassthrough, | ||
39 | }, | ||
37 | 40 | ||
38 | Schema: map[string]*schema.Schema{ | 41 | Schema: map[string]*schema.Schema{ |
39 | "test_id": { | 42 | "test_id": { |
diff --git a/website/docs/r/test.html.markdown b/website/docs/r/test.html.markdown index f5cc5e0..3513f73 100644 --- a/website/docs/r/test.html.markdown +++ b/website/docs/r/test.html.markdown | |||
@@ -64,3 +64,11 @@ The following arguments are supported: | |||
64 | The following attribute is exported: | 64 | The following attribute is exported: |
65 | 65 | ||
66 | * `test_id` - A unique identifier for the test. | 66 | * `test_id` - A unique identifier for the test. |
67 | |||
68 | ## Import | ||
69 | |||
70 | StatusCake test can be imported using the test id, e.g. | ||
71 | |||
72 | ``` | ||
73 | tf import statuscake_test.example 123 | ||
74 | ``` \ No newline at end of file | ||