@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
58 lines • 2 kB
JavaScript
// *** 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.getDefaultKmsKeyOutput = exports.getDefaultKmsKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get the default EBS encryption KMS key in the current region.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.ebs.getDefaultKmsKey({});
* const example = new aws.ebs.Volume("example", {
* availabilityZone: "us-west-2a",
* encrypted: true,
* kmsKeyId: current.then(current => current.keyArn),
* });
* ```
*/
function getDefaultKmsKey(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ebs/getDefaultKmsKey:getDefaultKmsKey", {
"region": args.region,
}, opts);
}
exports.getDefaultKmsKey = getDefaultKmsKey;
/**
* Use this data source to get the default EBS encryption KMS key in the current region.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.ebs.getDefaultKmsKey({});
* const example = new aws.ebs.Volume("example", {
* availabilityZone: "us-west-2a",
* encrypted: true,
* kmsKeyId: current.then(current => current.keyArn),
* });
* ```
*/
function getDefaultKmsKeyOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ebs/getDefaultKmsKey:getDefaultKmsKey", {
"region": args.region,
}, opts);
}
exports.getDefaultKmsKeyOutput = getDefaultKmsKeyOutput;
//# sourceMappingURL=getDefaultKmsKey.js.map
;