Configure AWS DevOps Guru Resource Collections

The aws:devopsguru/resourceCollection:ResourceCollection resource, part of the Pulumi AWS provider, defines which AWS resources DevOps Guru analyzes for operational insights and anomaly detection. This guide focuses on three capabilities: account-wide monitoring, CloudFormation stack scoping, and tag-based resource filtering.

Only one resource collection type can be active per account at a time. Choose between monitoring all account resources, specific CloudFormation stacks, or tag-filtered resources. The examples are intentionally small. Select the collection strategy that matches your operational boundaries.

Monitor all resources across your AWS account

Teams starting with DevOps Guru often analyze all resources to establish baseline operational insights without manual selection.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    type: "AWS_SERVICE",
    cloudformation: {
        stackNames: ["*"],
    },
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    type="AWS_SERVICE",
    cloudformation={
        "stack_names": ["*"],
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Type: pulumi.String("AWS_SERVICE"),
			Cloudformation: &devopsguru.ResourceCollectionCloudformationArgs{
				StackNames: pulumi.StringArray{
					pulumi.String("*"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Type = "AWS_SERVICE",
        Cloudformation = new Aws.DevOpsGuru.Inputs.ResourceCollectionCloudformationArgs
        {
            StackNames = new[]
            {
                "*",
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionCloudformationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .type("AWS_SERVICE")
            .cloudformation(ResourceCollectionCloudformationArgs.builder()
                .stackNames("*")
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      type: AWS_SERVICE
      cloudformation:
        stackNames:
          - '*'

Setting type to AWS_SERVICE with a wildcard in stackNames enables account-wide monitoring. DevOps Guru analyzes all supported AWS services in your account. This provides the broadest visibility but may generate insights for resources you don’t actively manage.

Analyze specific CloudFormation stacks

Applications deployed via CloudFormation can be monitored as logical units by specifying stack names.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    type: "AWS_CLOUD_FORMATION",
    cloudformation: {
        stackNames: ["ExampleStack"],
    },
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    type="AWS_CLOUD_FORMATION",
    cloudformation={
        "stack_names": ["ExampleStack"],
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Type: pulumi.String("AWS_CLOUD_FORMATION"),
			Cloudformation: &devopsguru.ResourceCollectionCloudformationArgs{
				StackNames: pulumi.StringArray{
					pulumi.String("ExampleStack"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Type = "AWS_CLOUD_FORMATION",
        Cloudformation = new Aws.DevOpsGuru.Inputs.ResourceCollectionCloudformationArgs
        {
            StackNames = new[]
            {
                "ExampleStack",
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionCloudformationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .type("AWS_CLOUD_FORMATION")
            .cloudformation(ResourceCollectionCloudformationArgs.builder()
                .stackNames("ExampleStack")
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      type: AWS_CLOUD_FORMATION
      cloudformation:
        stackNames:
          - ExampleStack

The type AWS_CLOUD_FORMATION scopes analysis to resources within named stacks. The stackNames array lists which stacks to monitor. DevOps Guru treats each stack as a related resource group, correlating anomalies across stack resources.

Filter resources by tag key and values

Organizations using tagging strategies can scope analysis to resources matching specific tag combinations.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    type: "AWS_TAGS",
    tags: {
        appBoundaryKey: "DevOps-Guru-Example",
        tagValues: ["Example-Value"],
    },
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    type="AWS_TAGS",
    tags={
        "app_boundary_key": "DevOps-Guru-Example",
        "tag_values": ["Example-Value"],
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Type: pulumi.String("AWS_TAGS"),
			Tags: &devopsguru.ResourceCollectionTagsArgs{
				AppBoundaryKey: pulumi.String("DevOps-Guru-Example"),
				TagValues: pulumi.StringArray{
					pulumi.String("Example-Value"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Type = "AWS_TAGS",
        Tags = new Aws.DevOpsGuru.Inputs.ResourceCollectionTagsArgs
        {
            AppBoundaryKey = "DevOps-Guru-Example",
            TagValues = new[]
            {
                "Example-Value",
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionTagsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .type("AWS_TAGS")
            .tags(ResourceCollectionTagsArgs.builder()
                .appBoundaryKey("DevOps-Guru-Example")
                .tagValues("Example-Value")
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      type: AWS_TAGS
      tags:
        appBoundaryKey: DevOps-Guru-Example
        tagValues:
          - Example-Value

The type AWS_TAGS enables tag-based filtering. The appBoundaryKey defines which tag key to match, and tagValues lists acceptable values. DevOps Guru analyzes only resources with matching tags, allowing you to align monitoring with your tagging taxonomy.

Monitor all resources with a specific tag key

When tag values vary but the tag key defines the application boundary, DevOps Guru can analyze all resources with that key regardless of value.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.devopsguru.ResourceCollection("example", {
    type: "AWS_TAGS",
    tags: {
        appBoundaryKey: "DevOps-Guru-Example",
        tagValues: ["*"],
    },
});
import pulumi
import pulumi_aws as aws

example = aws.devopsguru.ResourceCollection("example",
    type="AWS_TAGS",
    tags={
        "app_boundary_key": "DevOps-Guru-Example",
        "tag_values": ["*"],
    })
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/devopsguru"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devopsguru.NewResourceCollection(ctx, "example", &devopsguru.ResourceCollectionArgs{
			Type: pulumi.String("AWS_TAGS"),
			Tags: &devopsguru.ResourceCollectionTagsArgs{
				AppBoundaryKey: pulumi.String("DevOps-Guru-Example"),
				TagValues: pulumi.StringArray{
					pulumi.String("*"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DevOpsGuru.ResourceCollection("example", new()
    {
        Type = "AWS_TAGS",
        Tags = new Aws.DevOpsGuru.Inputs.ResourceCollectionTagsArgs
        {
            AppBoundaryKey = "DevOps-Guru-Example",
            TagValues = new[]
            {
                "*",
            },
        },
    });

});
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.devopsguru.ResourceCollection;
import com.pulumi.aws.devopsguru.ResourceCollectionArgs;
import com.pulumi.aws.devopsguru.inputs.ResourceCollectionTagsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceCollection("example", ResourceCollectionArgs.builder()
            .type("AWS_TAGS")
            .tags(ResourceCollectionTagsArgs.builder()
                .appBoundaryKey("DevOps-Guru-Example")
                .tagValues("*")
                .build())
            .build());

    }
}
resources:
  example:
    type: aws:devopsguru:ResourceCollection
    properties:
      type: AWS_TAGS
      tags:
        appBoundaryKey: DevOps-Guru-Example
        tagValues:
          - '*'

Setting tagValues to ["*"] creates a wildcard match. DevOps Guru monitors all resources tagged with the appBoundaryKey, regardless of the tag’s value. This is useful when the tag key alone defines your application boundary and values represent environments or versions.

Beyond these examples

These snippets focus on specific resource collection features: account-wide and stack-scoped monitoring, and tag-based resource filtering. They’re intentionally minimal rather than complete DevOps Guru configurations.

The examples may reference pre-existing infrastructure such as CloudFormation stacks for stack-based monitoring, and tagged resources for tag-based monitoring. They focus on defining the collection scope rather than provisioning the resources to be monitored.

To keep things focused, common DevOps Guru patterns are omitted, including:

  • SNS topic configuration for notifications
  • Service-specific resource selection beyond CloudFormation
  • Multi-region collection management
  • Integration with CloudWatch or other monitoring tools

These omissions are intentional: the goal is to illustrate how each collection type is wired, not provide drop-in monitoring modules. See the DevOps Guru ResourceCollection resource reference for all available configuration options.

Let's configure AWS DevOps Guru Resource Collections

Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.

Try Pulumi Cloud for FREE

Frequently Asked Questions

Resource Collection Limits & Constraints
Why am I seeing perpetual differences with my DevOps Guru resource collection?
Only one type of resource collection can be enabled per account at a time. Define this resource only once, and don’t switch between collection types (AWS_SERVICE, AWS_CLOUD_FORMATION, or AWS_TAGS) without removing the previous configuration.
Can I create multiple DevOps Guru resource collections in my account?
No, only one resource collection type can be active per account. Creating multiple collections or switching types causes conflicts and persistent differences.
Collection Types & Configuration
What are the available resource collection types?
DevOps Guru supports three collection types: AWS_SERVICE (all account resources), AWS_CLOUD_FORMATION (specific CloudFormation stacks), and AWS_TAGS (tag-based filtering).
How do I monitor all resources in my AWS account?
Set type to AWS_SERVICE and configure cloudformation.stackNames to ["*"].
How do I monitor specific CloudFormation stacks?
Set type to AWS_CLOUD_FORMATION and list your stack names in cloudformation.stackNames, such as ["ExampleStack"].
Tag-Based Collections
How do I use tags to define which resources DevOps Guru analyzes?
Set type to AWS_TAGS, then configure tags.appBoundaryKey with your tag key and tags.tagValues with an array of values. To analyze all resources with a specific tag key regardless of value, use tagValues: ["*"].

Using a different cloud?

Explore monitoring guides for other cloud providers: