@pulumi/xyz 0.0.1-alpha.1711039277 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,55 +0,0 @@
1
- # XYZ Resource Provider
2
-
3
- The xyz Resource Provider lets you manage [xyz](http://example.com) resources.
4
-
5
- ## Installing
6
-
7
- This package is available for several languages/platforms:
8
-
9
- ### Node.js (JavaScript/TypeScript)
10
-
11
- To use from JavaScript or TypeScript in Node.js, install using either `npm`:
12
-
13
- ```bash
14
- npm install @pulumi/xyz
15
- ```
16
-
17
- or `yarn`:
18
-
19
- ```bash
20
- yarn add @pulumi/xyz
21
- ```
22
-
23
- ### Python
24
-
25
- To use from Python, install using `pip`:
26
-
27
- ```bash
28
- pip install pulumi_xyz
29
- ```
30
-
31
- ### Go
32
-
33
- To use from Go, use `go get` to grab the latest version of the library:
34
-
35
- ```bash
36
- go get github.com/pulumi/pulumi-xyz/sdk/go/...
37
- ```
38
-
39
- ### .NET
40
-
41
- To use from .NET, install using `dotnet add package`:
42
-
43
- ```bash
44
- dotnet add package Pulumi.xyz
45
- ```
46
-
47
- ## Configuration
48
-
49
- The following configuration points are available for the `xyz` provider:
50
-
51
- - `xyz:region` (environment: `XYZ`) - the region in which to deploy resources
52
-
53
- ## Reference
54
-
55
- For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/xyz/api-docs/).
package/bin/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # Pulumi Native Provider Boilerplate
2
+
3
+ This repository is a boilerplate showing how to create a native Pulumi provider.
4
+
5
+ ## Authoring a Pulumi Native Provider
6
+
7
+ This boilerplate creates a working Pulumi-owned provider named `xyz`.
8
+ It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider.
9
+
10
+
11
+ ### Prerequisites
12
+
13
+ Ensure the following tools are installed and present in your `$PATH`:
14
+
15
+ * [`pulumictl`](https://github.com/pulumi/pulumictl#installation)
16
+ * [Go 1.17](https://golang.org/dl/) or 1.latest
17
+ * [NodeJS](https://nodejs.org/en/) 14.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations.
18
+ * [Yarn](https://yarnpkg.com/)
19
+ * [TypeScript](https://www.typescriptlang.org/)
20
+ * [Python](https://www.python.org/downloads/) (called as `python3`). For recent versions of MacOS, the system-installed version is fine.
21
+ * [.NET](https://dotnet.microsoft.com/download)
22
+
23
+
24
+ ### Creating and Initializing the Repository
25
+
26
+ Pulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience. From this repository:
27
+
28
+ 1. Click "Use this template".
29
+ 1. Set the following options:
30
+ * Owner: pulumi
31
+ * Repository name: pulumi-xyz-native (replace "xyz" with the name of your provider)
32
+ * Description: Pulumi provider for xyz
33
+ * Repository type: Public
34
+ 1. Clone the generated repository.
35
+
36
+ From the templated repository:
37
+
38
+ 1. Search-replace `xyz` with the name of your desired provider.
39
+
40
+ #### Build the provider and install the plugin
41
+
42
+ ```bash
43
+ $ make build install
44
+ ```
45
+
46
+ This will:
47
+
48
+ 1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored)
49
+ 2. Create the provider binary and place it in the `./bin` folder (gitignored)
50
+ 3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder
51
+ 4. Install the provider on your machine.
52
+
53
+ #### Test against the example
54
+
55
+ ```bash
56
+ $ cd examples/simple
57
+ $ yarn link @pulumi/xyz
58
+ $ yarn install
59
+ $ pulumi stack init test
60
+ $ pulumi up
61
+ ```
62
+
63
+ Now that you have completed all of the above steps, you have a working provider that generates a random string for you.
64
+
65
+ #### A brief repository overview
66
+
67
+ You now have:
68
+
69
+ 1. A `provider/` folder containing the building and implementation logic
70
+ 1. `cmd/pulumi-resource-xyz/main.go` - holds the provider's sample implementation logic.
71
+ 2. `deployment-templates` - a set of files to help you around deployment and publication
72
+ 3. `sdk` - holds the generated code libraries created by `pulumi-gen-xyz/main.go`
73
+ 4. `examples` a folder of Pulumi programs to try locally and/or use in CI.
74
+ 5. A `Makefile` and this `README`.
75
+
76
+ #### Additional Details
77
+
78
+ This repository depends on the pulumi-go-provider library. For more details on building providers, please check
79
+ the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider).
80
+
81
+ ### Build Examples
82
+
83
+ Create an example program using the resources defined in your provider, and place it in the `examples/` folder.
84
+
85
+ You can now repeat the steps for [build, install, and test](#test-against-the-example).
86
+
87
+ ## Configuring CI and releases
88
+
89
+ 1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md).
90
+
91
+ ## References
92
+
93
+ Other resources/examples for implementing providers:
94
+ * [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)
95
+ * [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider)
package/bin/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { ProviderArgs } from "./provider";
2
+ export type Provider = import("./provider").Provider;
3
+ export declare const Provider: typeof import("./provider").Provider;
4
+ export { RandomArgs } from "./random";
5
+ export type Random = import("./random").Random;
6
+ export declare const Random: typeof import("./random").Random;
@@ -1,32 +1,26 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Resource = exports.Provider = exports.getDataSourceOutput = exports.getDataSource = exports.dataSourceOutput = exports.dataSource = void 0;
5
+ exports.Random = exports.Provider = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
- exports.dataSource = null;
9
- exports.dataSourceOutput = null;
10
- utilities.lazyLoad(exports, ["dataSource", "dataSourceOutput"], () => require("./dataSource"));
11
- exports.getDataSource = null;
12
- exports.getDataSourceOutput = null;
13
- utilities.lazyLoad(exports, ["getDataSource", "getDataSourceOutput"], () => require("./getDataSource"));
14
8
  exports.Provider = null;
15
9
  utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
16
- exports.Resource = null;
17
- utilities.lazyLoad(exports, ["Resource"], () => require("./resource"));
10
+ exports.Random = null;
11
+ utilities.lazyLoad(exports, ["Random"], () => require("./random"));
18
12
  const _module = {
19
13
  version: utilities.getVersion(),
20
14
  construct: (name, type, urn) => {
21
15
  switch (type) {
22
- case "xyz:index/resource:Resource":
23
- return new exports.Resource(name, undefined, { urn });
16
+ case "xyz:index:Random":
17
+ return new exports.Random(name, undefined, { urn });
24
18
  default:
25
19
  throw new Error(`unknown resource type ${type}`);
26
20
  }
27
21
  },
28
22
  };
29
- pulumi.runtime.registerResourceModule("xyz", "index/resource", _module);
23
+ pulumi.runtime.registerResourceModule("xyz", "index", _module);
30
24
  pulumi.runtime.registerResourcePackage("xyz", {
31
25
  version: utilities.getVersion(),
32
26
  constructProvider: (name, type, urn) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAK5B,QAAA,QAAQ,GAAyC,IAAW,CAAC;AAC1E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAI1D,QAAA,MAAM,GAAqC,IAAW,CAAC;AACpE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AAGnE,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,SAAS,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAAmB,EAAE;QACpE,QAAQ,IAAI,EAAE;YACV,KAAK,kBAAkB;gBACnB,OAAO,IAAI,cAAM,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACpD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC9D,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,KAAK,EAAE;IAC1C,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,sBAAsB,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var childProcess = require("child_process");
3
+
4
+ var args = process.argv.slice(2);
5
+
6
+ if (args.indexOf("${VERSION}") !== -1) {
7
+ process.exit(0);
8
+ }
9
+
10
+ var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), {
11
+ stdio: ["ignore", "inherit", "inherit"]
12
+ });
13
+
14
+ if (res.error && res.error.code === "ENOENT") {
15
+ console.error("\nThere was an error installing the resource provider plugin. " +
16
+ "It looks like `pulumi` is not installed on your system. " +
17
+ "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
18
+ "You may try manually installing the plugin by running " +
19
+ "`pulumi plugin install " + args.join(" ") + "`");
20
+ } else if (res.error || res.status !== 0) {
21
+ console.error("\nThere was an error installing the resource provider plugin. " +
22
+ "You may try to manually installing the plugin by running " +
23
+ "`pulumi plugin install " + args.join(" ") + "`");
24
+ }
25
+
26
+ process.exit(0);
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@pulumi/xyz",
3
+ "version": "v0.0.1-alpha.1680696897+c94bb94f",
4
+ "scripts": {
5
+ "build": "tsc",
6
+ "install": "node scripts/install-pulumi-plugin.js resource xyz v0.0.1-alpha.1680696897+c94bb94f"
7
+ },
8
+ "dependencies": {
9
+ "@pulumi/pulumi": "^3.42.0"
10
+ },
11
+ "devDependencies": {
12
+ "@types/node": "^14",
13
+ "typescript": "^4.3.5"
14
+ },
15
+ "pulumi": {
16
+ "resource": true,
17
+ "name": "xyz"
18
+ }
19
+ }
@@ -1,10 +1,4 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
- /**
3
- * The provider type for the xyz package. By default, resources use package-wide configuration
4
- * settings, however an explicit `Provider` instance may be created and passed during resource
5
- * construction to achieve fine-grained programmatic control over provider settings. See the
6
- * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
7
- */
8
2
  export declare class Provider extends pulumi.ProviderResource {
9
3
  /**
10
4
  * Returns true if the given object is an instance of Provider. This is designed to work even
@@ -1,16 +1,10 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.Provider = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
- /**
9
- * The provider type for the xyz package. By default, resources use package-wide configuration
10
- * settings, however an explicit `Provider` instance may be created and passed during resource
11
- * construction to achieve fine-grained programmatic control over provider settings. See the
12
- * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
13
- */
14
8
  class Provider extends pulumi.ProviderResource {
15
9
  /**
16
10
  * Returns true if the given object is an instance of Provider. This is designed to work even
@@ -20,7 +14,7 @@ class Provider extends pulumi.ProviderResource {
20
14
  if (obj === undefined || obj === null) {
21
15
  return false;
22
16
  }
23
- return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
17
+ return obj['__pulumiType'] === Provider.__pulumiType;
24
18
  }
25
19
  /**
26
20
  * Create a Provider resource with the given unique name, arguments, and options.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;IAGD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;QACxE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;SACC;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AA9BL,4BA+BC;AA9BG,gBAAgB;AACO,qBAAY,GAAG,KAAK,CAAC"}
@@ -0,0 +1,33 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ export declare class Random extends pulumi.CustomResource {
3
+ /**
4
+ * Get an existing Random resource's state with the given name, ID, and optional extra
5
+ * properties used to qualify the lookup.
6
+ *
7
+ * @param name The _unique_ name of the resulting resource.
8
+ * @param id The _unique_ provider ID of the resource to lookup.
9
+ * @param opts Optional settings to control the behavior of the CustomResource.
10
+ */
11
+ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Random;
12
+ /**
13
+ * Returns true if the given object is an instance of Random. This is designed to work even
14
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
15
+ */
16
+ static isInstance(obj: any): obj is Random;
17
+ readonly length: pulumi.Output<number>;
18
+ readonly result: pulumi.Output<string>;
19
+ /**
20
+ * Create a Random resource with the given unique name, arguments, and options.
21
+ *
22
+ * @param name The _unique_ name of the resource.
23
+ * @param args The arguments to use to populate this resource's properties.
24
+ * @param opts A bag of options that control this resource's behavior.
25
+ */
26
+ constructor(name: string, args: RandomArgs, opts?: pulumi.CustomResourceOptions);
27
+ }
28
+ /**
29
+ * The set of arguments for constructing a Random resource.
30
+ */
31
+ export interface RandomArgs {
32
+ length: pulumi.Input<number>;
33
+ }
package/bin/random.js ADDED
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Random = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ class Random extends pulumi.CustomResource {
9
+ /**
10
+ * Get an existing Random resource's state with the given name, ID, and optional extra
11
+ * properties used to qualify the lookup.
12
+ *
13
+ * @param name The _unique_ name of the resulting resource.
14
+ * @param id The _unique_ provider ID of the resource to lookup.
15
+ * @param opts Optional settings to control the behavior of the CustomResource.
16
+ */
17
+ static get(name, id, opts) {
18
+ return new Random(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
19
+ }
20
+ /**
21
+ * Returns true if the given object is an instance of Random. This is designed to work even
22
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
23
+ */
24
+ static isInstance(obj) {
25
+ if (obj === undefined || obj === null) {
26
+ return false;
27
+ }
28
+ return obj['__pulumiType'] === Random.__pulumiType;
29
+ }
30
+ /**
31
+ * Create a Random resource with the given unique name, arguments, and options.
32
+ *
33
+ * @param name The _unique_ name of the resource.
34
+ * @param args The arguments to use to populate this resource's properties.
35
+ * @param opts A bag of options that control this resource's behavior.
36
+ */
37
+ constructor(name, args, opts) {
38
+ let resourceInputs = {};
39
+ opts = opts || {};
40
+ if (!opts.id) {
41
+ if ((!args || args.length === undefined) && !opts.urn) {
42
+ throw new Error("Missing required property 'length'");
43
+ }
44
+ resourceInputs["length"] = args ? args.length : undefined;
45
+ resourceInputs["result"] = undefined /*out*/;
46
+ }
47
+ else {
48
+ resourceInputs["length"] = undefined /*out*/;
49
+ resourceInputs["result"] = undefined /*out*/;
50
+ }
51
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
52
+ super(Random.__pulumiType, name, resourceInputs, opts);
53
+ }
54
+ }
55
+ exports.Random = Random;
56
+ /** @internal */
57
+ Random.__pulumiType = 'xyz:index:Random';
58
+ //# sourceMappingURL=random.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.js","sourceRoot":"","sources":["../random.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,SAAgB,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACnE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;IAKD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAgB,EAAE,IAAmC;QAC3E,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;aACzD;YACD,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;aAAM;YACH,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AApDL,wBAqDC;AAxCG,gBAAgB;AACO,mBAAY,GAAG,kBAAkB,CAAC"}
@@ -1,8 +1,4 @@
1
- import * as pulumi from "@pulumi/pulumi";
2
1
  export declare function getEnv(...vars: string[]): string | undefined;
3
2
  export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
4
3
  export declare function getEnvNumber(...vars: string[]): number | undefined;
5
4
  export declare function getVersion(): string;
6
- export declare function callAsync<T>(tok: string, props: pulumi.Inputs, res?: pulumi.Resource, opts?: {
7
- property?: string;
8
- }): Promise<T>;
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ // *** WARNING: this file was generated by pulumi. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
- return new (P || (P = Promise))(function (resolve, reject) {
7
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
- step((generator = generator.apply(thisArg, _arguments || [])).next());
11
- });
12
- };
13
4
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
15
- const runtime = require("@pulumi/pulumi/runtime");
5
+ exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
16
6
  function getEnv(...vars) {
17
7
  for (const v of vars) {
18
8
  const value = process.env[v];
@@ -76,26 +66,4 @@ function lazyLoad(exports, props, loadModule) {
76
66
  }
77
67
  }
78
68
  exports.lazyLoad = lazyLoad;
79
- function callAsync(tok, props, res, opts) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- const o = runtime.call(tok, props, res);
82
- const value = yield o.promise(true /*withUnknowns*/);
83
- const isKnown = yield o.isKnown;
84
- const isSecret = yield o.isSecret;
85
- const problem = !isKnown ? "an unknown value"
86
- : isSecret ? "a secret value"
87
- : undefined;
88
- // Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
89
- if (problem) {
90
- throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
91
- "This is an error in the provider, please report this to the provider developer.");
92
- }
93
- // Extract a single property if requested.
94
- if (opts && opts.property) {
95
- return value[opts.property];
96
- }
97
- return value;
98
- });
99
- }
100
- exports.callAsync = callAsync;
101
69
  //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,iFAAiF;;;AAGjF,SAAgB,MAAM,CAAC,GAAG,IAAc;IACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,wBAQC;AAED,SAAgB,aAAa,CAAC,GAAG,IAAc;IAC3C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,SAAS,EAAE;QACjB,uGAAuG;QACvG,yDAAyD;QACzD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC1E,OAAO,IAAI,CAAC;SACf;QACD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC7E,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAbD,sCAaC;AAED,SAAgB,YAAY,CAAC,GAAG,IAAc;IAC1C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,SAAS,EAAE;QACjB,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACX,OAAO,CAAC,CAAC;SACZ;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AATD,oCASC;AAED,SAAgB,UAAU;IACtB,IAAI,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC;IAChD,6EAA6E;IAC7E,iCAAiC;IACjC,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC5B,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAC9B;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AARD,gCAQC;AAED,gBAAgB;AAChB,SAAgB,oBAAoB;IAChC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC;AACrC,CAAC;AAFD,oDAEC;AAED,gBAAgB;AAChB,SAAgB,QAAQ,CAAC,OAAY,EAAE,KAAe,EAAE,UAAe;IACnE,KAAK,IAAI,QAAQ,IAAI,KAAK,EAAE;QACxB,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;YACrC,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE;gBACD,OAAO,UAAU,EAAE,CAAC,QAAQ,CAAC,CAAC;YAClC,CAAC;SACJ,CAAC,CAAC;KACN;AACL,CAAC;AATD,4BASC"}