bogform

module
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MPL-2.0

README

Bogform

Bogform is a cheap, secure, and friendly way to manage your infrastructure as code, without paying for a hosted platform. It's a fork of OpenTofu that keeps the same language and workflow, so existing projects move over by swapping the executable.

Documentation | Install | Moving from OpenTofu or Terraform

bogform init
bogform plan
bogform apply

Ways to run it

  • Local: run the bogform command on your own machine. bogform ui shows your pipeline reports in a local dashboard, with nothing to host.
  • Repository: plan on pull requests and apply on merge or on demand, using GitHub Actions, GitLab CI, Azure Pipelines, or Bitbucket Pipelines. bogform ci init writes the pipeline, signed in to AWS or Azure with OIDC, and a BOGFORM.md that explains the setup to people and coding agents.
  • Self-hosted dashboard: an optional web app that you deploy to your own AWS account, using CloudFront, AWS Lambda, and any Postgres database. It shows your runs and drift, sends alerts to Slack, Teams, email or a webhook, and starts runs in your existing pipelines, so there are no runners to host.

Key features

  • Infrastructure as code: describe your infrastructure in configuration that you can version, review, and reuse.
  • Execution plans: see exactly what will change before anything does.
  • Resource graph: changes are ordered by their dependencies and run in parallel where possible.
  • Existing providers and modules: use the providers and modules from the OpenTofu Registry.
  • State encryption: encrypt state and plan files with a key provider you control. The passphrase can come from an environment variable, your OS keychain, AWS SSM or Azure Key Vault.
  • State in your repository: the git backend keeps encrypted state on a branch, with bogform state history and state restore to undo a bad change.
  • Safer pull requests: plans list destroys first and run built-in checks for common AWS and Azure mistakes, applies refuse destroys unless a person allows them, and plans can include a monthly cost estimate.
  • Easy to adopt: bogform migrate tfc leaves HCP Terraform, bogform adopt writes import blocks for resources you already have, bogform bootstrap sets up pipeline access to AWS or Azure, and bogform doctor checks the result.

Install

brew install --cask bogware/tap/bogform                                          # macOS
scoop bucket add bogware https://github.com/bogware/scoop-bucket; scoop install bogform  # Windows
curl -fsSL https://raw.githubusercontent.com/bogware/bogform/main/scripts/install.sh | sh    # Linux and others

See Installing Bogform for winget, packages and containers.

Compatibility

Bogform reads existing .tf and .tofu files, TF_* environment variables, state, and lock files. It adds .bog files and BOG_* variables, which take priority. The HCP Terraform cloud block and the remote backend aren't supported, and Bogform explains how to move your state if it finds them.

Contributing and security

License

Bogform is licensed under the Mozilla Public License 2.0. It's derived from OpenTofu, which in turn derives from Terraform as it was licensed under the MPL 2.0. Copyright notices for those projects are kept in the source files. Bogform isn't affiliated with or endorsed by the OpenTofu project, the Linux Foundation, or HashiCorp.

Directories

