{ "info": { "author": "Ben Fortuna", "author_email": "fortuna@micronode.com", "bugtrack_url": null, "classifiers": [], "description": "# Bedrock Command-line Interface (CLI)\n\nA command line tool for managing Terraform blueprints.\n\n## Overiew\n\nThe Bedrock command line tool builds on the excellent features of Terraform to provide a \"no-code\" approach to\nprovisioning infrastructure.\n\n\n## Introduction\n\nBedrock can be used as a drop-in replacement for Terraform, in that all the commands are the same except for two key\ndifferences:\n\nFirst, all commands are executed in the context of a `blueprint`, which is a predefined Terraform\nconfiguration. Each command will prompt for selection from a list of registered blueprints before executing\nthe command.\n\nThe other key difference is that all local state, modules, plugins, etc. are stored under a single directory, which\nby default is the current user directory but can be defined as any local directory. This means that you don't need to \nchange directories in order to run commands on different Terraform configurations.\n\n\n## Bedrock Commands\n\nTo support these key differences Bedrock introduces three additional commands that are not available with Terraform:\n\n### Backend\n\nThe backend command supports configuration of Terraform state management, which may be either a `local`, `s3`, or\n`remote` configuration.\n\nA local configuration is the default for all blueprints, and just means that state is stored locally under the \n`~/.bedrock` directory. Whilst no configuration is required for local state, it can be a poor choice if you don't \ncreate regular backups or use ephemeral execution environments.\n\nAn AWS S3 bucket may be used to store Terraform state securely, which requires the appropriate credentials to be\nconfigured to read and write to the bucket.\n\nFinally a remote configuration using Terraform Cloud may be configured for which a configuration file should be\nprovided in the user home directory (i.e. `.terraformrc`).\n\n_NOTE:_ Terraform doesn't support different backend configurations for workspaces in a single configuration. This\nmeans that you must use the same state management configuration for all instances of a blueprint. If you need to\nmanage multiple independent configuration sets you can create and run in different blueprint directories. \n\n\n### Config\n\nIf a blueprint doesn't provide default values for all variables, or if you would like to override some defaults, you\nmay use the Bedrock config command. This is a simple way to specify variables values using a `key=value` format. For\nmore complex variable configurations you may specify a var-file location for some commands using the `-var-file` option.\n\n### Blueprint\n\nFinally, the blueprint command allows you to configure and manage registered blueprints. Whilst the default blueprints\nmay support general purpose use-cases, sometimes you may want to provide your own more specialised blueprints for use\nwith the Bedrock command line tool.\n\nTo create a Bedrock-compatible blueprint you just need to create a Docker image that includes a version of Terraform,\nand the blueprint configuration under the `/blueprint` directory.\n\n\n## Workspaces\n\nTo support creating multiple instances of a blueprint you may use Terraform workspaces in the same way as you would\nwith the Terraform command line tool. For each blueprint workspace, Bedrock will provide separate state management and\nvariable overrides.\n\nAs workspaces may be used to create blueprint instances across multiple environments and accounts, some care should\nbe taken to define a workspace naming convention. For example, you may wish to prefix workspace names with the\naccount number, followed by application name, environment, etc.\n\nAs an example, to configure an ECS cluster I might create a workspace such as: `987654321-myapp-staging`\n\n\n## Blueprint Home Directory\n\nAs mentioned earlier all local state and configuration is maintained in a single default directory. Sometimes you\nmay require isolation of state files, such as when managing different tenancies or separation of production and\nnon-production environments.\n\nBedrock supports an environment variable to override the default blueprint home directory, which you can specify\neither on the command line or export to your environment:\n\n $ BLUEPRINT_HOME=/tmp/bedrock bedrock workspace list\n\nUsed in conjunction with target environment overrides (such as `AWS_PROFILE` for AWS tenancy management) you can\nswitch between different tenancies very easily:\n\n $ AWS_PROFILE=staging BLUEPRINT_HOME=/opt/bedrock/staging bedrock apply # make changes in staging environment\n\n\n\n--------------\n\n## Introduction\n\nThe bedrock CLI is a simple tool to help manage the execution of Terraform blueprints.\n\nYou typically may have a number of Terraform configurations that you use across multiple environments (e.g. dev, test prod, etc.).\nAs these configurations grow that can become difficult to manage.\n\nBedrock makes it easy to provision configuration _blueprints_ from anywhere so you can focus on building rather than configuring \nyour environments.\n\n### What is a Blueprint?\n\nWe all know the benefits of Terraform Modules, and the many ways that they can be published and consumed. Bedrock extends on this concept\nof portable configurations to include things that you wouldn't usually package with a module (e.g. provider configuration, etc.)\n\nEssentially a Blueprint is a complete Terraform configuration packaged as a Docker image that can be executed anywhere Docker is supported.\n\nFor Bedrock to manage your blueprints all you need is a Docker image (one for each blueprint), with the Terraform \nconfiguration in the `/blueprint` path. The image should also include a Terraform runtime as the default entry point\n(see the official Terraform Docker image for example).\n\nBedrock will manage the backend configuration, inputs and provider configuration in a configurable location, such that \nyour blueprint instances are accessible and easily managed from anywhere.\n\n\n## Getting Started\n\nYou can install bedrock CLI via pip as follows:\n\n $ pip install bedrockcli\n\n\n\n## Projects\n\nAs it is likely that you work with more than one Cloud environment, Bedrock supports multiple projects each with\ndifferent backend configurations. This allows you to isolate the state management for different environments as\nrequired.\n\n\n## Commands\n\nBedrock commands are grouped by three primary sub-commands: project, blueprint and instance. Project commands\nrelate to managing active project configurations; blueprint commands are for managing registered blueprints; and\ninstance commands are used to provision blueprint instances.\n\n### Project\n\nManage project configurations.\n\nSubcommands:\n\n* list - show available project configurations\n* switch - switch to a named project\n* new - create a new project\n* set-backend - update the project configuration backend\n\n### Blueprint\n\nManage registered blueprints.\n\nSubcommands:\n\n* list - show available blueprints\n* add - register a new blueprint\n\n``` bash\n$ bedrock blueprint list\n\necs-task-definition - Template for ECS tasks\naws-launch-template - Template for EC2 instances\naws-spot-fleet - AWS Spot Fleet request\naws-ecs-cluster - AWS ECS cluster provisioning\n...\n```\n\n### Instance\n\nProvision blueprint instances.\n\nSubcommands:\n\n* new - create a new blueprint instance.\n* list - list known instances\n* refresh - update a named blueprint instance\n* destroy - remove a named blueprint instance\n\n``` bash\n$ bedrock instance new ecs-task-definition\n\nName [default]: apachesling\nBackend type [S3]: s3\nNamespace: staging\nVolumes: ...\nMounts: ...\n\nInitialising workspace..\n```\n\n### List\n\nList existing blueprint instances.\n\n``` bash\n$ bedrock list\n\necs-task-definition:\n - apachesling\n\naws-launch-template:\n - reverseproxy\n\naws-spot-fleet:\n - reverseproxy\n...\n```\n\n### Refresh\n\nRefresh a blueprint instance.\n\n``` bash\n$ bedrock refresh\n\nSelect workspace to refresh: reverseproxy (aws-spot-fleet)\n\nRefreshing reverseproxy (aws-spot-fleet).. \n```\n\n### Destroy\n\nDestroy a blueprint instance.\n\n``` bash\n$ bedrock destroy\n\nSelect workspace to destroy: reverseproxy (aws-spot-fleet)\n\nAre you sure you want to destroy reverseproxy (aws-spot-fleet) [N]? Y\n\nDestroying reverseproxy (aws-spot-fleet).. \n```\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/micronode/bedrock-cli", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "bedrockcli", "package_url": "https://pypi.org/project/bedrockcli/", "platform": "", "project_url": "https://pypi.org/project/bedrockcli/", "project_urls": { "Homepage": "https://github.com/micronode/bedrock-cli" }, "release_url": "https://pypi.org/project/bedrockcli/1.0.7/", "requires_dist": [ "PyYAML (>=5.3.1)", "docker (>=4.4.0)", "dockerpty", "simple-term-menu" ], "requires_python": ">=3.7", "summary": "A tool for managing Terraform blueprints", "version": "1.0.7", "yanked": false, "yanked_reason": null }, "last_serial": 9209456, "releases": { "1.0.4": [ { "comment_text": "", "digests": { "md5": "5c426bd2110aef399783d40c05669f35", "sha256": "955067ecccb47b782fa2f717c78470ee0f0dc82389bac690e1f4a73b4e7774ed" }, "downloads": -1, "filename": "bedrockcli-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5c426bd2110aef399783d40c05669f35", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 16215, "upload_time": "2019-10-22T03:51:50", "upload_time_iso_8601": "2019-10-22T03:51:50.459597Z", "url": "https://files.pythonhosted.org/packages/8e/aa/f5df289db51e98306b0fe49d4404bd3c369604c9bf6f0096f55787a3ba1e/bedrockcli-1.0.4.tar.gz", "yanked": true, "yanked_reason": "Obsolete" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "427862746e8a52dce9710e1a050c2b1a", "sha256": "ab7bd81945817908f6d7aa7f893443ef49d2687bbc3d82dd5ee4fc504741bb71" }, "downloads": -1, "filename": "bedrockcli-1.0.5.tar.gz", "has_sig": false, "md5_digest": "427862746e8a52dce9710e1a050c2b1a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 16245, "upload_time": "2019-10-22T06:28:56", "upload_time_iso_8601": "2019-10-22T06:28:56.879952Z", "url": "https://files.pythonhosted.org/packages/16/68/3a3624322e92ff53e3e81a4aecb7b73652b6cfca5fad57d9f320b21ba8dc/bedrockcli-1.0.5.tar.gz", "yanked": true, "yanked_reason": "Obsolete" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "973e70c2d7b64ccb8475b9213d9a35f2", "sha256": "2d9d2ebe86154081b98eb17b5ef34b0a199d8d82e5e2ef34eec311805a89d6af" }, "downloads": -1, "filename": "bedrockcli-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "973e70c2d7b64ccb8475b9213d9a35f2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 14099, "upload_time": "2020-12-03T04:30:16", "upload_time_iso_8601": "2020-12-03T04:30:16.055706Z", "url": "https://files.pythonhosted.org/packages/4d/ab/32c1b91d9520a1f59f9521f6e77371db4aac136ea7af5d945ae36f904978/bedrockcli-1.0.6-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "d296270b3630ff1d5ffc22372d061b80", "sha256": "326907f5bbcb573a02b7d93a33450c05e327459f50d92352921ad4f89fbf3a9a" }, "downloads": -1, "filename": "bedrockcli-1.0.6.tar.gz", "has_sig": false, "md5_digest": "d296270b3630ff1d5ffc22372d061b80", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 8606, "upload_time": "2020-12-03T04:30:17", "upload_time_iso_8601": "2020-12-03T04:30:17.251365Z", "url": "https://files.pythonhosted.org/packages/a1/b3/cb025ac3e2eac3179dfdb4b58f5c4d912722eda515f067da538792832284/bedrockcli-1.0.6.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "db46f527c00a138aff0f345c3fa381cc", "sha256": "7396676c7b582824fb3f7ddd831f8a29b6d4b2a50eb1b2479642525af488164d" }, "downloads": -1, "filename": "bedrockcli-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "db46f527c00a138aff0f345c3fa381cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 18146, "upload_time": "2021-01-23T08:32:51", "upload_time_iso_8601": "2021-01-23T08:32:51.673108Z", "url": "https://files.pythonhosted.org/packages/5d/95/c38f85d741d1a3fd058c0402015478ff71f6fb8e5c0fc5d5ef8c645d7c2f/bedrockcli-1.0.7-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "6574dde7b740ca946fcc65be9743b481", "sha256": "cb73ccdeb77a060df7e17cbd5fe5ebdea5c030a5a3bf0d5ce8ed340c8ef45bf0" }, "downloads": -1, "filename": "bedrockcli-1.0.7.tar.gz", "has_sig": false, "md5_digest": "6574dde7b740ca946fcc65be9743b481", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 13583, "upload_time": "2021-01-23T08:32:52", "upload_time_iso_8601": "2021-01-23T08:32:52.627810Z", "url": "https://files.pythonhosted.org/packages/19/3c/adc9bed0e245ee17ffe9ce417d1f11621249d9baaf07723584b82582f16b/bedrockcli-1.0.7.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db46f527c00a138aff0f345c3fa381cc", "sha256": "7396676c7b582824fb3f7ddd831f8a29b6d4b2a50eb1b2479642525af488164d" }, "downloads": -1, "filename": "bedrockcli-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "db46f527c00a138aff0f345c3fa381cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 18146, "upload_time": "2021-01-23T08:32:51", "upload_time_iso_8601": "2021-01-23T08:32:51.673108Z", "url": "https://files.pythonhosted.org/packages/5d/95/c38f85d741d1a3fd058c0402015478ff71f6fb8e5c0fc5d5ef8c645d7c2f/bedrockcli-1.0.7-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "6574dde7b740ca946fcc65be9743b481", "sha256": "cb73ccdeb77a060df7e17cbd5fe5ebdea5c030a5a3bf0d5ce8ed340c8ef45bf0" }, "downloads": -1, "filename": "bedrockcli-1.0.7.tar.gz", "has_sig": false, "md5_digest": "6574dde7b740ca946fcc65be9743b481", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 13583, "upload_time": "2021-01-23T08:32:52", "upload_time_iso_8601": "2021-01-23T08:32:52.627810Z", "url": "https://files.pythonhosted.org/packages/19/3c/adc9bed0e245ee17ffe9ce417d1f11621249d9baaf07723584b82582f16b/bedrockcli-1.0.7.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }