From 143ecec500e098553e442d69ffc7c7f785093185 Mon Sep 17 00:00:00 2001 From: Brad Sickles Date: Sat, 25 Jun 2016 09:34:39 -0400 Subject: [PATCH] Implement archive provider and "archive_file" resource. --- .../main.go | 4 +- builtin/providers/archive/archive-content.zip | Bin 0 -> 161 bytes builtin/providers/archive/archive-dir.zip | Bin 0 -> 409 bytes builtin/providers/archive/archive-file.zip | Bin 0 -> 165 bytes .../providers/{zip => archive}/archiver.go | 2 +- .../providers/{zip => archive}/provider.go | 4 +- .../{zip => archive}/provider_test.go | 4 +- .../resource_archive_file.go} | 28 ++--- .../archive/resource_archive_file_test.go | 92 +++++++++++++++ .../archive/test-fixtures/test-dir/file1.txt | 1 + .../archive/test-fixtures/test-dir/file2.txt | 1 + .../archive/test-fixtures/test-dir/file3.txt | 1 + .../archive/test-fixtures/test-file.txt | 1 + .../{zip => archive}/zip_archiver.go | 2 +- .../{zip => archive}/zip_archiver_test.go | 49 +------- .../providers/zip/resource_zip_file_test.go | 109 ------------------ command/internal_plugin_list.go | 4 +- .../providers/archive/index.html.markdown | 20 ++++ .../providers/{zip => archive}/r/file.html.md | 12 +- .../docs/providers/zip/index.html.markdown | 20 ---- .../source/layouts/{zip.erb => archive.erb} | 10 +- 21 files changed, 157 insertions(+), 207 deletions(-) rename builtin/bins/{provider-zip => provider-archive}/main.go (56%) create mode 100644 builtin/providers/archive/archive-content.zip create mode 100644 builtin/providers/archive/archive-dir.zip create mode 100644 builtin/providers/archive/archive-file.zip rename builtin/providers/{zip => archive}/archiver.go (98%) rename builtin/providers/{zip => archive}/provider.go (82%) rename builtin/providers/{zip => archive}/provider_test.go (88%) rename builtin/providers/{zip/resource_zip_file.go => archive/resource_archive_file.go} (83%) create mode 100644 builtin/providers/archive/resource_archive_file_test.go create mode 100644 builtin/providers/archive/test-fixtures/test-dir/file1.txt create mode 100644 builtin/providers/archive/test-fixtures/test-dir/file2.txt create mode 100644 builtin/providers/archive/test-fixtures/test-dir/file3.txt create mode 100644 builtin/providers/archive/test-fixtures/test-file.txt rename builtin/providers/{zip => archive}/zip_archiver.go (99%) rename builtin/providers/{zip => archive}/zip_archiver_test.go (56%) delete mode 100644 builtin/providers/zip/resource_zip_file_test.go create mode 100644 website/source/docs/providers/archive/index.html.markdown rename website/source/docs/providers/{zip => archive}/r/file.html.md (85%) delete mode 100644 website/source/docs/providers/zip/index.html.markdown rename website/source/layouts/{zip.erb => archive.erb} (59%) diff --git a/builtin/bins/provider-zip/main.go b/builtin/bins/provider-archive/main.go similarity index 56% rename from builtin/bins/provider-zip/main.go rename to builtin/bins/provider-archive/main.go index fd7dd9709159..994b5776b36d 100644 --- a/builtin/bins/provider-zip/main.go +++ b/builtin/bins/provider-archive/main.go @@ -1,12 +1,12 @@ package main import ( - "github.com/hashicorp/terraform/builtin/providers/zip" + "github.com/hashicorp/terraform/builtin/providers/archive" "github.com/hashicorp/terraform/plugin" ) func main() { plugin.Serve(&plugin.ServeOpts{ - ProviderFunc: zip.Provider, + ProviderFunc: archive.Provider, }) } diff --git a/builtin/providers/archive/archive-content.zip b/builtin/providers/archive/archive-content.zip new file mode 100644 index 0000000000000000000000000000000000000000..be74d13a76673d3b9cc122fc98d8c510b0a61cae GIT binary patch literal 161 zcmWIWW@Zs#-~d8&zzq~g&d)1J%`4F>sVLz(c|s?QVbP;McS2g9{Mj?<${ryHpo;(h x1H9Qe?(JfEAPMA&0C9jfBa;Y_1v3*_4rC@OK(Zmgo0SbD$q0m&KspGl5&#BGA5;JU literal 0 HcmV?d00001 diff --git a/builtin/providers/archive/archive-dir.zip b/builtin/providers/archive/archive-dir.zip new file mode 100644 index 0000000000000000000000000000000000000000..1780db33a34206de310ff331f760123d58e9b3bb GIT binary patch literal 409 zcmWIWW@Zs#-~d8&zzGyc%gjkN)GMhd;W~LjCyZgymNRogSe+e!GXMVvc(ZeO1qyZv z19^Nv96-<{BXpCL5hi_LkPs%`Bx7`wk`X4Q8OWy~Ok!jbVL« Documentation Home - > - Template Provider + > + Template Provider - > + > Resources