1. Packages
  2. Vantage Provider
  3. API Docs
  4. VirtualTagConfig
vantage 0.1.49 published on Thursday, Apr 3, 2025 by vantage-sh

vantage.VirtualTagConfig

Explore with Pulumi AI

Manages a Virtual Tag Config.

Example Usage

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

const demo = vantage.getVirtualTagConfigs({});
const demoVirtualTagConfig = new vantage.VirtualTagConfig("demoVirtualTagConfig", {
    backfillUntil: "2024-01-01",
    key: "Demo Tag",
    overridable: true,
    values: [
        {
            filter: "(costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')",
            name: "Demo Value 0",
        },
        {
            costMetric: {
                aggregation: {
                    tag: "environment",
                },
                filter: "(costs.provider = 'aws' AND costs.service = 'AmazonECS')",
            },
            filter: "(costs.provider = 'aws' AND costs.service = 'AwsApiGateway')",
        },
    ],
});
Copy
import pulumi
import pulumi_vantage as vantage

demo = vantage.get_virtual_tag_configs()
demo_virtual_tag_config = vantage.VirtualTagConfig("demoVirtualTagConfig",
    backfill_until="2024-01-01",
    key="Demo Tag",
    overridable=True,
    values=[
        {
            "filter": "(costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')",
            "name": "Demo Value 0",
        },
        {
            "cost_metric": {
                "aggregation": {
                    "tag": "environment",
                },
                "filter": "(costs.provider = 'aws' AND costs.service = 'AmazonECS')",
            },
            "filter": "(costs.provider = 'aws' AND costs.service = 'AwsApiGateway')",
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vantage/vantage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vantage.GetVirtualTagConfigs(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		_, err = vantage.NewVirtualTagConfig(ctx, "demoVirtualTagConfig", &vantage.VirtualTagConfigArgs{
			BackfillUntil: pulumi.String("2024-01-01"),
			Key:           pulumi.String("Demo Tag"),
			Overridable:   pulumi.Bool(true),
			Values: vantage.VirtualTagConfigValueArray{
				&vantage.VirtualTagConfigValueArgs{
					Filter: pulumi.String("(costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')"),
					Name:   pulumi.String("Demo Value 0"),
				},
				&vantage.VirtualTagConfigValueArgs{
					CostMetric: &vantage.VirtualTagConfigValueCostMetricArgs{
						Aggregation: &vantage.VirtualTagConfigValueCostMetricAggregationArgs{
							Tag: pulumi.String("environment"),
						},
						Filter: pulumi.String("(costs.provider = 'aws' AND costs.service = 'AmazonECS')"),
					},
					Filter: pulumi.String("(costs.provider = 'aws' AND costs.service = 'AwsApiGateway')"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vantage = Pulumi.Vantage;

return await Deployment.RunAsync(() => 
{
    var demo = Vantage.GetVirtualTagConfigs.Invoke();

    var demoVirtualTagConfig = new Vantage.VirtualTagConfig("demoVirtualTagConfig", new()
    {
        BackfillUntil = "2024-01-01",
        Key = "Demo Tag",
        Overridable = true,
        Values = new[]
        {
            new Vantage.Inputs.VirtualTagConfigValueArgs
            {
                Filter = "(costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')",
                Name = "Demo Value 0",
            },
            new Vantage.Inputs.VirtualTagConfigValueArgs
            {
                CostMetric = new Vantage.Inputs.VirtualTagConfigValueCostMetricArgs
                {
                    Aggregation = new Vantage.Inputs.VirtualTagConfigValueCostMetricAggregationArgs
                    {
                        Tag = "environment",
                    },
                    Filter = "(costs.provider = 'aws' AND costs.service = 'AmazonECS')",
                },
                Filter = "(costs.provider = 'aws' AND costs.service = 'AwsApiGateway')",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vantage.VantageFunctions;
import com.pulumi.vantage.VirtualTagConfig;
import com.pulumi.vantage.VirtualTagConfigArgs;
import com.pulumi.vantage.inputs.VirtualTagConfigValueArgs;
import com.pulumi.vantage.inputs.VirtualTagConfigValueCostMetricArgs;
import com.pulumi.vantage.inputs.VirtualTagConfigValueCostMetricAggregationArgs;
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) {
        final var demo = VantageFunctions.getVirtualTagConfigs();

        var demoVirtualTagConfig = new VirtualTagConfig("demoVirtualTagConfig", VirtualTagConfigArgs.builder()
            .backfillUntil("2024-01-01")
            .key("Demo Tag")
            .overridable(true)
            .values(            
                VirtualTagConfigValueArgs.builder()
                    .filter("(costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')")
                    .name("Demo Value 0")
                    .build(),
                VirtualTagConfigValueArgs.builder()
                    .costMetric(VirtualTagConfigValueCostMetricArgs.builder()
                        .aggregation(VirtualTagConfigValueCostMetricAggregationArgs.builder()
                            .tag("environment")
                            .build())
                        .filter("(costs.provider = 'aws' AND costs.service = 'AmazonECS')")
                        .build())
                    .filter("(costs.provider = 'aws' AND costs.service = 'AwsApiGateway')")
                    .build())
            .build());

    }
}
Copy
resources:
  demoVirtualTagConfig:
    type: vantage:VirtualTagConfig
    properties:
      backfillUntil: 2024-01-01
      key: Demo Tag
      overridable: true
      values:
        - filter: (costs.provider = 'aws' AND costs.region = 'us-east-1') OR (costs.provider = 'gcp' AND costs.region = 'us-central1')
          name: Demo Value 0
        - costMetric:
            aggregation:
              tag: environment
            filter: (costs.provider = 'aws' AND costs.service = 'AmazonECS')
          filter: (costs.provider = 'aws' AND costs.service = 'AwsApiGateway')
variables:
  demo:
    fn::invoke:
      function: vantage:getVirtualTagConfigs
      arguments: {}
Copy

Create VirtualTagConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VirtualTagConfig(name: string, args: VirtualTagConfigArgs, opts?: CustomResourceOptions);
@overload
def VirtualTagConfig(resource_name: str,
                     args: VirtualTagConfigArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def VirtualTagConfig(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     backfill_until: Optional[str] = None,
                     key: Optional[str] = None,
                     overridable: Optional[bool] = None,
                     values: Optional[Sequence[VirtualTagConfigValueArgs]] = None)
func NewVirtualTagConfig(ctx *Context, name string, args VirtualTagConfigArgs, opts ...ResourceOption) (*VirtualTagConfig, error)
public VirtualTagConfig(string name, VirtualTagConfigArgs args, CustomResourceOptions? opts = null)
public VirtualTagConfig(String name, VirtualTagConfigArgs args)
public VirtualTagConfig(String name, VirtualTagConfigArgs args, CustomResourceOptions options)
type: vantage:VirtualTagConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VirtualTagConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VirtualTagConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualTagConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VirtualTagConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VirtualTagConfigArgs
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 virtualTagConfigResource = new Vantage.VirtualTagConfig("virtualTagConfigResource", new()
{
    BackfillUntil = "string",
    Key = "string",
    Overridable = false,
    Values = new[]
    {
        new Vantage.Inputs.VirtualTagConfigValueArgs
        {
            Filter = "string",
            BusinessMetricToken = "string",
            CostMetric = new Vantage.Inputs.VirtualTagConfigValueCostMetricArgs
            {
                Aggregation = new Vantage.Inputs.VirtualTagConfigValueCostMetricAggregationArgs
                {
                    Tag = "string",
                },
                Filter = "string",
            },
            Name = "string",
        },
    },
});
Copy
example, err := vantage.NewVirtualTagConfig(ctx, "virtualTagConfigResource", &vantage.VirtualTagConfigArgs{
BackfillUntil: pulumi.String("string"),
Key: pulumi.String("string"),
Overridable: pulumi.Bool(false),
Values: .VirtualTagConfigValueArray{
&.VirtualTagConfigValueArgs{
Filter: pulumi.String("string"),
BusinessMetricToken: pulumi.String("string"),
CostMetric: &.VirtualTagConfigValueCostMetricArgs{
Aggregation: &.VirtualTagConfigValueCostMetricAggregationArgs{
Tag: pulumi.String("string"),
},
Filter: pulumi.String("string"),
},
Name: pulumi.String("string"),
},
},
})
Copy
var virtualTagConfigResource = new VirtualTagConfig("virtualTagConfigResource", VirtualTagConfigArgs.builder()
    .backfillUntil("string")
    .key("string")
    .overridable(false)
    .values(VirtualTagConfigValueArgs.builder()
        .filter("string")
        .businessMetricToken("string")
        .costMetric(VirtualTagConfigValueCostMetricArgs.builder()
            .aggregation(VirtualTagConfigValueCostMetricAggregationArgs.builder()
                .tag("string")
                .build())
            .filter("string")
            .build())
        .name("string")
        .build())
    .build());
Copy
virtual_tag_config_resource = vantage.VirtualTagConfig("virtualTagConfigResource",
    backfill_until="string",
    key="string",
    overridable=False,
    values=[{
        "filter": "string",
        "business_metric_token": "string",
        "cost_metric": {
            "aggregation": {
                "tag": "string",
            },
            "filter": "string",
        },
        "name": "string",
    }])
Copy
const virtualTagConfigResource = new vantage.VirtualTagConfig("virtualTagConfigResource", {
    backfillUntil: "string",
    key: "string",
    overridable: false,
    values: [{
        filter: "string",
        businessMetricToken: "string",
        costMetric: {
            aggregation: {
                tag: "string",
            },
            filter: "string",
        },
        name: "string",
    }],
});
Copy
type: vantage:VirtualTagConfig
properties:
    backfillUntil: string
    key: string
    overridable: false
    values:
        - businessMetricToken: string
          costMetric:
            aggregation:
                tag: string
            filter: string
          filter: string
          name: string
Copy

VirtualTagConfig 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 VirtualTagConfig resource accepts the following input properties:

BackfillUntil This property is required. string
The earliest month VirtualTagConfig should be backfilled to.
Key This property is required. string
The key of the VirtualTagConfig.
Overridable This property is required. bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
Values List<VirtualTagConfigValue>
BackfillUntil This property is required. string
The earliest month VirtualTagConfig should be backfilled to.
Key This property is required. string
The key of the VirtualTagConfig.
Overridable This property is required. bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
Values []VirtualTagConfigValueArgs
backfillUntil This property is required. String
The earliest month VirtualTagConfig should be backfilled to.
key This property is required. String
The key of the VirtualTagConfig.
overridable This property is required. Boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
values List<VirtualTagConfigValue>
backfillUntil This property is required. string
The earliest month VirtualTagConfig should be backfilled to.
key This property is required. string
The key of the VirtualTagConfig.
overridable This property is required. boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
values VirtualTagConfigValue[]
backfill_until This property is required. str
The earliest month VirtualTagConfig should be backfilled to.
key This property is required. str
The key of the VirtualTagConfig.
overridable This property is required. bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
values Sequence[VirtualTagConfigValueArgs]
backfillUntil This property is required. String
The earliest month VirtualTagConfig should be backfilled to.
key This property is required. String
The key of the VirtualTagConfig.
overridable This property is required. Boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
values List<Property Map>

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualTagConfig resource produces the following output properties:

CreatedByToken string
The token of the User who created the VirtualTagConfig.
Id string
The provider-assigned unique ID for this managed resource.
Token string
The token of the VirtualTagConfig.
CreatedByToken string
The token of the User who created the VirtualTagConfig.
Id string
The provider-assigned unique ID for this managed resource.
Token string
The token of the VirtualTagConfig.
createdByToken String
The token of the User who created the VirtualTagConfig.
id String
The provider-assigned unique ID for this managed resource.
token String
The token of the VirtualTagConfig.
createdByToken string
The token of the User who created the VirtualTagConfig.
id string
The provider-assigned unique ID for this managed resource.
token string
The token of the VirtualTagConfig.
created_by_token str
The token of the User who created the VirtualTagConfig.
id str
The provider-assigned unique ID for this managed resource.
token str
The token of the VirtualTagConfig.
createdByToken String
The token of the User who created the VirtualTagConfig.
id String
The provider-assigned unique ID for this managed resource.
token String
The token of the VirtualTagConfig.

Look up Existing VirtualTagConfig Resource

Get an existing VirtualTagConfig 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?: VirtualTagConfigState, opts?: CustomResourceOptions): VirtualTagConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backfill_until: Optional[str] = None,
        created_by_token: Optional[str] = None,
        key: Optional[str] = None,
        overridable: Optional[bool] = None,
        token: Optional[str] = None,
        values: Optional[Sequence[VirtualTagConfigValueArgs]] = None) -> VirtualTagConfig
func GetVirtualTagConfig(ctx *Context, name string, id IDInput, state *VirtualTagConfigState, opts ...ResourceOption) (*VirtualTagConfig, error)
public static VirtualTagConfig Get(string name, Input<string> id, VirtualTagConfigState? state, CustomResourceOptions? opts = null)
public static VirtualTagConfig get(String name, Output<String> id, VirtualTagConfigState state, CustomResourceOptions options)
resources:  _:    type: vantage:VirtualTagConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
BackfillUntil string
The earliest month VirtualTagConfig should be backfilled to.
CreatedByToken string
The token of the User who created the VirtualTagConfig.
Key string
The key of the VirtualTagConfig.
Overridable bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
Token string
The token of the VirtualTagConfig.
Values List<VirtualTagConfigValue>
BackfillUntil string
The earliest month VirtualTagConfig should be backfilled to.
CreatedByToken string
The token of the User who created the VirtualTagConfig.
Key string
The key of the VirtualTagConfig.
Overridable bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
Token string
The token of the VirtualTagConfig.
Values []VirtualTagConfigValueArgs
backfillUntil String
The earliest month VirtualTagConfig should be backfilled to.
createdByToken String
The token of the User who created the VirtualTagConfig.
key String
The key of the VirtualTagConfig.
overridable Boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
token String
The token of the VirtualTagConfig.
values List<VirtualTagConfigValue>
backfillUntil string
The earliest month VirtualTagConfig should be backfilled to.
createdByToken string
The token of the User who created the VirtualTagConfig.
key string
The key of the VirtualTagConfig.
overridable boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
token string
The token of the VirtualTagConfig.
values VirtualTagConfigValue[]
backfill_until str
The earliest month VirtualTagConfig should be backfilled to.
created_by_token str
The token of the User who created the VirtualTagConfig.
key str
The key of the VirtualTagConfig.
overridable bool
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
token str
The token of the VirtualTagConfig.
values Sequence[VirtualTagConfigValueArgs]
backfillUntil String
The earliest month VirtualTagConfig should be backfilled to.
createdByToken String
The token of the User who created the VirtualTagConfig.
key String
The key of the VirtualTagConfig.
overridable Boolean
Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost.
token String
The token of the VirtualTagConfig.
values List<Property Map>

Supporting Types

VirtualTagConfigValue
, VirtualTagConfigValueArgs

Filter This property is required. string
The filter VQL for the Value.
BusinessMetricToken string
The token of the associated BusinessMetric.
CostMetric VirtualTagConfigValueCostMetric
Name string
The name of the Value.
Filter This property is required. string
The filter VQL for the Value.
BusinessMetricToken string
The token of the associated BusinessMetric.
CostMetric VirtualTagConfigValueCostMetric
Name string
The name of the Value.
filter This property is required. String
The filter VQL for the Value.
businessMetricToken String
The token of the associated BusinessMetric.
costMetric VirtualTagConfigValueCostMetric
name String
The name of the Value.
filter This property is required. string
The filter VQL for the Value.
businessMetricToken string
The token of the associated BusinessMetric.
costMetric VirtualTagConfigValueCostMetric
name string
The name of the Value.
filter This property is required. str
The filter VQL for the Value.
business_metric_token str
The token of the associated BusinessMetric.
cost_metric VirtualTagConfigValueCostMetric
name str
The name of the Value.
filter This property is required. String
The filter VQL for the Value.
businessMetricToken String
The token of the associated BusinessMetric.
costMetric Property Map
name String
The name of the Value.

VirtualTagConfigValueCostMetric
, VirtualTagConfigValueCostMetricArgs

Aggregation VirtualTagConfigValueCostMetricAggregation
Filter string
The filter VQL for the cost metric.
Aggregation VirtualTagConfigValueCostMetricAggregation
Filter string
The filter VQL for the cost metric.
aggregation VirtualTagConfigValueCostMetricAggregation
filter String
The filter VQL for the cost metric.
aggregation VirtualTagConfigValueCostMetricAggregation
filter string
The filter VQL for the cost metric.
aggregation VirtualTagConfigValueCostMetricAggregation
filter str
The filter VQL for the cost metric.
aggregation Property Map
filter String
The filter VQL for the cost metric.

VirtualTagConfigValueCostMetricAggregation
, VirtualTagConfigValueCostMetricAggregationArgs

Tag string
The tag to aggregate on.
Tag string
The tag to aggregate on.
tag String
The tag to aggregate on.
tag string
The tag to aggregate on.
tag str
The tag to aggregate on.
tag String
The tag to aggregate on.

Package Details

Repository
vantage vantage-sh/terraform-provider-vantage
License
Notes
This Pulumi package is based on the vantage Terraform Provider.