Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/archive: Implementing archive provider #7322

Merged
merged 1 commit into from
Aug 8, 2016

Conversation

BSick7
Copy link
Contributor

@BSick7 BSick7 commented Jun 24, 2016

Purpose

This introduces a provider to generate archive files from content, a file, or a directory of files.
The original impetus for this is the ability to package lambda functions on-the-fly without the need for specific zip utilities packaged in your repo.

This PR only includes support for zip files.

Checklist

  • Implement archive provider
  • Implement archive_file resource
  • Test archive_file resource
  • Implement "zip" archiver
  • Test "zip" archiver
  • Add archive provider docs

@steve-jansen
Copy link
Contributor

👍 this will make it so much easier to work with aws_lambda_finction resources

@BSick7 BSick7 force-pushed the zip-provider branch 2 times, most recently from 9908c19 to b5dc1a5 Compare June 25, 2016 13:14
@BSick7 BSick7 changed the title [wip] provider/zip: Implementing zip provider provider/zip: Implementing zip provider Jun 25, 2016
@BSick7 BSick7 changed the title provider/zip: Implementing zip provider provider/archive: Implementing archive provider Jun 25, 2016
@BSick7 BSick7 force-pushed the zip-provider branch 2 times, most recently from 143ecec to 910ac03 Compare June 25, 2016 13:38
@stack72
Copy link
Contributor

stack72 commented Aug 8, 2016

So i've been testing this for a while now with lambda and it works well - i am going to merge it :) I believe it's a simple and effective way of getting going

Thanks @BSick7

@stack72 stack72 merged commit 70cadcf into hashicorp:master Aug 8, 2016
@stack72
Copy link
Contributor

stack72 commented Aug 8, 2016

% make testacc TEST=./builtin/providers/archive TESTARGS='-run=TestAccArchiveFile_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/08 12:49:20 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/archive -v -run=TestAccArchiveFile_ -timeout 120m
=== RUN   TestAccArchiveFile_Basic
--- PASS: TestAccArchiveFile_Basic (0.04s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/archive    0.052s

NOTE: One of `source_content_filename` (with `source_content`), `source_file`, or `source_dir` must be specified.

* `type` - (required) The type of archive to generate.
NOTE: `archive` is supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should say zip, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find! I guess I was a little aggressive when I renamed zip to archive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ask0n
Copy link

ask0n commented Sep 2, 2016

Maybe I have missed something, but how does it track, that source_file was changed? I didn't find anything similar to source_code_hash of aws_lambda_function.

@ponyfleisch
Copy link

Hey all! Please take note of #9924, which implements a base_archive argument so you can keep all the dependencies of the lambda function in an archive and add individual files to that instead of cluttering the directory tree (and your repository)

Let me know if there is anything i can do to increase the chances of this ending up in terraform. I'm planning to release a module that makes use of this.

@ghost
Copy link

ghost commented Apr 20, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants