published on Tuesday, Jun 9, 2026 by Pulumiverse
published on Tuesday, Jun 9, 2026 by Pulumiverse
This resource requires the API token scopes Read entities (
entities.read) and Write entities (entities.write)
Dynatrace Documentation
Define and apply tags - https://www.dynatrace.com/support/help/shortlink/tagging#manual
Custom tags API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/custom-tags
Export Example Usage
terraform-provider-dynatrace -export dynatrace.CustomTagsdownloads all existing custom tags configuration
The full documentation of the export feature is available here.
Resource Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumiverse/dynatrace";
const tags = new dynatrace.CustomTags("tags", {
entitySelector: "type(HOST)",
tags: {
filters: [
{
context: "CONTEXTLESS",
key: "KeyExampleA",
},
{
context: "CONTEXTLESS",
key: "KeyExampleA",
value: "ValueExample1",
},
{
context: "CONTEXTLESS",
key: "KeyExampleB",
},
{
context: "CONTEXTLESS",
key: "KeyExampleC",
value: "ValueExample2",
},
],
},
});
import pulumi
import pulumiverse_dynatrace as dynatrace
tags = dynatrace.CustomTags("tags",
entity_selector="type(HOST)",
tags={
"filters": [
{
"context": "CONTEXTLESS",
"key": "KeyExampleA",
},
{
"context": "CONTEXTLESS",
"key": "KeyExampleA",
"value": "ValueExample1",
},
{
"context": "CONTEXTLESS",
"key": "KeyExampleB",
},
{
"context": "CONTEXTLESS",
"key": "KeyExampleC",
"value": "ValueExample2",
},
],
})
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dynatrace.NewCustomTags(ctx, "tags", &dynatrace.CustomTagsArgs{
EntitySelector: pulumi.String("type(HOST)"),
Tags: &dynatrace.CustomTagsTagsArgs{
Filters: dynatrace.CustomTagsTagsFilterArray{
&dynatrace.CustomTagsTagsFilterArgs{
Context: pulumi.String("CONTEXTLESS"),
Key: pulumi.String("KeyExampleA"),
},
&dynatrace.CustomTagsTagsFilterArgs{
Context: pulumi.String("CONTEXTLESS"),
Key: pulumi.String("KeyExampleA"),
Value: pulumi.String("ValueExample1"),
},
&dynatrace.CustomTagsTagsFilterArgs{
Context: pulumi.String("CONTEXTLESS"),
Key: pulumi.String("KeyExampleB"),
},
&dynatrace.CustomTagsTagsFilterArgs{
Context: pulumi.String("CONTEXTLESS"),
Key: pulumi.String("KeyExampleC"),
Value: pulumi.String("ValueExample2"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumiverse.Dynatrace;
return await Deployment.RunAsync(() =>
{
var tags = new Dynatrace.CustomTags("tags", new()
{
EntitySelector = "type(HOST)",
Tags = new Dynatrace.Inputs.CustomTagsTagsArgs
{
Filters = new[]
{
new Dynatrace.Inputs.CustomTagsTagsFilterArgs
{
Context = "CONTEXTLESS",
Key = "KeyExampleA",
},
new Dynatrace.Inputs.CustomTagsTagsFilterArgs
{
Context = "CONTEXTLESS",
Key = "KeyExampleA",
Value = "ValueExample1",
},
new Dynatrace.Inputs.CustomTagsTagsFilterArgs
{
Context = "CONTEXTLESS",
Key = "KeyExampleB",
},
new Dynatrace.Inputs.CustomTagsTagsFilterArgs
{
Context = "CONTEXTLESS",
Key = "KeyExampleC",
Value = "ValueExample2",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.CustomTags;
import com.pulumi.dynatrace.CustomTagsArgs;
import com.pulumi.dynatrace.inputs.CustomTagsTagsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 tags = new CustomTags("tags", CustomTagsArgs.builder()
.entitySelector("type(HOST)")
.tags(CustomTagsTagsArgs.builder()
.filters(
CustomTagsTagsFilterArgs.builder()
.context("CONTEXTLESS")
.key("KeyExampleA")
.build(),
CustomTagsTagsFilterArgs.builder()
.context("CONTEXTLESS")
.key("KeyExampleA")
.value("ValueExample1")
.build(),
CustomTagsTagsFilterArgs.builder()
.context("CONTEXTLESS")
.key("KeyExampleB")
.build(),
CustomTagsTagsFilterArgs.builder()
.context("CONTEXTLESS")
.key("KeyExampleC")
.value("ValueExample2")
.build())
.build())
.build());
}
}
resources:
tags:
type: dynatrace:CustomTags
properties:
entitySelector: type(HOST)
tags:
filters:
- context: CONTEXTLESS
key: KeyExampleA
- context: CONTEXTLESS
key: KeyExampleA
value: ValueExample1
- context: CONTEXTLESS
key: KeyExampleB
- context: CONTEXTLESS
key: KeyExampleC
value: ValueExample2
pulumi {
required_providers {
dynatrace = {
source = "pulumi/dynatrace"
}
}
}
resource "dynatrace_customtags" "tags" {
entity_selector = "type(HOST)"
tags = {
filters = [{
"context" = "CONTEXTLESS"
"key" = "KeyExampleA"
}, {
"context" = "CONTEXTLESS"
"key" = "KeyExampleA"
"value" = "ValueExample1"
}, {
"context" = "CONTEXTLESS"
"key" = "KeyExampleB"
}, {
"context" = "CONTEXTLESS"
"key" = "KeyExampleC"
"value" = "ValueExample2"
}]
}
}
Create CustomTags Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomTags(name: string, args: CustomTagsArgs, opts?: CustomResourceOptions);@overload
def CustomTags(resource_name: str,
args: CustomTagsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomTags(resource_name: str,
opts: Optional[ResourceOptions] = None,
entity_selector: Optional[str] = None,
tags: Optional[CustomTagsTagsArgs] = None,
current_state: Optional[str] = None,
matched_entities: Optional[int] = None)func NewCustomTags(ctx *Context, name string, args CustomTagsArgs, opts ...ResourceOption) (*CustomTags, error)public CustomTags(string name, CustomTagsArgs args, CustomResourceOptions? opts = null)
public CustomTags(String name, CustomTagsArgs args)
public CustomTags(String name, CustomTagsArgs args, CustomResourceOptions options)
type: dynatrace:CustomTags
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "dynatrace_customtags" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CustomTagsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CustomTagsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CustomTagsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomTagsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CustomTagsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var customTagsResource = new Dynatrace.CustomTags("customTagsResource", new()
{
EntitySelector = "string",
Tags = new Dynatrace.Inputs.CustomTagsTagsArgs
{
Filters = new[]
{
new Dynatrace.Inputs.CustomTagsTagsFilterArgs
{
Context = "string",
Key = "string",
Value = "string",
},
},
},
CurrentState = "string",
MatchedEntities = 0,
});
example, err := dynatrace.NewCustomTags(ctx, "customTagsResource", &dynatrace.CustomTagsArgs{
EntitySelector: pulumi.String("string"),
Tags: &dynatrace.CustomTagsTagsArgs{
Filters: dynatrace.CustomTagsTagsFilterArray{
&dynatrace.CustomTagsTagsFilterArgs{
Context: pulumi.String("string"),
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
CurrentState: pulumi.String("string"),
MatchedEntities: pulumi.Int(0),
})
resource "dynatrace_customtags" "customTagsResource" {
entity_selector = "string"
tags = {
filters = [{
"context" = "string"
"key" = "string"
"value" = "string"
}]
}
current_state = "string"
matched_entities = 0
}
var customTagsResource = new CustomTags("customTagsResource", CustomTagsArgs.builder()
.entitySelector("string")
.tags(CustomTagsTagsArgs.builder()
.filters(CustomTagsTagsFilterArgs.builder()
.context("string")
.key("string")
.value("string")
.build())
.build())
.currentState("string")
.matchedEntities(0)
.build());
custom_tags_resource = dynatrace.CustomTags("customTagsResource",
entity_selector="string",
tags={
"filters": [{
"context": "string",
"key": "string",
"value": "string",
}],
},
current_state="string",
matched_entities=0)
const customTagsResource = new dynatrace.CustomTags("customTagsResource", {
entitySelector: "string",
tags: {
filters: [{
context: "string",
key: "string",
value: "string",
}],
},
currentState: "string",
matchedEntities: 0,
});
type: dynatrace:CustomTags
properties:
currentState: string
entitySelector: string
matchedEntities: 0
tags:
filters:
- context: string
key: string
value: string
CustomTags Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CustomTags resource accepts the following input properties:
- Entity
Selector string - Specifies the entities where you want to update tags
-
Pulumiverse.
Dynatrace. Inputs. Custom Tags Tags - Specifies the entities where you want to update tags
- Current
State string - For internal use: current state of tags in JSON format
- Matched
Entities int - The number of monitored entities where the tags have been added.
- Entity
Selector string - Specifies the entities where you want to update tags
-
Custom
Tags Tags Args - Specifies the entities where you want to update tags
- Current
State string - For internal use: current state of tags in JSON format
- Matched
Entities int - The number of monitored entities where the tags have been added.
- entity_
selector string - Specifies the entities where you want to update tags
- object
- Specifies the entities where you want to update tags
- current_
state string - For internal use: current state of tags in JSON format
- matched_
entities number - The number of monitored entities where the tags have been added.
- entity
Selector String - Specifies the entities where you want to update tags
-
Custom
Tags Tags - Specifies the entities where you want to update tags
- current
State String - For internal use: current state of tags in JSON format
- matched
Entities Integer - The number of monitored entities where the tags have been added.
- entity
Selector string - Specifies the entities where you want to update tags
-
Custom
Tags Tags - Specifies the entities where you want to update tags
- current
State string - For internal use: current state of tags in JSON format
- matched
Entities number - The number of monitored entities where the tags have been added.
- entity_
selector str - Specifies the entities where you want to update tags
-
Custom
Tags Tags Args - Specifies the entities where you want to update tags
- current_
state str - For internal use: current state of tags in JSON format
- matched_
entities int - The number of monitored entities where the tags have been added.
- entity
Selector String - Specifies the entities where you want to update tags
- Property Map
- Specifies the entities where you want to update tags
- current
State String - For internal use: current state of tags in JSON format
- matched
Entities Number - The number of monitored entities where the tags have been added.
Outputs
All input properties are implicitly available as output properties. Additionally, the CustomTags resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CustomTags Resource
Get an existing CustomTags resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CustomTagsState, opts?: CustomResourceOptions): CustomTags@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
current_state: Optional[str] = None,
entity_selector: Optional[str] = None,
matched_entities: Optional[int] = None,
tags: Optional[CustomTagsTagsArgs] = None) -> CustomTagsfunc GetCustomTags(ctx *Context, name string, id IDInput, state *CustomTagsState, opts ...ResourceOption) (*CustomTags, error)public static CustomTags Get(string name, Input<string> id, CustomTagsState? state, CustomResourceOptions? opts = null)public static CustomTags get(String name, Output<String> id, CustomTagsState state, CustomResourceOptions options)resources: _: type: dynatrace:CustomTags get: id: ${id}import {
to = dynatrace_customtags.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Current
State string - For internal use: current state of tags in JSON format
- Entity
Selector string - Specifies the entities where you want to update tags
- Matched
Entities int - The number of monitored entities where the tags have been added.
-
Pulumiverse.
Dynatrace. Inputs. Custom Tags Tags - Specifies the entities where you want to update tags
- Current
State string - For internal use: current state of tags in JSON format
- Entity
Selector string - Specifies the entities where you want to update tags
- Matched
Entities int - The number of monitored entities where the tags have been added.
-
Custom
Tags Tags Args - Specifies the entities where you want to update tags
- current_
state string - For internal use: current state of tags in JSON format
- entity_
selector string - Specifies the entities where you want to update tags
- matched_
entities number - The number of monitored entities where the tags have been added.
- object
- Specifies the entities where you want to update tags
- current
State String - For internal use: current state of tags in JSON format
- entity
Selector String - Specifies the entities where you want to update tags
- matched
Entities Integer - The number of monitored entities where the tags have been added.
-
Custom
Tags Tags - Specifies the entities where you want to update tags
- current
State string - For internal use: current state of tags in JSON format
- entity
Selector string - Specifies the entities where you want to update tags
- matched
Entities number - The number of monitored entities where the tags have been added.
-
Custom
Tags Tags - Specifies the entities where you want to update tags
- current_
state str - For internal use: current state of tags in JSON format
- entity_
selector str - Specifies the entities where you want to update tags
- matched_
entities int - The number of monitored entities where the tags have been added.
-
Custom
Tags Tags Args - Specifies the entities where you want to update tags
- current
State String - For internal use: current state of tags in JSON format
- entity
Selector String - Specifies the entities where you want to update tags
- matched
Entities Number - The number of monitored entities where the tags have been added.
- Property Map
- Specifies the entities where you want to update tags
Supporting Types
CustomTagsTags, CustomTagsTagsArgs
- Filters
[]Custom
Tags Tags Filter - A Tag Filter
- filters list(object)
- A Tag Filter
- filters
List<Custom
Tags Tags Filter> - A Tag Filter
- filters
Custom
Tags Tags Filter[] - A Tag Filter
- filters
Sequence[Custom
Tags Tags Filter] - A Tag Filter
- filters List<Property Map>
- A Tag Filter
CustomTagsTagsFilter, CustomTagsTagsFilterArgs
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatraceTerraform Provider.
published on Tuesday, Jun 9, 2026 by Pulumiverse