You can use BuildFlow to manage your cloud resources. This removes the need to have a separate configuration management tool such as Terraform, or from managing your resources manually in the cloud console. All the code for this guide can be found on GitHub.
To see a full working project example with a UI included see our Image Classification example.
First we create a new BuildFlow Flow. This will be the main entry point to our application.
app = Flow()
Mark our Primitives as Managed
Finally we mark our primitives as managed by our flow. This tells our flow that is responsible for creating, updating, and destroying these resources.
Preview our Changes
Now we can use the VS Code extension or the BuildFlow CLI to preview our changes:
This will output the changes that will be made to our resources. In our case we will see that a new S3 bucket and GCP PubSub topic will be created.
Primitives to create: --------------------- ├── S3Bucket │ └── s3://my-bucket └── GCPPubSubTopic └── my-project/my-topic
Apply our Changes
If we’re happy with the preview we can now use the VS Code extension or BuildFlow CLI to apply our changes.
This will again output the preview and ask you to confirm.
After this step you should be able to view your resources in the cloud console.
Update our Resources
If we ever change our resources, for example updating a configuration option on our bucket or topic, we can run
buildflow apply again to have the resource updated.
Destroy your Resources
If you ever want to delete all of the resources for your project, you can simply run
buildflow destroy. Similar to apply this will preview the changes and ask you to confirm.
If you no longer need a resource for your project you can simply remove it from being managed and when you run
buildflow apply it will be deleted. For example if we no longer needed our S3 bucket we could remove it from our call to
And you will see that the S3 bucket is deleted.