@pulumi/xyz 0.0.3 → 0.1.0-alpha.1731444235

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.
Files changed (60) hide show
  1. package/README.md +63 -0
  2. package/config/index.d.ts +1 -0
  3. package/config/index.js +21 -0
  4. package/config/index.js.map +1 -0
  5. package/config/vars.d.ts +5 -0
  6. package/config/vars.js +13 -0
  7. package/config/vars.js.map +1 -0
  8. package/getDataSource.d.ts +25 -0
  9. package/getDataSource.js +22 -0
  10. package/getDataSource.js.map +1 -0
  11. package/index.d.ts +13 -0
  12. package/index.js +43 -0
  13. package/index.js.map +1 -0
  14. package/package.json +13 -5
  15. package/{bin/provider.d.ts → provider.d.ts} +11 -0
  16. package/{bin/provider.js → provider.js} +9 -2
  17. package/provider.js.map +1 -0
  18. package/region/index.d.ts +1 -0
  19. package/region/index.js +21 -0
  20. package/region/index.js.map +1 -0
  21. package/resource.d.ts +48 -0
  22. package/resource.js +49 -0
  23. package/resource.js.map +1 -0
  24. package/types/enums/index.d.ts +2 -0
  25. package/types/enums/index.js +9 -0
  26. package/types/enums/index.js.map +1 -0
  27. package/types/enums/region/index.d.ts +5 -0
  28. package/types/enums/region/index.js +10 -0
  29. package/types/enums/region/index.js.map +1 -0
  30. package/types/index.d.ts +4 -0
  31. package/types/index.js +13 -0
  32. package/types/index.js.map +1 -0
  33. package/types/input.d.ts +1 -0
  34. package/types/input.js +5 -0
  35. package/types/input.js.map +1 -0
  36. package/types/output.d.ts +1 -0
  37. package/types/output.js +5 -0
  38. package/types/output.js.map +1 -0
  39. package/{bin/utilities.d.ts → utilities.d.ts} +4 -0
  40. package/{bin/utilities.js → utilities.js} +34 -2
  41. package/utilities.js.map +1 -0
  42. package/bin/README.md +0 -95
  43. package/bin/index.d.ts +0 -6
  44. package/bin/index.js +0 -33
  45. package/bin/index.js.map +0 -1
  46. package/bin/install-pulumi-plugin.js +0 -26
  47. package/bin/package.json +0 -19
  48. package/bin/provider.js.map +0 -1
  49. package/bin/random.d.ts +0 -33
  50. package/bin/random.js +0 -58
  51. package/bin/random.js.map +0 -1
  52. package/bin/utilities.js.map +0 -1
  53. package/bin/yarn.lock +0 -1314
  54. package/index.ts +0 -39
  55. package/provider.ts +0 -44
  56. package/random.ts +0 -67
  57. package/scripts/install-pulumi-plugin.js +0 -26
  58. package/tsconfig.json +0 -21
  59. package/utilities.ts +0 -66
  60. /package/{bin/LICENSE → LICENSE} +0 -0
