1. Packages
  2. Azure Native
  3. API Docs
  4. costmanagement
  5. TagInheritanceSetting
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.costmanagement.TagInheritanceSetting

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Tag Inheritance Setting definition.

Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2022-10-05-preview.

Example Usage

CreateOrUpdateSettingByScope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var tagInheritanceSetting = new AzureNative.CostManagement.TagInheritanceSetting("tagInheritanceSetting", new()
    {
        Kind = "taginheritance",
        Properties = new AzureNative.CostManagement.Inputs.TagInheritancePropertiesArgs
        {
            PreferContainerTags = false,
        },
        Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
        Type = "taginheritance",
    });

});
Copy
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costmanagement.NewTagInheritanceSetting(ctx, "tagInheritanceSetting", &costmanagement.TagInheritanceSettingArgs{
			Kind: pulumi.String("taginheritance"),
			Properties: &costmanagement.TagInheritancePropertiesArgs{
				PreferContainerTags: pulumi.Bool(false),
			},
			Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
			Type:  pulumi.String("taginheritance"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.TagInheritanceSetting;
import com.pulumi.azurenative.costmanagement.TagInheritanceSettingArgs;
import com.pulumi.azurenative.costmanagement.inputs.TagInheritancePropertiesArgs;
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 tagInheritanceSetting = new TagInheritanceSetting("tagInheritanceSetting", TagInheritanceSettingArgs.builder()
            .kind("taginheritance")
            .properties(TagInheritancePropertiesArgs.builder()
                .preferContainerTags(false)
                .build())
            .scope("subscriptions/00000000-0000-0000-0000-000000000000")
            .type("taginheritance")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const tagInheritanceSetting = new azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSetting", {
    kind: "taginheritance",
    properties: {
        preferContainerTags: false,
    },
    scope: "subscriptions/00000000-0000-0000-0000-000000000000",
    type: "taginheritance",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

tag_inheritance_setting = azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSetting",
    kind="taginheritance",
    properties={
        "prefer_container_tags": False,
    },
    scope="subscriptions/00000000-0000-0000-0000-000000000000",
    type="taginheritance")
Copy
resources:
  tagInheritanceSetting:
    type: azure-native:costmanagement:TagInheritanceSetting
    properties:
      kind: taginheritance
      properties:
        preferContainerTags: false
      scope: subscriptions/00000000-0000-0000-0000-000000000000
      type: taginheritance
Copy

Create TagInheritanceSetting Resource

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

Constructor syntax

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

@overload
def TagInheritanceSetting(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          scope: Optional[str] = None,
                          properties: Optional[TagInheritancePropertiesArgs] = None,
                          type: Optional[str] = None)
func NewTagInheritanceSetting(ctx *Context, name string, args TagInheritanceSettingArgs, opts ...ResourceOption) (*TagInheritanceSetting, error)
public TagInheritanceSetting(string name, TagInheritanceSettingArgs args, CustomResourceOptions? opts = null)
public TagInheritanceSetting(String name, TagInheritanceSettingArgs args)
public TagInheritanceSetting(String name, TagInheritanceSettingArgs args, CustomResourceOptions options)
type: azure-native:costmanagement:TagInheritanceSetting
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. TagInheritanceSettingArgs
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. TagInheritanceSettingArgs
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. TagInheritanceSettingArgs
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. TagInheritanceSettingArgs
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. TagInheritanceSettingArgs
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 tagInheritanceSettingResource = new AzureNative.CostManagement.TagInheritanceSetting("tagInheritanceSettingResource", new()
{
    Kind = "string",
    Scope = "string",
    Properties = new AzureNative.CostManagement.Inputs.TagInheritancePropertiesArgs
    {
        PreferContainerTags = false,
    },
    Type = "string",
});
Copy
example, err := costmanagement.NewTagInheritanceSetting(ctx, "tagInheritanceSettingResource", &costmanagement.TagInheritanceSettingArgs{
	Kind:  pulumi.String("string"),
	Scope: pulumi.String("string"),
	Properties: &costmanagement.TagInheritancePropertiesArgs{
		PreferContainerTags: pulumi.Bool(false),
	},
	Type: pulumi.String("string"),
})
Copy
var tagInheritanceSettingResource = new TagInheritanceSetting("tagInheritanceSettingResource", TagInheritanceSettingArgs.builder()
    .kind("string")
    .scope("string")
    .properties(TagInheritancePropertiesArgs.builder()
        .preferContainerTags(false)
        .build())
    .type("string")
    .build());
Copy
tag_inheritance_setting_resource = azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource",
    kind="string",
    scope="string",
    properties={
        "prefer_container_tags": False,
    },
    type="string")
Copy
const tagInheritanceSettingResource = new azure_native.costmanagement.TagInheritanceSetting("tagInheritanceSettingResource", {
    kind: "string",
    scope: "string",
    properties: {
        preferContainerTags: false,
    },
    type: "string",
});
Copy
type: azure-native:costmanagement:TagInheritanceSetting
properties:
    kind: string
    properties:
        preferContainerTags: false
    scope: string
    type: string
Copy

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

Scope
This property is required.
Changes to this property will trigger replacement.
string
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
Properties Pulumi.AzureNative.CostManagement.Inputs.TagInheritanceProperties
The properties of the tag inheritance setting.
Type Changes to this property will trigger replacement. string
Setting type.
Scope
This property is required.
Changes to this property will trigger replacement.
string
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
Properties TagInheritancePropertiesArgs
The properties of the tag inheritance setting.
Type Changes to this property will trigger replacement. string
Setting type.
scope
This property is required.
Changes to this property will trigger replacement.
String
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
properties TagInheritanceProperties
The properties of the tag inheritance setting.
type Changes to this property will trigger replacement. String
Setting type.
scope
This property is required.
Changes to this property will trigger replacement.
string
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
properties TagInheritanceProperties
The properties of the tag inheritance setting.
type Changes to this property will trigger replacement. string
Setting type.
scope
This property is required.
Changes to this property will trigger replacement.
str
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
properties TagInheritancePropertiesArgs
The properties of the tag inheritance setting.
type Changes to this property will trigger replacement. str
Setting type.
scope
This property is required.
Changes to this property will trigger replacement.
String
The scope associated with this setting. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope.
properties Property Map
The properties of the tag inheritance setting.
type Changes to this property will trigger replacement. String
Setting type.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource

Supporting Types

TagInheritanceProperties
, TagInheritancePropertiesArgs

PreferContainerTags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
PreferContainerTags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. Boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
prefer_container_tags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. Boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).

TagInheritancePropertiesResponse
, TagInheritancePropertiesResponseArgs

PreferContainerTags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
PreferContainerTags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. Boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
prefer_container_tags This property is required. bool
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).
preferContainerTags This property is required. Boolean
This property defines the behavior when an inherited tag being applied matches a lower scope tag (Eg. Subscription tag matches the resource tag). If set to true - when tags match, the highest scope tags will be applied. Billing profile is the highest scope, followed by invoice sections, subscriptions and resource groups (allows overriding of lower scope tag values). If set to false - when tags match, the lowest scope tags will be applied. So, if a resource has the same tag as a subscription tag, the resource tag will be applied (does not allow overriding of lower scope tag values).

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:costmanagement:TagInheritanceSetting taginheritance /{scope}/providers/Microsoft.CostManagement/settings/{type} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi