@pulumi/fastly
Version:
A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4
62 lines • 2.23 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.getPackageHashOutput = exports.getPackageHash = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Use this data source to generate a SHA512 hash of all files (in sorted order) within the package.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fastly from "@pulumi/fastly";
*
* const example = fastly.getPackageHash({
* filename: "./path/to/package.tar.gz",
* });
* const exampleServiceCompute = new fastly.ServiceCompute("example", {"package": {
* filename: "./path/to/package.tar.gz",
* sourceCodeHash: example.then(example => example.hash),
* }});
* ```
*/
function getPackageHash(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("fastly:index/getPackageHash:getPackageHash", {
"content": args.content,
"filename": args.filename,
}, opts);
}
exports.getPackageHash = getPackageHash;
/**
* Use this data source to generate a SHA512 hash of all files (in sorted order) within the package.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fastly from "@pulumi/fastly";
*
* const example = fastly.getPackageHash({
* filename: "./path/to/package.tar.gz",
* });
* const exampleServiceCompute = new fastly.ServiceCompute("example", {"package": {
* filename: "./path/to/package.tar.gz",
* sourceCodeHash: example.then(example => example.hash),
* }});
* ```
*/
function getPackageHashOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("fastly:index/getPackageHash:getPackageHash", {
"content": args.content,
"filename": args.filename,
}, opts);
}
exports.getPackageHashOutput = getPackageHashOutput;
//# sourceMappingURL=getPackageHash.js.map