Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashicorp/terraform-provider-archive
Utility provider that provides a data source that can create zip archives for individual files or collections of files.
https://github.com/hashicorp/terraform-provider-archive
archive terraform terraform-provider
Last synced: 2 days ago
JSON representation
Utility provider that provides a data source that can create zip archives for individual files or collections of files.
- Host: GitHub
- URL: https://github.com/hashicorp/terraform-provider-archive
- Owner: hashicorp
- License: mpl-2.0
- Created: 2017-06-05T20:54:05.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-12-16T00:15:26.000Z (9 days ago)
- Last Synced: 2024-12-16T21:39:00.080Z (8 days ago)
- Topics: archive, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/hashicorp/archive/latest/docs
- Size: 11.3 MB
- Stars: 94
- Watchers: 21
- Forks: 63
- Open Issues: 46
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
# Terraform Provider: Archive
The Archive provider interacts with files.
It provides a data source that can create zip or tar.gz archives for individual files or
collections of files.## Documentation, questions and discussions
Official documentation on how to use this provider can be found on the
[Terraform Registry](https://registry.terraform.io/providers/hashicorp/archive/latest/docs).
In case of specific questions or discussions, please use the
HashiCorp [Terraform Providers Discuss forums](https://discuss.hashicorp.com/c/terraform-providers/31),
in accordance with HashiCorp [Community Guidelines](https://www.hashicorp.com/community-guidelines).We also provide:
* [Support](.github/SUPPORT.md) page for help when using the provider
* [Contributing](.github/CONTRIBUTING.md) guidelines in case you want to help this project
* [Design](DESIGN.md) documentation to understand the scope and maintenance decisionsThe remainder of this document will focus on the development aspects of the provider.
## Compatibility
Compatibility table between this provider,
the [Terraform Plugin Protocol](https://www.terraform.io/plugin/how-terraform-works#terraform-plugin-protocol)
version it implements, and Terraform:| Archive Provider | Terraform Plugin Protocol | Terraform |
|:----------------------:|:-------------------------:|:---------:|
| `>= 2.x` | `5` | `>= 0.12` |
| `>= 1.2.x`, `<= 1.3.x` | `4`, `5` | `>= 0.11` |
| `<= 1.1.x` | `4` | `<= 0.11` |## Requirements
* [Terraform](https://www.terraform.io/downloads)
* [Go](https://go.dev/doc/install) (1.22)
* [GNU Make](https://www.gnu.org/software/make/)
* [golangci-lint](https://golangci-lint.run/usage/install/#local-installation) (optional)## Development
### Building
1. `git clone` this repository and `cd` into its directory
2. `make` will trigger the Golang buildThe provided `GNUmakefile` defines additional commands generally useful during development,
like for running tests, generating documentation, code formatting and linting.
Taking a look at it's content is recommended.### Testing
In order to test the provider, you can run
* `make test` to run provider tests
* `make testacc` to run provider acceptance testsIt's important to note that acceptance tests (`testacc`) will actually spawn
`terraform` and the provider. Read more about they work on the
[official page](https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests).### Generating documentation
This provider uses [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs/)
to generate documentation and store it in the `docs/` directory.
Once a release is cut, the Terraform Registry will download the documentation from `docs/`
and associate it with the release version. Read more about how this works on the
[official page](https://www.terraform.io/registry/providers/docs).Use `make generate` to ensure the documentation is regenerated with any changes.
### Using a development build
If [running tests and acceptance tests](#testing) isn't enough, it's possible to set up a local terraform configuration
to use a development builds of the provider. This can be achieved by leveraging the Terraform CLI
[configuration file development overrides](https://www.terraform.io/cli/config/config-file#development-overrides-for-provider-developers).First, use `make install` to place a fresh development build of the provider in your
[`${GOBIN}`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies)
(defaults to `${GOPATH}/bin` or `${HOME}/go/bin` if `${GOPATH}` is not set). Repeat
this every time you make changes to the provider locally.Then, setup your environment following [these instructions](https://www.terraform.io/plugin/debugging#terraform-cli-development-overrides)
to make your local terraform use your local build.### Testing GitHub Actions
This project uses [GitHub Actions](https://docs.github.com/en/actions/automating-builds-and-tests) to realize its CI.
Sometimes it might be helpful to locally reproduce the behaviour of those actions,
and for this we use [act](https://github.com/nektos/act). Once installed, you can _simulate_ the actions executed
when opening a PR with:```shell
# List of workflows for the 'pull_request' action
$ act -l pull_request# Execute the workflows associated with the `pull_request' action
$ act pull_request
```## Releasing
The release process is automated via GitHub Actions, and it's defined in the Workflow
[release.yml](./.github/workflows/release.yml).Each release is cut by pushing a [semantically versioned](https://semver.org/) tag to the default branch.
## License
[Mozilla Public License v2.0](./LICENSE)