Skip to content

Terraform Module deploying privatebin on Cloud Run and GCS

Notifications You must be signed in to change notification settings

isabella232/terraform-google-privatebin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless deployment of PrivateBin on GCS

This module deploys privatebin as a serverless application on Google Cloud Platform.

The backend is deployed as using Google Cloud Run and the pastes are stored on Google Cloud Storage. Google Cloud Storage support is already on the master branch of PrivateBin, but it is not yet released. Currently the image eu.gcr.io/binx-io-public/privatebin/gcs:f9ccd67 is used.

This module will create the following resources:

  • storage bucket named privatebin-<google project name>
  • service account named privatebin
  • a cloud run service named privatebin
  • a secret named privatebin-configuration

deploying

To deploy privatebin in your Google project, add the following module to your terraform template:

module "privatebin" {
  source  = "git::https:/github.com/binxio/terraform-google-privatebin.git?ref=0.2.0"

  providers = {
    google      = google
    google-beta = google-beta
  }
}

The application will be deployed in the project and region specified by the passed in providers. After terraform apply, the output will print the URL of your privatebin installation. Alternatively you can open in Cloud Shell.

building your own image

to build your own image of the privatebin application, type:

git clone git@github.com:PrivateBin/docker-nginx-fpm-alpine.git
cd docker-nginx-fpm-alpine
docker build --build-arg RELEASE=master --tag $YOUR_IMAGE --output type=registry,push=true .

Now you set the variable image to $YOUR_IMAGE.

configure the privatebin configuration

You can configure your own privatebin configuration file. Make sure that you set the storage class to GoogleCloudStorage

[model]
class = GoogleCloudStorage

and the bucket name to ${private_bucket_name}:

[model_options]
bucket = "${privatebin_bucket_name}"

About

Terraform Module deploying privatebin on Cloud Run and GCS

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%