Guest User

Untitled

a guest
Jun 20th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. FROM golang:alpine AS terraform-bundler-build
  2.  
  3. RUN apk --no-cache add git unzip &&
  4. go get -d -v github.com/hashicorp/terraform &&
  5. go install ./src/github.com/hashicorp/terraform/tools/terraform-bundle
  6.  
  7. COPY terraform-bundle.hcl .
  8.  
  9. RUN terraform-bundle package terraform-bundle.hcl &&
  10. mkdir -p terraform-bundle &&
  11. unzip -d terraform-bundle terraform_*.zip
  12.  
  13. ####################
  14.  
  15. FROM python:alpine
  16.  
  17. RUN apk add --no-cache git make &&
  18. pip install awscli
  19.  
  20. COPY --from=terraform-bundler-build /go/terraform-bundle/* /usr/local/bin/
  21.  
  22. terraform {
  23. # Version of Terraform to include in the bundle. An exact version number
  24. # is required.
  25. version = "0.10.0"
  26. }
  27.  
  28. # Define which provider plugins are to be included
  29. providers {
  30. # Include the newest "aws" provider version in the 1.0 series.
  31. aws = ["~> 1.0"]
  32.  
  33. # Include both the newest 1.0 and 2.0 versions of the "google" provider.
  34. # Each item in these lists allows a distinct version to be added. If the
  35. # two expressions match different versions then _both_ are included in
  36. # the bundle archive.
  37. google = ["~> 1.0", "~> 2.0"]
  38.  
  39. # Include a custom plugin to the bundle. Will search for the plugin in the
  40. # plugins directory, and package it with the bundle archive. Plugin must have
  41. # a name of the form: terraform-provider-*, and must be build with the operating
  42. # system and architecture that terraform enterprise is running, e.g. linux and amd64
  43. customplugin = ["0.1"]
  44. }
Add Comment
Please, Sign In to add comment