UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

84 lines 2.82 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getDefaultTagsOutput = exports.getDefaultTags = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.getDefaultTags({}); * ``` * * ### Dynamically Apply Default Tags to Auto Scaling Group * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.getDefaultTags({}); * const exampleGroup = new aws.autoscaling.Group("example", {tags: .map(entry => ({ * key: entry.key, * value: entry.value, * propagateAtLaunch: true, * }))}); * ``` */ function getDefaultTags(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:index/getDefaultTags:getDefaultTags", { "id": args.id, }, opts); } exports.getDefaultTags = getDefaultTags; /** * Use this data source to get the default tags configured on the provider. * * With this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.getDefaultTags({}); * ``` * * ### Dynamically Apply Default Tags to Auto Scaling Group * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.getDefaultTags({}); * const exampleGroup = new aws.autoscaling.Group("example", {tags: .map(entry => ({ * key: entry.key, * value: entry.value, * propagateAtLaunch: true, * }))}); * ``` */ function getDefaultTagsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:index/getDefaultTags:getDefaultTags", { "id": args.id, }, opts); } exports.getDefaultTagsOutput = getDefaultTagsOutput; //# sourceMappingURL=getDefaultTags.js.map