@pulumi/terraform 5.14.0-alpha.1724152687 → 6.1.0-alpha.1745017390
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 +5 -99
- package/index.d.ts +6 -2
- package/index.js +21 -16
- package/index.js.map +1 -0
- package/package.json +12 -10
- package/package.json.dev +25 -23
- package/provider.d.ts +21 -0
- package/provider.js +38 -0
- package/provider.js.map +1 -0
- package/state/getLocalReference.d.ts +40 -0
- package/state/getLocalReference.js +32 -0
- package/state/getLocalReference.js.map +1 -0
- package/state/getRemoteReference.d.ts +51 -0
- package/state/getRemoteReference.js +34 -0
- package/state/getRemoteReference.js.map +1 -0
- package/state/index.d.ts +6 -15
- package/state/index.js +11 -39
- package/state/index.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +23 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +2 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +8 -0
- package/utilities.js +101 -0
- package/utilities.js.map +1 -0
- package/package.json.bak +0 -25
- package/state/artifactoryBackendConfig.d.ts +0 -39
- package/state/artifactoryBackendConfig.js +0 -15
- package/state/azurermBackendConfig.d.ts +0 -85
- package/state/azurermBackendConfig.js +0 -15
- package/state/consulBackendConfig.d.ts +0 -62
- package/state/consulBackendConfig.js +0 -15
- package/state/etcdBackendConfig.d.ts +0 -32
- package/state/etcdBackendConfig.js +0 -15
- package/state/etcdV3BackendConfig.d.ts +0 -47
- package/state/etcdV3BackendConfig.js +0 -15
- package/state/gcsBackendConfig.d.ts +0 -36
- package/state/gcsBackendConfig.js +0 -15
- package/state/httpBackendConfig.d.ts +0 -51
- package/state/httpBackendConfig.js +0 -3
- package/state/localBackendConfig.d.ts +0 -16
- package/state/localBackendConfig.js +0 -15
- package/state/mantaBackendConfig.d.ts +0 -52
- package/state/mantaBackendConfig.js +0 -15
- package/state/ossBackendConfig.d.ts +0 -83
- package/state/ossBackendConfig.js +0 -15
- package/state/pgBackendConfig.d.ts +0 -23
- package/state/pgBackendConfig.js +0 -15
- package/state/remoteBackendConfig.d.ts +0 -44
- package/state/remoteBackendConfig.js +0 -15
- package/state/remoteStateReference.d.ts +0 -46
- package/state/remoteStateReference.js +0 -43
- package/state/s3BackendConfig.d.ts +0 -94
- package/state/s3BackendConfig.js +0 -15
- package/state/swiftBackendConfig.d.ts +0 -85
- package/state/swiftBackendConfig.js +0 -15
package/README.md
CHANGED
|
@@ -1,102 +1,8 @@
|
|
|
1
1
|
# Pulumi Terraform Provider
|
|
2
2
|
|
|
3
|
-
The Terraform resource provider for Pulumi lets you consume the outputs
|
|
4
|
-
|
|
5
|
-
provides a `RemoteStateReference` resource which acts like a native Pulumi
|
|
6
|
-
[`StackReference`][stackreference].
|
|
7
|
-
|
|
8
|
-
To use this package, please [install the Pulumi CLI first][pulumicli].
|
|
9
|
-
|
|
10
|
-
## Installing
|
|
11
|
-
|
|
12
|
-
### Node.js (JavaScript/TypeScript)
|
|
13
|
-
|
|
14
|
-
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
15
|
-
|
|
16
|
-
$ npm install @pulumi/terraform
|
|
17
|
-
|
|
18
|
-
or `yarn`:
|
|
19
|
-
|
|
20
|
-
$ yarn add @pulumi/terraform
|
|
21
|
-
|
|
22
|
-
### Python
|
|
23
|
-
|
|
24
|
-
To use from Python, install using `pip`:
|
|
25
|
-
|
|
26
|
-
$ pip install pulumi-terraform
|
|
27
|
-
|
|
28
|
-
## Concepts
|
|
29
|
-
|
|
30
|
-
The `@pulumi/terraform` package provides a [resource](https://www.pulumi.com/docs/concepts/resources/) named `RemoteStateReference`
|
|
31
|
-
which is used to read outputs from a Terraform state file stored in one of the supported
|
|
32
|
-
Terraform remote state backends.
|
|
33
|
-
|
|
34
|
-
## Examples
|
|
35
|
-
|
|
36
|
-
### S3
|
|
37
|
-
|
|
38
|
-
The following program will read a Terraform state file stored in S3:
|
|
39
|
-
|
|
40
|
-
```typescript
|
|
41
|
-
import * as tf from "@pulumi/terraform";
|
|
42
|
-
|
|
43
|
-
const remoteState = new tf.state.RemoteStateReference("s3state", {
|
|
44
|
-
backendType: "s3",
|
|
45
|
-
bucket: "pulumi-terraform-state-test",
|
|
46
|
-
key: "test/terraform.tfstate",
|
|
47
|
-
region: "us-west-2"
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Use the getOutput function on the resource to access root outputs
|
|
51
|
-
const vpcId= remoteState.getOutput("vpc_id");
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Local file
|
|
55
|
-
|
|
56
|
-
The following program will read a Terraform state file stored locally in the
|
|
57
|
-
filesystem:
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
import * as tf from "@pulumi/terraform";
|
|
61
|
-
|
|
62
|
-
const remotestate = new tf.state.RemoteStateReference("localstate", {
|
|
63
|
-
backendType: "local",
|
|
64
|
-
path: path.join(__dirname, "terraform.tfstate"),
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Use the getOutput function on the resource to access root outputs
|
|
68
|
-
const vpcId= remoteState.getOutput("vpc_id");
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Terraform Enterprise
|
|
72
|
-
|
|
73
|
-
For state stored in Terraform Enterprise, the authentication token must be set
|
|
74
|
-
via the Pulumi configuration system - for example, using:
|
|
75
|
-
|
|
76
|
-
pulumi config set --secret terraformEnterpriseToken <value>
|
|
77
|
-
|
|
78
|
-
The following program will read a Terraform state file stored in Terraform
|
|
79
|
-
Enterprise, using the value of `terraformEnterpriseToken` from above:
|
|
80
|
-
|
|
81
|
-
```typescript
|
|
82
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
83
|
-
import * as tf from "@pulumi/terraform";
|
|
84
|
-
|
|
85
|
-
const config = new pulumi.Config();
|
|
86
|
-
|
|
87
|
-
const ref = new tf.state.RemoteStateReference("remote", {
|
|
88
|
-
backendType: "remote",
|
|
89
|
-
organization: "pulumi",
|
|
90
|
-
token: config.requireSecret("terraformEnterpriseToken"),
|
|
91
|
-
workspaces: {
|
|
92
|
-
name: "test-state-file"
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// Use the getOutput function on the resource to access root outputs
|
|
97
|
-
const vpcId= remoteState.getOutput("vpc_id");
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
[stackreference]: https://www.pulumi.com/docs/reference/organizing-stacks-projects/#inter-stack-dependencies
|
|
101
|
-
[pulumicli]: https://pulumi.com/
|
|
3
|
+
The Terraform resource provider for Pulumi lets you consume the outputs contained in
|
|
4
|
+
Terraform state files from your Pulumi programs.
|
|
102
5
|
|
|
6
|
+
> [!IMPORTANT]
|
|
7
|
+
> For reference docs and installation instructions, please go to
|
|
8
|
+
> <https://www.pulumi.com/registry/packages/terraform/>.
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export { ProviderArgs } from "./provider";
|
|
2
|
+
export type Provider = import("./provider").Provider;
|
|
3
|
+
export declare const Provider: typeof import("./provider").Provider;
|
|
4
|
+
import * as state from "./state";
|
|
5
|
+
import * as types from "./types";
|
|
6
|
+
export { state, types, };
|
package/index.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
15
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.state = void 0;
|
|
17
|
-
|
|
18
|
-
const
|
|
5
|
+
exports.types = exports.state = exports.Provider = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
exports.Provider = null;
|
|
9
|
+
utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
|
|
10
|
+
// Export sub-modules:
|
|
11
|
+
const state = require("./state");
|
|
19
12
|
exports.state = state;
|
|
13
|
+
const types = require("./types");
|
|
14
|
+
exports.types = types;
|
|
15
|
+
pulumi.runtime.registerResourcePackage("terraform", {
|
|
16
|
+
version: utilities.getVersion(),
|
|
17
|
+
constructProvider: (name, type, urn) => {
|
|
18
|
+
if (type !== "pulumi:providers:terraform") {
|
|
19
|
+
throw new Error(`unknown provider type ${type}`);
|
|
20
|
+
}
|
|
21
|
+
return new exports.Provider(name, undefined, { urn });
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
//# 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,sEAAsE;AACtE,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;AAGvE,sBAAsB;AACtB,iCAAiC;AAI7B,sBAAK;AAHT,iCAAiC;AAI7B,sBAAK;AAET,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,WAAW,EAAE;IAChD,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,4BAA4B,EAAE;YACvC,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,26 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/terraform",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A Pulumi package for interoperating with infrastructure created with Terraform.",
|
|
5
|
-
"license": "Apache-2.0",
|
|
3
|
+
"version": "6.1.0-alpha.1745017390",
|
|
6
4
|
"keywords": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
5
|
+
"terraform",
|
|
6
|
+
"kind/native",
|
|
7
|
+
"category/utility"
|
|
9
8
|
],
|
|
10
9
|
"homepage": "https://pulumi.com",
|
|
11
10
|
"repository": "https://github.com/pulumi/pulumi-terraform",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc",
|
|
14
|
-
"install": "node scripts/install-pulumi-plugin.js resource terraform
|
|
14
|
+
"install": "node scripts/install-pulumi-plugin.js resource terraform 6.1.0-alpha.1745017390"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pulumi/pulumi": "^3.
|
|
17
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"@types/node": "^18",
|
|
21
|
+
"typescript": "^4.3.5"
|
|
22
22
|
},
|
|
23
23
|
"pulumi": {
|
|
24
|
-
"resource": true
|
|
24
|
+
"resource": true,
|
|
25
|
+
"name": "terraform",
|
|
26
|
+
"version": "6.1.0-alpha.1745017390"
|
|
25
27
|
}
|
|
26
28
|
}
|
package/package.json.dev
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
"name": "@pulumi/terraform",
|
|
3
|
+
"version": "6.1.0-alpha.1745017390",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"terraform",
|
|
6
|
+
"kind/native",
|
|
7
|
+
"category/utility"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://pulumi.com",
|
|
10
|
+
"repository": "https://github.com/pulumi/pulumi-terraform",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^18",
|
|
20
|
+
"typescript": "^4.3.5"
|
|
21
|
+
},
|
|
22
|
+
"pulumi": {
|
|
23
|
+
"resource": true,
|
|
24
|
+
"name": "terraform",
|
|
25
|
+
"version": "6.1.0-alpha.1745017390"
|
|
26
|
+
}
|
|
25
27
|
}
|
package/provider.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export declare class Provider extends pulumi.ProviderResource {
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
5
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
6
|
+
*/
|
|
7
|
+
static isInstance(obj: any): obj is Provider;
|
|
8
|
+
/**
|
|
9
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
10
|
+
*
|
|
11
|
+
* @param name The _unique_ name of the resource.
|
|
12
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
13
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
14
|
+
*/
|
|
15
|
+
constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The set of arguments for constructing a Provider resource.
|
|
19
|
+
*/
|
|
20
|
+
export interface ProviderArgs {
|
|
21
|
+
}
|
package/provider.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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.Provider = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
class Provider extends pulumi.ProviderResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
11
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
12
|
+
*/
|
|
13
|
+
static isInstance(obj) {
|
|
14
|
+
if (obj === undefined || obj === null) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create a Provider 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, args, opts) {
|
|
27
|
+
let resourceInputs = {};
|
|
28
|
+
opts = opts || {};
|
|
29
|
+
{
|
|
30
|
+
}
|
|
31
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
32
|
+
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Provider = Provider;
|
|
36
|
+
/** @internal */
|
|
37
|
+
Provider.__pulumiType = 'terraform';
|
|
38
|
+
//# sourceMappingURL=provider.js.map
|
package/provider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,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,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;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,WAAW,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Access state from the local filesystem.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getLocalReference(args?: GetLocalReferenceArgs, opts?: pulumi.InvokeOptions): Promise<GetLocalReferenceResult>;
|
|
6
|
+
export interface GetLocalReferenceArgs {
|
|
7
|
+
/**
|
|
8
|
+
* The path to the tfstate file. This defaults to "terraform.tfstate" relative to the root module by default.
|
|
9
|
+
*/
|
|
10
|
+
path?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The path to non-default workspaces.
|
|
13
|
+
*/
|
|
14
|
+
workspaceDir?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The result of fetching from a Terraform state store.
|
|
18
|
+
*/
|
|
19
|
+
export interface GetLocalReferenceResult {
|
|
20
|
+
/**
|
|
21
|
+
* The outputs displayed from Terraform state.
|
|
22
|
+
*/
|
|
23
|
+
readonly outputs: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Access state from the local filesystem.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getLocalReferenceOutput(args?: GetLocalReferenceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetLocalReferenceResult>;
|
|
31
|
+
export interface GetLocalReferenceOutputArgs {
|
|
32
|
+
/**
|
|
33
|
+
* The path to the tfstate file. This defaults to "terraform.tfstate" relative to the root module by default.
|
|
34
|
+
*/
|
|
35
|
+
path?: pulumi.Input<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The path to non-default workspaces.
|
|
38
|
+
*/
|
|
39
|
+
workspaceDir?: pulumi.Input<string>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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.getLocalReferenceOutput = exports.getLocalReference = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("../utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Access state from the local filesystem.
|
|
10
|
+
*/
|
|
11
|
+
function getLocalReference(args, opts) {
|
|
12
|
+
args = args || {};
|
|
13
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
14
|
+
return pulumi.runtime.invoke("terraform:state:getLocalReference", {
|
|
15
|
+
"path": args.path,
|
|
16
|
+
"workspaceDir": args.workspaceDir,
|
|
17
|
+
}, opts);
|
|
18
|
+
}
|
|
19
|
+
exports.getLocalReference = getLocalReference;
|
|
20
|
+
/**
|
|
21
|
+
* Access state from the local filesystem.
|
|
22
|
+
*/
|
|
23
|
+
function getLocalReferenceOutput(args, opts) {
|
|
24
|
+
args = args || {};
|
|
25
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
26
|
+
return pulumi.runtime.invokeOutput("terraform:state:getLocalReference", {
|
|
27
|
+
"path": args.path,
|
|
28
|
+
"workspaceDir": args.workspaceDir,
|
|
29
|
+
}, opts);
|
|
30
|
+
}
|
|
31
|
+
exports.getLocalReferenceOutput = getLocalReferenceOutput;
|
|
32
|
+
//# sourceMappingURL=getLocalReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLocalReference.js","sourceRoot":"","sources":["../../state/getLocalReference.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;GAEG;AACH,SAAgB,iBAAiB,CAAC,IAA4B,EAAE,IAA2B;IACvF,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,mCAAmC,EAAE;QAC9D,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,cAAc,EAAE,IAAI,CAAC,YAAY;KACpC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAPD,8CAOC;AAsBD;;GAEG;AACH,SAAgB,uBAAuB,CAAC,IAAkC,EAAE,IAAiC;IACzG,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,mCAAmC,EAAE;QACpE,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,cAAc,EAAE,IAAI,CAAC,YAAY;KACpC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAPD,0DAOC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
/**
|
|
4
|
+
* Access state from a remote backend.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getRemoteReference(args: GetRemoteReferenceArgs, opts?: pulumi.InvokeOptions): Promise<GetRemoteReferenceResult>;
|
|
7
|
+
export interface GetRemoteReferenceArgs {
|
|
8
|
+
/**
|
|
9
|
+
* The remote backend hostname to connect to.
|
|
10
|
+
*/
|
|
11
|
+
hostname?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The name of the organization containing the targeted workspace(s).
|
|
14
|
+
*/
|
|
15
|
+
organization: string;
|
|
16
|
+
/**
|
|
17
|
+
* The token used to authenticate with the remote backend.
|
|
18
|
+
*/
|
|
19
|
+
token?: string;
|
|
20
|
+
workspaces: inputs.state.Workspaces;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The result of fetching from a Terraform state store.
|
|
24
|
+
*/
|
|
25
|
+
export interface GetRemoteReferenceResult {
|
|
26
|
+
/**
|
|
27
|
+
* The outputs displayed from Terraform state.
|
|
28
|
+
*/
|
|
29
|
+
readonly outputs: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Access state from a remote backend.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getRemoteReferenceOutput(args: GetRemoteReferenceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRemoteReferenceResult>;
|
|
37
|
+
export interface GetRemoteReferenceOutputArgs {
|
|
38
|
+
/**
|
|
39
|
+
* The remote backend hostname to connect to.
|
|
40
|
+
*/
|
|
41
|
+
hostname?: pulumi.Input<string>;
|
|
42
|
+
/**
|
|
43
|
+
* The name of the organization containing the targeted workspace(s).
|
|
44
|
+
*/
|
|
45
|
+
organization: pulumi.Input<string>;
|
|
46
|
+
/**
|
|
47
|
+
* The token used to authenticate with the remote backend.
|
|
48
|
+
*/
|
|
49
|
+
token?: pulumi.Input<string>;
|
|
50
|
+
workspaces: pulumi.Input<inputs.state.WorkspacesArgs>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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.getRemoteReferenceOutput = exports.getRemoteReference = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("../utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Access state from a remote backend.
|
|
10
|
+
*/
|
|
11
|
+
function getRemoteReference(args, opts) {
|
|
12
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
13
|
+
return pulumi.runtime.invoke("terraform:state:getRemoteReference", {
|
|
14
|
+
"hostname": args.hostname,
|
|
15
|
+
"organization": args.organization,
|
|
16
|
+
"token": args.token,
|
|
17
|
+
"workspaces": args.workspaces,
|
|
18
|
+
}, opts);
|
|
19
|
+
}
|
|
20
|
+
exports.getRemoteReference = getRemoteReference;
|
|
21
|
+
/**
|
|
22
|
+
* Access state from a remote backend.
|
|
23
|
+
*/
|
|
24
|
+
function getRemoteReferenceOutput(args, opts) {
|
|
25
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
|
|
26
|
+
return pulumi.runtime.invokeOutput("terraform:state:getRemoteReference", {
|
|
27
|
+
"hostname": args.hostname,
|
|
28
|
+
"organization": args.organization,
|
|
29
|
+
"token": args.token,
|
|
30
|
+
"workspaces": args.workspaces,
|
|
31
|
+
}, opts);
|
|
32
|
+
}
|
|
33
|
+
exports.getRemoteReferenceOutput = getRemoteReferenceOutput;
|
|
34
|
+
//# sourceMappingURL=getRemoteReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRemoteReference.js","sourceRoot":"","sources":["../../state/getRemoteReference.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAA4B,EAAE,IAA2B;IACxF,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,oCAAoC,EAAE;QAC/D,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,YAAY,EAAE,IAAI,CAAC,UAAU;KAChC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,gDAQC;AA2BD;;GAEG;AACH,SAAgB,wBAAwB,CAAC,IAAkC,EAAE,IAAiC;IAC1G,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,oCAAoC,EAAE;QACrE,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,cAAc,EAAE,IAAI,CAAC,YAAY;QACjC,OAAO,EAAE,IAAI,CAAC,KAAK;QACnB,YAAY,EAAE,IAAI,CAAC,UAAU;KAChC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AARD,4DAQC"}
|
package/state/index.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export * from "./httpBackendConfig";
|
|
8
|
-
export * from "./localBackendConfig";
|
|
9
|
-
export * from "./mantaBackendConfig";
|
|
10
|
-
export * from "./remoteBackendConfig";
|
|
11
|
-
export * from "./remoteStateReference";
|
|
12
|
-
export * from "./s3BackendConfig";
|
|
13
|
-
export * from "./swiftBackendConfig";
|
|
14
|
-
export * from "./ossBackendConfig";
|
|
15
|
-
export * from "./pgBackendConfig";
|
|
1
|
+
export { GetLocalReferenceArgs, GetLocalReferenceResult, GetLocalReferenceOutputArgs } from "./getLocalReference";
|
|
2
|
+
export declare const getLocalReference: typeof import("./getLocalReference").getLocalReference;
|
|
3
|
+
export declare const getLocalReferenceOutput: typeof import("./getLocalReference").getLocalReferenceOutput;
|
|
4
|
+
export { GetRemoteReferenceArgs, GetRemoteReferenceResult, GetRemoteReferenceOutputArgs } from "./getRemoteReference";
|
|
5
|
+
export declare const getRemoteReference: typeof import("./getRemoteReference").getRemoteReference;
|
|
6
|
+
export declare const getRemoteReferenceOutput: typeof import("./getRemoteReference").getRemoteReferenceOutput;
|
package/state/index.js
CHANGED
|
@@ -1,41 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
24
|
-
};
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
25
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
__exportStar(require("./mantaBackendConfig"), exports);
|
|
36
|
-
__exportStar(require("./remoteBackendConfig"), exports);
|
|
37
|
-
__exportStar(require("./remoteStateReference"), exports);
|
|
38
|
-
__exportStar(require("./s3BackendConfig"), exports);
|
|
39
|
-
__exportStar(require("./swiftBackendConfig"), exports);
|
|
40
|
-
__exportStar(require("./ossBackendConfig"), exports);
|
|
41
|
-
__exportStar(require("./pgBackendConfig"), exports);
|
|
5
|
+
exports.getRemoteReferenceOutput = exports.getRemoteReference = exports.getLocalReferenceOutput = exports.getLocalReference = void 0;
|
|
6
|
+
const utilities = require("../utilities");
|
|
7
|
+
exports.getLocalReference = null;
|
|
8
|
+
exports.getLocalReferenceOutput = null;
|
|
9
|
+
utilities.lazyLoad(exports, ["getLocalReference", "getLocalReferenceOutput"], () => require("./getLocalReference"));
|
|
10
|
+
exports.getRemoteReference = null;
|
|
11
|
+
exports.getRemoteReferenceOutput = null;
|
|
12
|
+
utilities.lazyLoad(exports, ["getRemoteReference", "getRemoteReferenceOutput"], () => require("./getRemoteReference"));
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../state/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,0CAA0C;AAI7B,QAAA,iBAAiB,GAA2D,IAAW,CAAC;AACxF,QAAA,uBAAuB,GAAiE,IAAW,CAAC;AACjH,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,mBAAmB,EAAC,yBAAyB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAGtG,QAAA,kBAAkB,GAA6D,IAAW,CAAC;AAC3F,QAAA,wBAAwB,GAAmE,IAAW,CAAC;AACpH,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,oBAAoB,EAAC,0BAA0B,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC"}
|
package/types/index.d.ts
ADDED
package/types/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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 = void 0;
|
|
6
|
+
// Export sub-modules:
|
|
7
|
+
const input = require("./input");
|
|
8
|
+
exports.input = input;
|
|
9
|
+
const output = require("./output");
|
|
10
|
+
exports.output = output;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAIjF,sBAAsB;AACtB,iCAAiC;AAI7B,sBAAK;AAHT,mCAAmC;AAI/B,wBAAM"}
|
package/types/input.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export declare namespace state {
|
|
3
|
+
interface Workspaces {
|
|
4
|
+
/**
|
|
5
|
+
* The full name of one remote workspace. When configured, only the default workspace can be used. This option conflicts with prefix.
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
/**
|
|
9
|
+
* A prefix used in the names of one or more remote workspaces, all of which can be used with this configuration. The full workspace names are used in HCP Terraform, and the short names (minus the prefix) are used on the command line for Terraform CLI workspaces. If omitted, only the default workspace can be used. This option conflicts with name.
|
|
10
|
+
*/
|
|
11
|
+
prefix?: string;
|
|
12
|
+
}
|
|
13
|
+
interface WorkspacesArgs {
|
|
14
|
+
/**
|
|
15
|
+
* The full name of one remote workspace. When configured, only the default workspace can be used. This option conflicts with prefix.
|
|
16
|
+
*/
|
|
17
|
+
name?: pulumi.Input<string>;
|
|
18
|
+
/**
|
|
19
|
+
* A prefix used in the names of one or more remote workspaces, all of which can be used with this configuration. The full workspace names are used in HCP Terraform, and the short names (minus the prefix) are used on the command line for Terraform CLI workspaces. If omitted, only the default workspace can be used. This option conflicts with name.
|
|
20
|
+
*/
|
|
21
|
+
prefix?: pulumi.Input<string>;
|
|
22
|
+
}
|
|
23
|
+
}
|
package/types/input.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../types/input.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF"}
|
package/types/output.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
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,sEAAsE;AACtE,iFAAiF"}
|