Skip to content

Terraform provider aimed at facilitating downloading Python requirements.

License

Notifications You must be signed in to change notification settings

jeffwecan/terraform-provider-pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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):

data "pypi_package_file" "hvac_latest" {
  name       = "hvac"
  output_dir = "${path.module}/hvac_latest"
}

Downloading a specific version:

data "pypi_package_files" "mah_requirements" {
  requirements_file = "${path.module}/requirements.txt"
  output_dir = "${path.module}/hvac_0-10-1"
}

Development

Installing Locally

$ 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

# Hit CTRL d after typing some stuff to cache your GPG key password...
$ gpg --armor --detach-sign
hi
-----BEGIN PGP SIGNATURE-----
[...]
-----END PGP SIGNATURE-----
$ export GITHUB_TOKEN='<personal access token with public_repo scope>'
$ git tag v0.0.1
$ goreleaser release --rm-dist

About

Terraform provider aimed at facilitating downloading Python requirements.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published