AWS CloudFormation is an infrastructure-as-code (IaC) tool provided by AWS, which simplifies and automates the process of provisioning and managing infrastructure. Customers can create templates to model and describe their cloud infrastructure using building blocks called resource types which are listed on the CloudFormation Registry. With the introduction of the CloudFormation Public Registry, you can now search for, find, and provision using New Relic’s CloudFormation resource types without having to maintain your own custom resource types. This allows customers to consolidate tooling and manage both AWS and New Relic infrastructure through CloudFormation. By being in the Registry, New Relic’s resource types can also leverage useful functionality such as drift detection similar to AWS resource types.

While CloudFormation can already be used to automate installing the New Relic Infrastructure agent, we have now added 8 new resources on the CloudFormation Registry to create, update, and delete New Relic Alerts, Dashboards, and Workloads as GraphQL objects from a CloudFormation stack:

  • NewRelic::Observability::AINotificationsChannel
  • NewRelic::Observability::AINotificationsDestination
  • NewRelic::Observability::AIWorkflows
  • NewRelic::Observability::AlertsMutingRule
  • NewRelic::Observability::AlertsNrqlCondition
  • NewRelic::Observability::AlertsPolicy
  • NewRelic::Observability::Dashboards
  • NewRelic::Observability::Workloads

These resources are currently publicly available as third-party extensions in the us-east-1, us-east-2, us-west-1, and us-west-2 AWS regions. Other regions can be made available upon request by creating an issue in the appropriate GitHub repository.

The example below demonstrates how you create a Workload using our New Relic resource types. Before you can use these types in a template, you’ll need to activate the types in the CloudFormation Registry by following these instructions. Our Workload feature gives you the ability to group and monitor entities and organize your telemetry in a manner that provides the most insights for your business. 

AWSTemplateFormatVersion: 2010-09-09
Description: Sample New Relic Workloads Template
    Type: 'NewRelic::Observability::Workloads'
      Workload: >-
         {name: "CloudFormationTest-Create"}
    Value: !GetAtt Resource1.Guid
    Value: !GetAtt BaselineConditionResource.Id
    Value: !GetAtt BaselineConditionResource.EntityGuid

Source and documentation can be found in New Relic's GitHub organization.

Two important notes:

  1. The New Relic resources rely upon valid GraphQL snippets as their primary input. This allows the end-user to use the GraphQL Explorer to debug their resource then cut & paste it into the stack
  2. Due to the constraints placed upon the code for passing CloudFormation contract tests, and in particular how the contract tests are run, this code does not utilize New Relic's Go API client

Additional Capabilities

In addition to CloudFormation support, we are also excited to highlight the following benefits:

AWS Cloud Development Kit (CDK) Constructs for New Relic: CDK is an Infrastructure-as-Code (IaC) tool that allows developers to provision and manage their infrastructure using the programming language of their choice. Auto-generated L1 CDK constructs for New Relic are available to CDK users to use as a starting point to create L2+ constructs. You can find these on Construct Hub.

AWS Cloud Control API (CCAPI) support for New Relic: CCAPI enables developers to create, read, update, delete, and list (CRUDL) AWS and third-party service resources with consistent APIs. These New Relic resource types will also be available to customers and partners using CCAPI to build products and tooling for provisioning, managing, and securing cloud infrastructure.

AWS Config support: New Relic resource types in the CloudFormation Registry will be automatically tracked in AWS Config as Configuration Items, if you create, update, or delete these resources using AWS CloudFormation and if you have configured AWS Config to record all resource types. Customers using AWS Config to audit and take inventory of their cloud infrastructure will be able to see provisioned New Relic resources in AWS Config’s resource inventory tool.