Skip to content

Tool for importing resources from Bitbucket to Terraform using BitbucketAPI

Notifications You must be signed in to change notification settings

brnck/bitbucket-to-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitbucket-to-terraform

Tool for importing resources from Bitbucket to Terraform using BitbucketAPI

Context

This CLI app can fetch certain resources using Bitbucket API, iterate through the list of those resources and convert them Terraform resources while, also, providing an ability to generate terraform import ... statements to ensure smooth and easy terraforming of the Bitbucket environment.

By design this app prepares TF resources for zahiar/bitbucket terraform provider

Usage

~$: bb2tf --help
Usage of bb2tf:
  -bitbucket-password string
    	Bitbucket password (default "password")
  -bitbucket-username string
    	Bitbucket username (default "username")
  -bitbucket-workspace string
    	Which workspace to use (default "username")
  -fetch-projects
    	Fetch projects from the Bitbucket (default true)
  -fetch-repositories
    	Fetch repositories from the Bitbucket (default true)
  -generate-import-statements terraform import <...>
    	Generates shell script terraform import <...> (default true)
  -import-statements-path string
    	If --generate-import-statements=true, it will be used as path for the file (default "./")
  -load-projects-path string
    	Where to extract projects (folder path, not file) (default "./")
  -load-repositories-path string
    	Where to extract repositories (folder path, not file) (default "./")
  -verbose int
    	Log severity level [1-7] (default 4)

About

Tool for importing resources from Bitbucket to Terraform using BitbucketAPI

Resources

Stars

Watchers

Forks

Packages

No packages published