CloudFormation gets open source CLI to automate external resource creation

CloudFormation gets open source CLI to automate external resource creation

AWS has updated its infrastructure as code product CloudFormation, fitting it with an open source CLI and a registry to get started with custom resource providers. The refresh is meant to let users automate the creation of non-AWS resources and improve resource coverage, both of which seem to have been requested a lot in the past months. 

CloudFormation CLI comes with sample code and documentation facilitating the creation of resource providers. To build one, users first have to describe their resource, including attributes and properties, in a schema which conforms to AWS’ Resource Provider Definition Schema. Once that is done, they’ll have to write a handler in Java or Go that defines the core operations create, read, update, delete, and list for the resource. 

Before the provider can be registered with CloudFormation, it needs to be tested locally with tools the CLI provides. If no hiccups occur, the schema and the compiled handlers are packaged and submitted to the AWS regions it should be usable in, which then starts an acceptance process. Since the latter is asynchronous, it might take a while until the new resource type can be used in a CloudFormation template.

Resource providers can be stored per-account and region in a new CloudProvider registry. It is accessible via the CloudFormation Console or programmatically using a number of new functions.

To help you fill your registry, AWS has partnered with tool vendors such as Datadog, New Relic, and Atlassian to build a set of initial third party providers. Once registered, users can reference the results in their own CloudFormation templates. AWS has also open sourced some of their own providers to give customers a better idea on how to properly build them and something to build upon if needed.

The news comes in concert with a few other announcements, such as the new AWS FireLens tool. FireLens is meant to let AWS users “direct logs to storage and analytics tools without modifying deployment scripts, manually installing extra software or writing additional code.” Valid destinations can be anything supported by open source projects fluentd and Fluent Bit. Examples can be found in the introductory blog post.