Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffwecan/terraform-provider-pypi
Terraform provider aimed at facilitating downloading Python requirements.
https://github.com/jeffwecan/terraform-provider-pypi
provider pypi terraform
Last synced: 24 days ago
JSON representation
Terraform provider aimed at facilitating downloading Python requirements.
- Host: GitHub
- URL: https://github.com/jeffwecan/terraform-provider-pypi
- Owner: jeffwecan
- License: mpl-2.0
- Created: 2020-05-30T22:12:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T21:21:34.000Z (over 1 year ago)
- Last Synced: 2024-06-20T12:43:17.053Z (5 months ago)
- Topics: provider, pypi, terraform
- Language: Go
- Homepage:
- Size: 92.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-pypi
Terraform provider aimed at facilitating downloading Python requirements when needed during Terraform runs. For example, when packaging an AWS lambda deployment.
## Usage
Downloading the latest release of a package to a directory (this will attempt to download a `bdist_wheel` artifact by default and fallback to a `sdist` only if the `*whl` file isn't available):
```hcl
data "pypi_package_file" "hvac_latest" {
name = "hvac"
output_dir = "${path.module}/hvac_latest"
}
```Downloading a specific version:
```hcl
data "pypi_package_files" "mah_requirements" {
requirements_file = "${path.module}/requirements.txt"
output_dir = "${path.module}/hvac_0-10-1"
}
```## Development
### Installing Locally
```shellsession
$ VERSION=0.0.1 make install
GO111MODULE=on go build -o ./bin/terraform-provider-pypi_0.0.1
cp ./bin/terraform-provider-pypi_0.0.1 ~/.terraform.d/plugins/
```### Releases
```shellsession
# Hit CTRL+d after typing some stuff to cache your GPG key password...
$ gpg --armor --detach-sign
hi
-----BEGIN PGP SIGNATURE-----
[...]
-----END PGP SIGNATURE-----
``````shellsession
$ export GITHUB_TOKEN=''
$ git tag v0.0.1
$ goreleaser release --rm-dist
```