@pulumi/fastly
Version:
A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4
87 lines (86 loc) • 3.46 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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),
* }});
* ```
*/
export declare function getPackageHash(args?: GetPackageHashArgs, opts?: pulumi.InvokeOptions): Promise<GetPackageHashResult>;
/**
* A collection of arguments for invoking getPackageHash.
*/
export interface GetPackageHashArgs {
/**
* The contents of the Wasm deployment package as a base64 encoded string (e.g. could be provided using an input variable or via external data source output variable). Conflicts with `filename`. Exactly one of these two arguments must be specified
*/
content?: string;
/**
* The path to the Wasm deployment package within your local filesystem. Conflicts with `content`. Exactly one of these two arguments must be specified
*/
filename?: string;
}
/**
* A collection of values returned by getPackageHash.
*/
export interface GetPackageHashResult {
/**
* The contents of the Wasm deployment package as a base64 encoded string (e.g. could be provided using an input variable or via external data source output variable). Conflicts with `filename`. Exactly one of these two arguments must be specified
*/
readonly content?: string;
/**
* The path to the Wasm deployment package within your local filesystem. Conflicts with `content`. Exactly one of these two arguments must be specified
*/
readonly filename?: string;
/**
* A SHA512 hash of all files (in sorted order) within the package.
*/
readonly hash: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}
/**
* 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),
* }});
* ```
*/
export declare function getPackageHashOutput(args?: GetPackageHashOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPackageHashResult>;
/**
* A collection of arguments for invoking getPackageHash.
*/
export interface GetPackageHashOutputArgs {
/**
* The contents of the Wasm deployment package as a base64 encoded string (e.g. could be provided using an input variable or via external data source output variable). Conflicts with `filename`. Exactly one of these two arguments must be specified
*/
content?: pulumi.Input<string>;
/**
* The path to the Wasm deployment package within your local filesystem. Conflicts with `content`. Exactly one of these two arguments must be specified
*/
filename?: pulumi.Input<string>;
}