package/README.md CHANGED
@@ -0,0 +1,63 @@
1
+ # Terraform Bridge Provider Boilerplate
2
+
3
+ This repository is the template for authoring a Pulumi package from an existing Terraform provider as part of the guide for [authoring and publishing Pulumi packages](https://www.pulumi.com/docs/iac/packages-and-automation/pulumi-packages/authoring/).
4
+
5
+ This repository is initially set up as a fictitious provider named "xyz" to demonstrate a resource, a data source and configuration derived from the [github.com/pulumi/terraform-provider-xyz provider](https://github.com/pulumi/terraform-provider-xyz).
6
+
7
+ Read the [setup instructions](SETUP.md) for step-by-step instructions on how to bridge a new provider and refer to our complete docs [guide for authoring and publishing a Pulumi Package](https://www.pulumi.com/docs/iac/packages-and-automation/pulumi-packages/authoring/).
8
+
9
+ # Xyz Resource Provider
10
+
11
+ The Xyz Resource Provider lets you manage [Xyz](http://example.com) resources.
12
+
13
+ ## Installing
14
+
15
+ This package is available for several languages/platforms:
16
+
17
+ ### Node.js (JavaScript/TypeScript)
18
+
19
+ To use from JavaScript or TypeScript in Node.js, install using either `npm`:
20
+
21
+ ```bash
22
+ npm install @pulumi/xyz
23
+ ```
24
+
25
+ or `yarn`:
26
+
27
+ ```bash
28
+ yarn add @pulumi/xyz
29
+ ```
30
+
31
+ ### Python
32
+
33
+ To use from Python, install using `pip`:
34
+
35
+ ```bash
36
+ pip install pulumi_xyz
37
+ ```
38
+
39
+ ### Go
40
+
41
+ To use from Go, use `go get` to grab the latest version of the library:
42
+
43
+ ```bash
44
+ go get github.com/pulumi/pulumi-xyz/sdk/go/...
45
+ ```
46
+
47
+ ### .NET
48
+
49
+ To use from .NET, install using `dotnet add package`:
50
+
51
+ ```bash
52
+ dotnet add package Pulumi.Xyz
53
+ ```
54
+
55
+ ## Configuration
56
+
57
+ The following configuration points are available for the `xyz` provider:
58
+
59
+ - `xyz:region` (environment: `XYZ_REGION`) - the region in which to deploy resources
60
+
61
+ ## Reference
62
+
63
+ For detailed reference documentation, please visit [the Pulumi registry](https://www.pulumi.com/registry/packages/xyz/api-docs/).
@@ -0,0 +1 @@
1
+ export * from "./vars";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ // Export members:
20
+ __exportStar(require("./vars"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
@@ -0,0 +1,5 @@
1
+ import * as enums from "../types/enums";
2
+ /**
3
+ * A region which should be used.
4
+ */
5
+ export declare const region: enums.region.Region | undefined;
package/config/vars.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const pulumi = require("@pulumi/pulumi");
6
+ const __config = new pulumi.Config("xyz");
7
+ Object.defineProperty(exports, "region", {
8
+ get() {
9
+ return __config.getObject("region");
10
+ },
11
+ enumerable: true,
12
+ });
13
+ //# sourceMappingURL=vars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AAOzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAM1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;IACrC,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAsB,QAAQ,CAAC,CAAC;IAC7D,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ export declare function getDataSource(args: GetDataSourceArgs, opts?: pulumi.InvokeOptions): Promise<GetDataSourceResult>;
3
+ /**
4
+ * A collection of arguments for invoking getDataSource.
5
+ */
6
+ export interface GetDataSourceArgs {
7
+ sampleAttribute: string;
8
+ }
9
+ /**
10
+ * A collection of values returned by getDataSource.
11
+ */
12
+ export interface GetDataSourceResult {
13
+ /**
14
+ * The provider-assigned unique ID for this managed resource.
15
+ */
16
+ readonly id: string;
17
+ readonly sampleAttribute: string;
18
+ }
19
+ export declare function getDataSourceOutput(args: GetDataSourceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetDataSourceResult>;
20
+ /**
21
+ * A collection of arguments for invoking getDataSource.
22
+ */
23
+ export interface GetDataSourceOutputArgs {
24
+ sampleAttribute: pulumi.Input<string>;
25
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.getDataSourceOutput = exports.getDataSource = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ function getDataSource(args, opts) {
9
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
10
+ return pulumi.runtime.invoke("xyz:index/getDataSource:getDataSource", {
11
+ "sampleAttribute": args.sampleAttribute,
12
+ }, opts);
13
+ }
14
+ exports.getDataSource = getDataSource;
15
+ function getDataSourceOutput(args, opts) {
16
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
17
+ return pulumi.runtime.invokeOutput("xyz:index/getDataSource:getDataSource", {
18
+ "sampleAttribute": args.sampleAttribute,
19
+ }, opts);
20
+ }
21
+ exports.getDataSourceOutput = getDataSourceOutput;
22
+ //# sourceMappingURL=getDataSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDataSource.js","sourceRoot":"","sources":["../getDataSource.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,SAAgB,aAAa,CAAC,IAAuB,EAAE,IAA2B;IAC9E,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,uCAAuC,EAAE;QAClE,iBAAiB,EAAE,IAAI,CAAC,eAAe;KAC1C,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,sCAKC;AAmBD,SAAgB,mBAAmB,CAAC,IAA6B,EAAE,IAA2B;IAC1F,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,uCAAuC,EAAE;QACxE,iBAAiB,EAAE,IAAI,CAAC,eAAe;KAC1C,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,kDAKC"}
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ export { GetDataSourceArgs, GetDataSourceResult, GetDataSourceOutputArgs } from "./getDataSource";
2
+ export declare const getDataSource: typeof import("./getDataSource").getDataSource;
3
+ export declare const getDataSourceOutput: typeof import("./getDataSource").getDataSourceOutput;
4
+ export { ProviderArgs } from "./provider";
5
+ export type Provider = import("./provider").Provider;
6
+ export declare const Provider: typeof import("./provider").Provider;
7
+ export { ResourceArgs, ResourceState } from "./resource";
8
+ export type Resource = import("./resource").Resource;
9
+ export declare const Resource: typeof import("./resource").Resource;
10
+ import * as config from "./config";
11
+ import * as region from "./region";
12
+ import * as types from "./types";
13
+ export { config, region, types, };
package/index.js ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.types = exports.region = exports.config = exports.Resource = exports.Provider = exports.getDataSourceOutput = exports.getDataSource = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ exports.getDataSource = null;
9
+ exports.getDataSourceOutput = null;
10
+ utilities.lazyLoad(exports, ["getDataSource", "getDataSourceOutput"], () => require("./getDataSource"));
11
+ exports.Provider = null;
12
+ utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
13
+ exports.Resource = null;
14
+ utilities.lazyLoad(exports, ["Resource"], () => require("./resource"));
15
+ // Export sub-modules:
16
+ const config = require("./config");
17
+ exports.config = config;
18
+ const region = require("./region");
19
+ exports.region = region;
20
+ const types = require("./types");
21
+ exports.types = types;
22
+ const _module = {
23
+ version: utilities.getVersion(),
24
+ construct: (name, type, urn) => {
25
+ switch (type) {
26
+ case "xyz:index/resource:Resource":
27
+ return new exports.Resource(name, undefined, { urn });
28
+ default:
29
+ throw new Error(`unknown resource type ${type}`);
30
+ }
31
+ },
32
+ };
33
+ pulumi.runtime.registerResourceModule("xyz", "index/resource", _module);
34
+ pulumi.runtime.registerResourcePackage("xyz", {
35
+ version: utilities.getVersion(),
36
+ constructProvider: (name, type, urn) => {
37
+ if (type !== "pulumi:providers:xyz") {
38
+ throw new Error(`unknown provider type ${type}`);
39
+ }
40
+ return new exports.Provider(name, undefined, { urn });
41
+ },
42
+ });
43
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAI5B,QAAA,aAAa,GAAmD,IAAW,CAAC;AAC5E,QAAA,mBAAmB,GAAyD,IAAW,CAAC;AACrG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,eAAe,EAAC,qBAAqB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAI1F,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,QAAQ,GAAyC,IAAW,CAAC;AAC1E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAGvE,sBAAsB;AACtB,mCAAmC;AAK/B,wBAAM;AAJV,mCAAmC;AAK/B,wBAAM;AAJV,iCAAiC;AAK7B,sBAAK;AAGT,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,6BAA6B;gBAC9B,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACtD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAA;AACvE,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"}
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@pulumi/xyz",
3
- "version": "0.0.3",
3
+ "version": "0.1.0-alpha.1731444235",
4
+ "description": "A Pulumi package for creating and managing xyz cloud resources.",
5
+ "keywords": [
6
+ "xyz",
7
+ "category/cloud"
8
+ ],
9
+ "homepage": "https://www.pulumi.com",
10
+ "repository": "https://github.com/pulumi/pulumi-xyz",
11
+ "license": "Apache-2.0",
4
12
  "scripts": {
5
- "build": "tsc",
6
- "install": "node scripts/install-pulumi-plugin.js resource xyz 0.0.1"
13
+ "build": "tsc"
7
14
  },
8
15
  "dependencies": {
9
- "@pulumi/pulumi": "^3.42.0"
16
+ "@pulumi/pulumi": "^3.136.0"
10
17
  },
11
18
  "devDependencies": {
12
19
  "@types/node": "^14",
@@ -14,6 +21,7 @@
14
21
  },
15
22
  "pulumi": {
16
23
  "resource": true,
17
- "name": "xyz"
24
+ "name": "xyz",
25
+ "version": "0.1.0-alpha.1731444235"
18
26
  }
19
27
  }
@@ -1,4 +1,11 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
+ import * as enums from "./types/enums";
3
+ /**
4
+ * The provider type for the xyz package. By default, resources use package-wide configuration
5
+ * settings, however an explicit `Provider` instance may be created and passed during resource
6
+ * construction to achieve fine-grained programmatic control over provider settings. See the
7
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
8
+ */
2
9
  export declare class Provider extends pulumi.ProviderResource {
3
10
  /**
4
11
  * Returns true if the given object is an instance of Provider. This is designed to work even
@@ -18,4 +25,8 @@ export declare class Provider extends pulumi.ProviderResource {
18
25
  * The set of arguments for constructing a Provider resource.
19
26
  */
20
27
  export interface ProviderArgs {
28
+ /**
29
+ * A region which should be used.
30
+ */
31
+ region?: pulumi.Input<enums.region.Region>;
21
32
  }
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by pulumi. ***
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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
+ */
8
14
  class Provider extends pulumi.ProviderResource {
9
15
  /**
10
16
  * Returns true if the given object is an instance of Provider. This is designed to work even
@@ -14,7 +20,7 @@ class Provider extends pulumi.ProviderResource {
14
20
  if (obj === undefined || obj === null) {
15
21
  return false;
16
22
  }
17
- return obj['__pulumiType'] === Provider.__pulumiType;
23
+ return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
18
24
  }
19
25
  /**
20
26
  * Create a Provider resource with the given unique name, arguments, and options.
@@ -27,6 +33,7 @@ class Provider extends pulumi.ProviderResource {
27
33
  let resourceInputs = {};
28
34
  opts = opts || {};
29
35
  {
36
+ resourceInputs["region"] = args ? args.region : undefined;
30
37
  }
31
38
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
32
39
  super(Provider.__pulumiType, name, resourceInputs, opts);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAIzC,yCAAyC;AAEzC;;;;;GAKG;AACH,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,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAGD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;QACxE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;YACI,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7D;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;;AA/BL,4BAgCC;AA/BG,gBAAgB;AACO,qBAAY,GAAG,KAAK,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "../types/enums/region";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ // Export enums:
20
+ __exportStar(require("../types/enums/region"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../region/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAGjF,gBAAgB;AAChB,wDAAsC"}
package/resource.d.ts ADDED
@@ -0,0 +1,48 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ export declare class Resource extends pulumi.CustomResource {
3
+ /**
4
+ * Get an existing Resource 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 state Any extra arguments used during the lookup.
10
+ * @param opts Optional settings to control the behavior of the CustomResource.
11
+ */
12
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceState, opts?: pulumi.CustomResourceOptions): Resource;
13
+ /**
14
+ * Returns true if the given object is an instance of Resource. This is designed to work even
15
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
16
+ */
17
+ static isInstance(obj: any): obj is Resource;
18
+ /**
19
+ * Sample attribute.
20
+ */
21
+ readonly sampleAttribute: pulumi.Output<string | undefined>;
22
+ /**
23
+ * Create a Resource resource with the given unique name, arguments, and options.
24
+ *
25
+ * @param name The _unique_ name of the resource.
26
+ * @param args The arguments to use to populate this resource's properties.
27
+ * @param opts A bag of options that control this resource's behavior.
28
+ */
29
+ constructor(name: string, args?: ResourceArgs, opts?: pulumi.CustomResourceOptions);
30
+ }
31
+ /**
32
+ * Input properties used for looking up and filtering Resource resources.
33
+ */
34
+ export interface ResourceState {
35
+ /**
36
+ * Sample attribute.
37
+ */
38
+ sampleAttribute?: pulumi.Input<string>;
39
+ }
40
+ /**
41
+ * The set of arguments for constructing a Resource resource.
42
+ */
43
+ export interface ResourceArgs {
44
+ /**
45
+ * Sample attribute.
46
+ */
47
+ sampleAttribute?: pulumi.Input<string>;
48
+ }
package/resource.js ADDED
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.Resource = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ class Resource extends pulumi.CustomResource {
9
+ /**
10
+ * Get an existing Resource 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 state Any extra arguments used during the lookup.
16
+ * @param opts Optional settings to control the behavior of the CustomResource.
17
+ */
18
+ static get(name, id, state, opts) {
19
+ return new Resource(name, state, Object.assign(Object.assign({}, opts), { id: id }));
20
+ }
21
+ /**
22
+ * Returns true if the given object is an instance of Resource. This is designed to work even
23
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
24
+ */
25
+ static isInstance(obj) {
26
+ if (obj === undefined || obj === null) {
27
+ return false;
28
+ }
29
+ return obj['__pulumiType'] === Resource.__pulumiType;
30
+ }
31
+ constructor(name, argsOrState, opts) {
32
+ let resourceInputs = {};
33
+ opts = opts || {};
34
+ if (opts.id) {
35
+ const state = argsOrState;
36
+ resourceInputs["sampleAttribute"] = state ? state.sampleAttribute : undefined;
37
+ }
38
+ else {
39
+ const args = argsOrState;
40
+ resourceInputs["sampleAttribute"] = args ? args.sampleAttribute : undefined;
41
+ }
42
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
43
+ super(Resource.__pulumiType, name, resourceInputs, opts);
44
+ }
45
+ }
46
+ exports.Resource = Resource;
47
+ /** @internal */
48
+ Resource.__pulumiType = 'xyz:index/resource:Resource';
49
+ //# sourceMappingURL=resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.js","sourceRoot":"","sources":["../resource.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,cAAc;IAC/C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAqB,EAAE,IAAmC;QACnH,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC/D,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,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;IAeD,YAAY,IAAY,EAAE,WAA0C,EAAE,IAAmC;QACrG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAwC,CAAC;YACvD,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;SACjF;aAAM;YACH,MAAM,IAAI,GAAG,WAAuC,CAAC;YACrD,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/E;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;;AArDL,4BAsDC;AAxCG,gBAAgB;AACO,qBAAY,GAAG,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import * as region from "./region";
2
+ export { region, };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.region = void 0;
6
+ // Export sub-modules:
7
+ const region = require("./region");
8
+ exports.region = region;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../types/enums/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,sBAAsB;AACtB,mCAAmC;AAG/B,wBAAM"}
@@ -0,0 +1,5 @@
1
+ export declare const Region: {
2
+ readonly Here: "HERE";
3
+ readonly OverThere: "OVER_THERE";
4
+ };
5
+ export type Region = (typeof Region)[keyof typeof Region];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.Region = void 0;
6
+ exports.Region = {
7
+ Here: "HERE",
8
+ OverThere: "OVER_THERE",
9
+ };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/enums/region/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAGpE,QAAA,MAAM,GAAG;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,YAAY;CACjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as enums from "./enums";
2
+ import * as input from "./input";
3
+ import * as output from "./output";
4
+ export { enums, input, output, };
package/types/index.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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.output = exports.input = exports.enums = void 0;
6
+ // Export sub-modules:
7
+ const enums = require("./enums");
8
+ exports.enums = enums;
9
+ const input = require("./input");
10
+ exports.input = input;
11
+ const output = require("./output");
12
+ exports.output = output;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,sBAAsB;AACtB,iCAAiC;AAK7B,sBAAK;AAJT,iCAAiC;AAK7B,sBAAK;AAJT,mCAAmC;AAK/B,wBAAM"}
@@ -0,0 +1 @@
1
+ export {};
package/types/input.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF"}
@@ -1,4 +1,8 @@
1
+ import * as pulumi from "@pulumi/pulumi";
1
2
  export declare function getEnv(...vars: string[]): string | undefined;
2
3
  export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
3
4
  export declare function getEnvNumber(...vars: string[]): number | undefined;
4
5
  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,8 +1,18 @@
1
1
  "use strict";
2
- // *** WARNING: this file was generated by pulumi. ***
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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
+ };
4
13
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
14
+ exports.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
15
+ const runtime = require("@pulumi/pulumi/runtime");
6
16
  function getEnv(...vars) {
7
17
  for (const v of vars) {
8
18
  const value = process.env[v];
@@ -66,4 +76,26 @@ function lazyLoad(exports, props, loadModule) {
66
76
  }
67
77
  }
68
78
  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;
69
101
  //# sourceMapp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