Path Synopsis
cmd
bogform command
bogform-server command
Command bogform-server is the optional self-hosted Bogform dashboard.
Command bogform-server is the optional self-hosted Bogform dashboard.
internal
addrs
Package addrs contains types that represent "addresses", which are references to specific objects within a Bogform configuration or state.
Package addrs contains types that represent "addresses", which are references to specific objects within a Bogform configuration or state.
adopt
Package adopt finds existing cloud resources and writes import blocks for them, so that a configuration can take over infrastructure that was created some other way.
Package adopt finds existing cloud resources and writes import blocks for them, so that a configuration can take over infrastructure that was created some other way.
backend
Package backend provides interfaces that the CLI uses to interact with Bogform.
Package backend provides interfaces that the CLI uses to interact with Bogform.
backend/init
Package init contains the list of backends that can be initialized and basic helper functions for initializing those backends.
Package init contains the list of backends that can be initialized and basic helper functions for initializing those backends.
backend/remote-state/gcs
Package gcs implements remote storage of state on Google Cloud Storage (GCS).
Package gcs implements remote storage of state on Google Cloud Storage (GCS).
backend/remote-state/git
Package git implements a state backend that keeps encrypted state on a dedicated branch of a Git repository, for small projects that don't want to set up any cloud storage.
Package git implements a state backend that keeps encrypted state on a dedicated branch of a Git repository, for small projects that don't want to set up any cloud storage.
bogenv
Package bogenv makes BOG_* environment variables take precedence over their TF_* and TOFU_* equivalents.
Package bogenv makes BOG_* environment variables take precedence over their TF_* and TOFU_* equivalents.
bootstrap
Package bootstrap writes the configuration that gives repository pipelines access to a cloud account: an OIDC trust, and for each repository a read-only identity for plans and an identity for applies that only the default branch can use.
Package bootstrap writes the configuration that gives repository pipelines access to a cloud account: an OIDC trust, and for each repository a read-only identity for plans and an identity for applies that only the default branch can use.
checks
Package checks contains the models for representing various kinds of declarative condition checks that can be defined in a Bogform module and then evaluated and reported by Bogform Core during plan and apply operations.
Package checks contains the models for representing various kinds of declarative condition checks that can be defined in a Bogform module and then evaluated and reported by Bogform Core during plan and apply operations.
ci
Package ci implements the "bogform ci" commands, which run Bogform from repository pipelines and report the results on pull requests.
Package ci implements the "bogform ci" commands, which run Bogform from repository pipelines and report the results on pull requests.
ci/cost
Package cost estimates the monthly cost of the resources in a plan, using the providers' public price lists.
Package cost estimates the monthly cost of the resources in a plan, using the providers' public price lists.
command/cliconfig
Package cliconfig has the types representing and the logic to load CLI-level configuration settings.
Package cliconfig has the types representing and the logic to load CLI-level configuration settings.
command/cliconfig/ociauthconfig
Package ociauthconfig contains types used for describing OCI authentication settings, and helpers for discovering such settings from container engine configuration files as described in https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md .
Package ociauthconfig contains types used for describing OCI authentication settings, and helpers for discovering such settings from container engine configuration files as described in https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md .
command/cliconfig/svcauthconfig
Package svcauthconfig contains some helper functions and types to support the cliconfig package's use of github.com/opentofu/svchost/svcauth, which is our mechanism for representing the policy for authenticating to Bogform-native services such as implementations Bogform's provider registry protocol.
Package svcauthconfig contains some helper functions and types to support the cliconfig package's use of github.com/opentofu/svchost/svcauth, which is our mechanism for representing the policy for authenticating to Bogform-native services such as implementations Bogform's provider registry protocol.
command/clistate
Package state exposes common helpers for working with state from the CLI.
Package state exposes common helpers for working with state from the CLI.
command/e2etest
Package e2etest contains a set of tests that run against a real Bogform binary, compiled on the fly at the start of the test run.
Package e2etest contains a set of tests that run against a real Bogform binary, compiled on the fly at the start of the test run.
command/e2etest/fakeocireg
Package fakeocireg provides a minimal, read-only implementation of the OCI Distribution protocol that interacts with a local filesystem directory.
Package fakeocireg provides a minimal, read-only implementation of the OCI Distribution protocol that interacts with a local filesystem directory.
command/e2etest/provider-simple
simple provider a minimal provider implementation for testing
simple provider a minimal provider implementation for testing
command/e2etest/provider-simple-v6
simple provider a minimal provider implementation for testing
simple provider a minimal provider implementation for testing
command/format
Package format contains helpers for formatting various Bogform structures for human-readable output.
Package format contains helpers for formatting various Bogform structures for human-readable output.
command/jsonchecks
Package jsonchecks implements the common JSON representation of check results/statuses that we use across both the JSON plan and JSON state representations.
Package jsonchecks implements the common JSON representation of check results/statuses that we use across both the JSON plan and JSON state representations.
command/jsonconfig
Package jsonconfig implements methods for outputting a configuration snapshot in machine-readable json format
Package jsonconfig implements methods for outputting a configuration snapshot in machine-readable json format
command/jsonentities
Package jsonentities contains the entities for representing a few common resources used around the json* packages.
Package jsonentities contains the entities for representing a few common resources used around the json* packages.
command/jsonformat/computed
Package computed contains types that represent the computed diffs for Bogform blocks, attributes, and outputs.
Package computed contains types that represent the computed diffs for Bogform blocks, attributes, and outputs.
command/jsonformat/structured
Package structured contains the structured representation of the JSON changes returned by the jsonplan package.
Package structured contains the structured representation of the JSON changes returned by the jsonplan package.
command/jsonplan
Package jsonplan implements methods for outputting a plan in a machine-readable json format
Package jsonplan implements methods for outputting a plan in a machine-readable json format
command/jsonprovider
Package jsonprovider contains types and functions to marshal Bogform provider schemas into a json formatted output.
Package jsonprovider contains types and functions to marshal Bogform provider schemas into a json formatted output.
command/jsonstate
Package jsonstate implements methods for outputting a state in a machine-readable json format
Package jsonstate implements methods for outputting a state in a machine-readable json format
command/workdir
Package workdir models the various local artifacts and state we keep inside a Bogform "working directory".
Package workdir models the various local artifacts and state we keep inside a Bogform "working directory".
configs
Package configs contains types that represent Bogform configurations and the different elements thereof.
Package configs contains types that represent Bogform configurations and the different elements thereof.
configs/configload
Package configload knows how to install modules into the .terraform/modules directory and to load modules from those installed locations.
Package configload knows how to install modules into the .terraform/modules directory and to load modules from those installed locations.
configs/configschema
Package configschema contains types for describing the expected structure of a configuration block whose shape is not known until runtime.
Package configschema contains types for describing the expected structure of a configuration block whose shape is not known until runtime.
dag
dashboard
Package dashboard holds what the dashboard shows, shared by the self-hosted server and the local "bogform ui", so that both serve the same API to the same web page.
Package dashboard holds what the dashboard shows, shared by the self-hosted server and the local "bogform ui", so that both serve the same API to the same web page.
depsfile
Package depsfile contains the logic for reading and writing Bogform's dependency lock and development override configuration files.
Package depsfile contains the logic for reading and writing Bogform's dependency lock and development override configuration files.
doctor
Package doctor checks a configuration's repository setup and says how to fix what it finds.
Package doctor checks a configuration's repository setup and says how to fix what it finds.
e2e
encryption/keyprovider/passphrase
Package passphrase contains a key provider that reads a passphrase from the environment, the OS keychain, AWS SSM Parameter Store or Azure Key Vault, and passes it to pbkdf2 through "chain".
Package passphrase contains a key provider that reads a passphrase from the environment, the OS keychain, AWS SSM Parameter Store or Azure Key Vault, and passes it to pbkdf2 through "chain".
encryption/keyprovider/pbkdf2
Package pbkdf2 contains a key provider that takes a passphrase and emits a PBKDF2 hash of the configured length.
Package pbkdf2 contains a key provider that takes a passphrase and emits a PBKDF2 hash of the configured length.
encryption/keyprovider/static
Package static contains a key provider that emits a static key.
Package static contains a key provider that emits a static key.
encryption/keyprovider/xor
Package xor contains a key provider that combines two other keys.
Package xor contains a key provider that combines two other keys.
engine/internal/exec
Package exec contains the models and main interface used for apply phase execution.
Package exec contains the models and main interface used for apply phase execution.
engine/internal/execgraph/execgraphproto
Package execgraphproto contains just the protocol buffers models we use for marshaling and unmarshaling execution graphs.
Package execgraphproto contains just the protocol buffers models we use for marshaling and unmarshaling execution graphs.
engine/planning
Package planning implements a planning engine for Bogform, which takes a prior state and a configuration instance (which can be evaluated to produce a desired state) and proposes a set of changes to make to bring the remote system closer to convergence with the desired state.
Package planning implements a planning engine for Bogform, which takes a prior state and a configuration instance (which can be evaluated to produce a desired state) and proposes a set of changes to make to bring the remote system closer to convergence with the desired state.
experiments
Package experiments contains the models and logic for opt-in experiments that can be activated for a particular Bogform module.
Package experiments contains the models and logic for opt-in experiments that can be activated for a particular Bogform module.
genconfig
Package genconfig implements config generation from provided state values.
Package genconfig implements config generation from provided state values.
getmodules
Package getmodules contains the low-level functionality for fetching remote module packages.
Package getmodules contains the low-level functionality for fetching remote module packages.
getproviders
Package getproviders is the lowest-level provider automatic installation functionality.
Package getproviders is the lowest-level provider automatic installation functionality.
initwd
Package initwd contains various helper functions used by the "bogform init" command to initialize a working directory.
Package initwd contains various helper functions used by the "bogform init" command to initialize a working directory.
ipaddr
Package ipaddr is a fork of a subset of the Go standard "net" package which retains parsing behaviors from Go 1.16 or earlier.
Package ipaddr is a fork of a subset of the Go standard "net" package which retains parsing behaviors from Go 1.16 or earlier.
lang
Package lang deals with the runtime aspects of Bogform's configuration language, with concerns such as expression evaluation.
Package lang deals with the runtime aspects of Bogform's configuration language, with concerns such as expression evaluation.
lang/blocktoattr
Package blocktoattr includes some helper functions that can perform preprocessing on a HCL body where a configschema.Block schema is available in order to allow list and set attributes defined in the schema to be optionally written by the user as block syntax.
Package blocktoattr includes some helper functions that can perform preprocessing on a HCL body where a configschema.Block schema is available in order to allow list and set attributes defined in the schema to be optionally written by the user as block syntax.
lang/eval
Package eval aims to encapsulate the details of evaluating the objects in an overall configuration, including all of the expressions written inside their declarations, in a way that can be reused across various different phases of execution.
Package eval aims to encapsulate the details of evaluating the objects in an overall configuration, including all of the expressions written inside their declarations, in a way that can be reused across various different phases of execution.
lang/eval/internal/tofu2024
Package tofu2024 contains the "module compiler" implementation for the first edition of the Bogform language, established with OpenTofu v1.6 in 2024 and then gradually evolved in backward-compatible ways.
Package tofu2024 contains the "module compiler" implementation for the first edition of the Bogform language, established with OpenTofu v1.6 in 2024 and then gradually evolved in backward-compatible ways.
lang/exprs
Package exprs contains supporting code for expression evaluation.
Package exprs contains supporting code for expression evaluation.
lang/globalref
Package globalref is home to some analysis algorithms that aim to answer questions about references between objects and object attributes across an entire configuration.
Package globalref is home to some analysis algorithms that aim to answer questions about references between objects and object attributes across an entire configuration.
lang/grapheval
Package grapheval contains some low-level helpers for coordinating interdependent work happening across different parts of the system, including detection and reporting of self-dependency problems that would otherwise cause a deadlock.
Package grapheval contains some low-level helpers for coordinating interdependent work happening across different parts of the system, including detection and reporting of self-dependency problems that would otherwise cause a deadlock.
lang/lint
Package lint contains a collection of helpers for performing "lint-like" checks to try to detect configuration constructs that are valid but nonetheless very likely to be a mistake.
Package lint contains a collection of helpers for performing "lint-like" checks to try to detect configuration constructs that are valid but nonetheless very likely to be a mistake.
lang/types
Package types contains non-standard cty types used only within Bogform.
Package types contains non-standard cty types used only within Bogform.
legacy/hcl2shim
Package hcl2shim contains a small number of "shimming" utilities that the other packages under internal/legacy use to adapt from HCL 2 concepts to legacy concepts.
Package hcl2shim contains a small number of "shimming" utilities that the other packages under internal/legacy use to adapt from HCL 2 concepts to legacy concepts.
legacy/helper/acctest
Package acctest contains for Bogform Acceptance Tests
Package acctest contains for Bogform Acceptance Tests
legacy/helper/schema
Package schema is a legacy package that used to represent the SDK, which is now its own library external to Bogform Core https://github.com/hashicorp/terraform-plugin-sdk Some of it is still used by Bogform's remote state backends, but this entire package should be removed in the future.
Package schema is a legacy package that used to represent the SDK, which is now its own library external to Bogform Core https://github.com/hashicorp/terraform-plugin-sdk Some of it is still used by Bogform's remote state backends, but this entire package should be removed in the future.
modsdir
Package modsdir is an internal package containing the model types used to represent the manifest of modules in a local modules cache directory.
Package modsdir is an internal package containing the model types used to represent the manifest of modules in a local modules cache directory.
oci
plans
Package plans contains the types that are used to represent Bogform plans.
Package plans contains the types that are used to represent Bogform plans.
plans/internal/planproto
Package planproto is home to the Go stubs generated from the tfplan protobuf schema.
Package planproto is home to the Go stubs generated from the tfplan protobuf schema.
plans/objchange
Package objchange deals with the business logic of taking a prior state value and a config value and producing a proposed new merged value, along with other related rules in this domain.
Package objchange deals with the business logic of taking a prior state value and a config value and producing a proposed new merged value, along with other related rules in this domain.
plans/planfile
Package planfile deals with the file format used to serialize plans to disk and then deserialize them back into memory later.
Package planfile deals with the file format used to serialize plans to disk and then deserialize them back into memory later.
plugin/mock_proto
Package mock_tfplugin5 is a generated GoMock package.
Package mock_tfplugin5 is a generated GoMock package.
plugin/plugintest
Package plugintest contains helpers for running provider and provisioner servers only when testing our plugin client code.
Package plugintest contains helpers for running provider and provisioner servers only when testing our plugin client code.
plugin6/mock_proto
Package mock_tfplugin6 is a generated GoMock package.
Package mock_tfplugin6 is a generated GoMock package.
providercache
Package providercache contains the logic for auto-installing providers from packages obtained elsewhere, and for managing the local directories that serve as global or single-configuration caches of those auto-installed providers.
Package providercache contains the logic for auto-installing providers from packages obtained elsewhere, and for managing the local directories that serve as global or single-configuration caches of those auto-installed providers.
providers
Package providers contains the interface and primary types required to implement a Bogform resource provider.
Package providers contains the interface and primary types required to implement a Bogform resource provider.
provisioners
Package provisioners contains the interface and primary types to implement a Bogform resource provisioner.
Package provisioners contains the interface and primary types to implement a Bogform resource provisioner.
repl
Package repl provides the structs and functions necessary to run REPL for Bogform.
Package repl provides the structs and functions necessary to run REPL for Bogform.
replacefile
Package replacefile is a small helper package focused directly at the problem of atomically "renaming" one file over another one.
Package replacefile is a small helper package focused directly at the problem of atomically "renaming" one file over another one.
resources
Package resources contains helpers that encapsulate the main interactions Bogform has with resource instance objects, wrapping the raw provider client calls with certain preprocessing, postprocessing, and validation logic that ought to happen regardless of why Bogform is asking each of these questions.
Package resources contains helpers that encapsulate the main interactions Bogform has with resource instance objects, wrapping the raw provider client calls with certain preprocessing, postprocessing, and validation logic that ought to happen regardless of why Bogform is asking each of these questions.
server
Package server implements the optional self-hosted Bogform dashboard.
Package server implements the optional self-hosted Bogform dashboard.
states
Package states contains the types that are used to represent Bogform states.
Package states contains the types that are used to represent Bogform states.
states/statefile
Package statefile deals with the file format used to serialize states for persistent storage and then deserialize them into memory again later.
Package statefile deals with the file format used to serialize states for persistent storage and then deserialize them into memory again later.
states/statemgr
Package statemgr defines the interfaces and some supporting functionality for "state managers", which are components responsible for writing state to some persistent storage and then later retrieving it.
Package statemgr defines the interfaces and some supporting functionality for "state managers", which are components responsible for writing state to some persistent storage and then later retrieving it.
terminal
Package terminal encapsulates some platform-specific logic for detecting if we're running in a terminal and, if so, properly configuring that terminal to meet the assumptions that the rest of Bogform makes.
Package terminal encapsulates some platform-specific logic for detecting if we're running in a terminal and, if so, properly configuring that terminal to meet the assumptions that the rest of Bogform makes.
tfcmigrate
Package tfcmigrate reads what's needed to move a workspace off HCP Terraform or Terraform Enterprise: its current state, its settings, and its variables.
Package tfcmigrate reads what's needed to move a workspace off HCP Terraform or Terraform Enterprise: its current state, its settings, and its variables.
tfdiags
Package tfdiags is a utility package for representing errors and warnings in a manner that allows us to produce good messages for the user.
Package tfdiags is a utility package for representing errors and warnings in a manner that allows us to produce good messages for the user.
webui
Package webui holds the dashboard's built web page, for "bogform ui".
Package webui holds the dashboard's built web page, for "bogform ui".
Package templates holds files that people copy into their own repositories.
Package templates holds files that people copy into their own repositories.
tools
find-dep-upgrades command
find-dep-upgrades is a utility for finding the available upgrades for our Go module dependencies and proposing an order to upgrade them in so that as far as possible each upgrade touches only one upstream module at a time.
find-dep-upgrades is a utility for finding the available upgrades for our Go module dependencies and proposing an order to upgrade them in so that as far as possible each upgrade touches only one upstream module at a time.
find-pkg-importer command
find-pkg-importer is a utility for finding which packages in our dependency graph import a given package path.
find-pkg-importer is a utility for finding which packages in our dependency graph import a given package path.
loggraphdiff command
protobuf-compile command
protobuf-compile is a helper tool for running protoc against all of the .proto files in this repository using specific versions of protoc and protoc-gen-go, to ensure consistent results across all development environments.
protobuf-compile is a helper tool for running protoc against all of the .proto files in this repository using specific versions of protoc and protoc-gen-go, to ensure consistent results across all development environments.
selected-go-version command
selected-go-version determines which version of Go is currently selected in the go.mod file.
selected-go-version determines which version of Go is currently selected in the go.mod file.
The version package provides a location to set the release versions for all packages to consume, without creating import cycles.
The version package provides a location to set the release versions for all packages to consume, without creating import cycles.
website

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL