@pulumi/tls 5.0.0-alpha.0 → 5.0.0-alpha.1781597234

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/certRequest.d.ts +30 -32
  2. package/certRequest.d.ts.map +1 -0
  3. package/certRequest.js +55 -21
  4. package/certRequest.js.map +1 -1
  5. package/config/index.d.ts +1 -0
  6. package/config/index.d.ts.map +1 -0
  7. package/config/index.js +1 -1
  8. package/config/index.js.map +1 -1
  9. package/config/vars.d.ts +1 -0
  10. package/config/vars.d.ts.map +1 -0
  11. package/config/vars.js +25 -2
  12. package/config/vars.js.map +1 -1
  13. package/getCertificate.d.ts +93 -4
  14. package/getCertificate.d.ts.map +1 -0
  15. package/getCertificate.js +121 -4
  16. package/getCertificate.js.map +1 -1
  17. package/getPublicKey.d.ts +28 -13
  18. package/getPublicKey.d.ts.map +1 -0
  19. package/getPublicKey.js +50 -14
  20. package/getPublicKey.js.map +1 -1
  21. package/index.d.ts +2 -3
  22. package/index.d.ts.map +1 -0
  23. package/index.js +35 -9
  24. package/index.js.map +1 -1
  25. package/locallySignedCert.d.ts +83 -41
  26. package/locallySignedCert.d.ts.map +1 -0
  27. package/locallySignedCert.js +106 -32
  28. package/locallySignedCert.js.map +1 -1
  29. package/package.json +6 -6
  30. package/privateKey.d.ts +63 -36
  31. package/privateKey.d.ts.map +1 -0
  32. package/privateKey.js +89 -20
  33. package/privateKey.js.map +1 -1
  34. package/provider.d.ts +16 -1
  35. package/provider.d.ts.map +1 -0
  36. package/provider.js +38 -7
  37. package/provider.js.map +1 -1
  38. package/selfSignedCert.d.ts +94 -58
  39. package/selfSignedCert.d.ts.map +1 -0
  40. package/selfSignedCert.js +110 -36
  41. package/selfSignedCert.js.map +1 -1
  42. package/types/index.d.ts +1 -0
  43. package/types/index.d.ts.map +1 -0
  44. package/types/index.js +26 -3
  45. package/types/index.js.map +1 -1
  46. package/types/input.d.ts +43 -22
  47. package/types/input.d.ts.map +1 -0
  48. package/types/input.js +1 -1
  49. package/types/input.js.map +1 -1
  50. package/types/output.d.ts +28 -0
  51. package/types/output.d.ts.map +1 -0
  52. package/types/output.js +1 -1
  53. package/types/output.js.map +1 -1
  54. package/utilities.d.ts +1 -0
  55. package/utilities.d.ts.map +1 -0
  56. package/utilities.js +47 -2
  57. package/utilities.js.map +1 -1
  58. package/package.json.bak +0 -27
  59. package/package.json.dev +0 -27
  60. package/scripts/install-pulumi-plugin.js +0 -21
package/certRequest.d.ts CHANGED
@@ -2,15 +2,26 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
4
  /**
5
+ * Creates a Certificate Signing Request (CSR) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
6
+ *
7
+ * PEM is the typical format used to request a certificate from a Certificate Authority (CA).
8
+ *
9
+ * This resource is intended to be used in conjunction with a Terraform provider for a particular certificate authority in order to provision a new certificate.
10
+ *
11
+ * This is a *logical resource*, so it contributes only to the current Terraform
12
+ * state and does not create any external managed resources.
13
+ *
5
14
  * ## Example Usage
6
15
  *
7
16
  * ```typescript
8
17
  * import * as pulumi from "@pulumi/pulumi";
9
- * import * as fs from "fs";
18
+ * import * as std from "@pulumi/std";
10
19
  * import * as tls from "@pulumi/tls";
11
20
  *
12
21
  * const example = new tls.CertRequest("example", {
13
- * privateKeyPem: fs.readFileSync("private_key.pem"),
22
+ * privateKeyPem: std.file({
23
+ * input: "private_key.pem",
24
+ * }).then(invoke => invoke.result),
14
25
  * subject: {
15
26
  * commonName: "example.com",
16
27
  * organization: "ACME Examples, Inc",
@@ -35,11 +46,7 @@ export declare class CertRequest extends pulumi.CustomResource {
35
46
  */
36
47
  static isInstance(obj: any): obj is CertRequest;
37
48
  /**
38
- * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
39
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
40
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
41
- * the end of the PEM. In case this disrupts your use case, we recommend using
42
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
49
+ * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
43
50
  */
44
51
  readonly certRequestPem: pulumi.Output<string>;
45
52
  /**
@@ -55,9 +62,7 @@ export declare class CertRequest extends pulumi.CustomResource {
55
62
  */
56
63
  readonly keyAlgorithm: pulumi.Output<string>;
57
64
  /**
58
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
59
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
60
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
65
+ * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
61
66
  */
62
67
  readonly privateKeyPem: pulumi.Output<string>;
63
68
  /**
@@ -82,39 +87,33 @@ export declare class CertRequest extends pulumi.CustomResource {
82
87
  */
83
88
  export interface CertRequestState {
84
89
  /**
85
- * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the
86
- * [underlying](https://pkg.go.dev/encoding/pem#Encode)
87
- * [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at
88
- * the end of the PEM. In case this disrupts your use case, we recommend using
89
- * [`trimspace()`](https://www.terraform.io/language/functions/trimspace).
90
+ * The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`.
90
91
  */
91
- certRequestPem?: pulumi.Input<string>;
92
+ certRequestPem?: pulumi.Input<string | undefined>;
92
93
  /**
93
94
  * List of DNS names for which a certificate is being requested (i.e. certificate subjects).
94
95
  */
95
- dnsNames?: pulumi.Input<pulumi.Input<string>[]>;
96
+ dnsNames?: pulumi.Input<pulumi.Input<string>[] | undefined>;
96
97
  /**
97
98
  * List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
98
99
  */
99
- ipAddresses?: pulumi.Input<pulumi.Input<string>[]>;
100
+ ipAddresses?: pulumi.Input<pulumi.Input<string>[] | undefined>;
100
101
  /**
101
102
  * Name of the algorithm used when generating the private key provided in `privateKeyPem`.
102
103
  */
103
- keyAlgorithm?: pulumi.Input<string>;
104
+ keyAlgorithm?: pulumi.Input<string | undefined>;
104
105
  /**
105
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
106
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
107
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
106
+ * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
108
107
  */
109
- privateKeyPem?: pulumi.Input<string>;
108
+ privateKeyPem?: pulumi.Input<string | undefined>;
110
109
  /**
111
110
  * The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
112
111
  */
113
- subject?: pulumi.Input<inputs.CertRequestSubject>;
112
+ subject?: pulumi.Input<inputs.CertRequestSubject | undefined>;
114
113
  /**
115
114
  * List of URIs for which a certificate is being requested (i.e. certificate subjects).
116
115
  */
117
- uris?: pulumi.Input<pulumi.Input<string>[]>;
116
+ uris?: pulumi.Input<pulumi.Input<string>[] | undefined>;
118
117
  }
119
118
  /**
120
119
  * The set of arguments for constructing a CertRequest resource.
@@ -123,23 +122,22 @@ export interface CertRequestArgs {
123
122
  /**
124
123
  * List of DNS names for which a certificate is being requested (i.e. certificate subjects).
125
124
  */
126
- dnsNames?: pulumi.Input<pulumi.Input<string>[]>;
125
+ dnsNames?: pulumi.Input<pulumi.Input<string>[] | undefined>;
127
126
  /**
128
127
  * List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
129
128
  */
130
- ipAddresses?: pulumi.Input<pulumi.Input<string>[]>;
129
+ ipAddresses?: pulumi.Input<pulumi.Input<string>[] | undefined>;
131
130
  /**
132
- * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
133
- * to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
134
- * interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
131
+ * Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong to. This can be read from a separate file using the `file` interpolation function.
135
132
  */
136
133
  privateKeyPem: pulumi.Input<string>;
137
134
  /**
138
135
  * The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
139
136
  */
140
- subject?: pulumi.Input<inputs.CertRequestSubject>;
137
+ subject?: pulumi.Input<inputs.CertRequestSubject | undefined>;
141
138
  /**
142
139
  * List of URIs for which a certificate is being requested (i.e. certificate subjects).
143
140
  */
144
- uris?: pulumi.Input<pulumi.Input<string>[]>;
141
+ uris?: pulumi.Input<pulumi.Input<string>[] | undefined>;
145
142
  }
143
+ //# sourceMappingURL=certRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certRequest.d.ts","sourceRoot":"","sources":["../certRequest.ts"],"names":[],"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CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;CAC3D"}
package/certRequest.js CHANGED
@@ -1,20 +1,54 @@
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-language-nodejs. ***
3
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
4
27
  Object.defineProperty(exports, "__esModule", { value: true });
5
28
  exports.CertRequest = void 0;
6
- const pulumi = require("@pulumi/pulumi");
7
- const utilities = require("./utilities");
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
8
31
  /**
32
+ * Creates a Certificate Signing Request (CSR) in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
33
+ *
34
+ * PEM is the typical format used to request a certificate from a Certificate Authority (CA).
35
+ *
36
+ * This resource is intended to be used in conjunction with a Terraform provider for a particular certificate authority in order to provision a new certificate.
37
+ *
38
+ * This is a *logical resource*, so it contributes only to the current Terraform
39
+ * state and does not create any external managed resources.
40
+ *
9
41
  * ## Example Usage
10
42
  *
11
43
  * ```typescript
12
44
  * import * as pulumi from "@pulumi/pulumi";
13
- * import * as fs from "fs";
45
+ * import * as std from "@pulumi/std";
14
46
  * import * as tls from "@pulumi/tls";
15
47
  *
16
48
  * const example = new tls.CertRequest("example", {
17
- * privateKeyPem: fs.readFileSync("private_key.pem"),
49
+ * privateKeyPem: std.file({
50
+ * input: "private_key.pem",
51
+ * }).then(invoke => invoke.result),
18
52
  * subject: {
19
53
  * commonName: "example.com",
20
54
  * organization: "ACME Examples, Inc",
@@ -33,8 +67,10 @@ class CertRequest extends pulumi.CustomResource {
33
67
  * @param opts Optional settings to control the behavior of the CustomResource.
34
68
  */
35
69
  static get(name, id, state, opts) {
36
- return new CertRequest(name, state, Object.assign(Object.assign({}, opts), { id: id }));
70
+ return new CertRequest(name, state, { ...opts, id: id });
37
71
  }
72
+ /** @internal */
73
+ static __pulumiType = 'tls:index/certRequest:CertRequest';
38
74
  /**
39
75
  * Returns true if the given object is an instance of CertRequest. This is designed to work even
40
76
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
@@ -50,24 +86,24 @@ class CertRequest extends pulumi.CustomResource {
50
86
  opts = opts || {};
51
87
  if (opts.id) {
52
88
  const state = argsOrState;
53
- resourceInputs["certRequestPem"] = state ? state.certRequestPem : undefined;
54
- resourceInputs["dnsNames"] = state ? state.dnsNames : undefined;
55
- resourceInputs["ipAddresses"] = state ? state.ipAddresses : undefined;
56
- resourceInputs["keyAlgorithm"] = state ? state.keyAlgorithm : undefined;
57
- resourceInputs["privateKeyPem"] = state ? state.privateKeyPem : undefined;
58
- resourceInputs["subject"] = state ? state.subject : undefined;
59
- resourceInputs["uris"] = state ? state.uris : undefined;
89
+ resourceInputs["certRequestPem"] = state?.certRequestPem;
90
+ resourceInputs["dnsNames"] = state?.dnsNames;
91
+ resourceInputs["ipAddresses"] = state?.ipAddresses;
92
+ resourceInputs["keyAlgorithm"] = state?.keyAlgorithm;
93
+ resourceInputs["privateKeyPem"] = state?.privateKeyPem;
94
+ resourceInputs["subject"] = state?.subject;
95
+ resourceInputs["uris"] = state?.uris;
60
96
  }
61
97
  else {
62
98
  const args = argsOrState;
63
- if ((!args || args.privateKeyPem === undefined) && !opts.urn) {
99
+ if (args?.privateKeyPem === undefined && !opts.urn) {
64
100
  throw new Error("Missing required property 'privateKeyPem'");
65
101
  }
66
- resourceInputs["dnsNames"] = args ? args.dnsNames : undefined;
67
- resourceInputs["ipAddresses"] = args ? args.ipAddresses : undefined;
68
- resourceInputs["privateKeyPem"] = (args === null || args === void 0 ? void 0 : args.privateKeyPem) ? pulumi.secret(args.privateKeyPem) : undefined;
69
- resourceInputs["subject"] = args ? args.subject : undefined;
70
- resourceInputs["uris"] = args ? args.uris : undefined;
102
+ resourceInputs["dnsNames"] = args?.dnsNames;
103
+ resourceInputs["ipAddresses"] = args?.ipAddresses;
104
+ resourceInputs["privateKeyPem"] = args?.privateKeyPem ? pulumi.secret(args.privateKeyPem) : undefined;
105
+ resourceInputs["subject"] = args?.subject;
106
+ resourceInputs["uris"] = args?.uris;
71
107
  resourceInputs["certRequestPem"] = undefined /*out*/;
72
108
  resourceInputs["keyAlgorithm"] = undefined /*out*/;
73
109
  }
@@ -78,6 +114,4 @@ class CertRequest extends pulumi.CustomResource {
78
114
  }
79
115
  }
80
116
  exports.CertRequest = CertRequest;
81
- /** @internal */
82
- CertRequest.__pulumiType = 'tls:index/certRequest:CertRequest';
83
117
  //# sourceMappingURL=certRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"certRequest.js","sourceRoot":"","sources":["../certRequest.ts"],"names":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AC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACtD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;QAClE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AA9FL,kCA+FC"}
package/config/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./vars";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
package/config/index.js CHANGED
@@ -1,5 +1,5 @@
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-language-nodejs. ***
3
3
  // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
package/config/vars.d.ts CHANGED
@@ -3,3 +3,4 @@ import * as outputs from "../types/output";
3
3
  * Proxy used by resources and data sources that connect to external endpoints.
4
4
  */
5
5
  export declare const proxy: outputs.config.Proxy | undefined;
6
+ //# sourceMappingURL=vars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAM3C;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC"}
package/config/vars.js CHANGED
@@ -1,8 +1,31 @@
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-language-nodejs. ***
3
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
4
27
  Object.defineProperty(exports, "__esModule", { value: true });
5
- const pulumi = require("@pulumi/pulumi");
28
+ const pulumi = __importStar(require("@pulumi/pulumi"));
6
29
  const __config = new pulumi.Config("tls");
7
30
  Object.defineProperty(exports, "proxy", {
8
31
  get() {
@@ -1 +1 @@
1
- {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AAMzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAM1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAuB,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
1
+ {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAMzC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAM1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE;IACpC,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAuB,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
@@ -1,5 +1,49 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import * as outputs from "./types/output";
3
+ /**
4
+ * Get information about the TLS certificates securing a host.
5
+ *
6
+ * Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that protects a URL.
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ### URL Usage
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as aws from "@pulumi/aws";
14
+ * import * as tls from "@pulumi/tls";
15
+ *
16
+ * const exampleEksCluster = new aws.index.EksCluster("example", {name: "example"});
17
+ * const example = tls.getCertificate({
18
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
19
+ * });
20
+ * const exampleIamOpenidConnectProvider = new aws.index.IamOpenidConnectProvider("example", {
21
+ * clientIdList: ["sts.amazonaws.com"],
22
+ * thumbprintList: [example.certificates?.[0]?.sha1Fingerprint],
23
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
24
+ * });
25
+ * ```
26
+ *
27
+ * ### Content Usage
28
+ * ```typescript
29
+ * import * as pulumi from "@pulumi/pulumi";
30
+ * import * as std from "@pulumi/std";
31
+ * import * as tls from "@pulumi/tls";
32
+ *
33
+ * const exampleContent = std.file({
34
+ * input: "example.pem",
35
+ * }).then(invoke => tls.getCertificate({
36
+ * content: invoke.result,
37
+ * }));
38
+ * ```
39
+ *
40
+ * <!--
41
+ * Schema ORIGINALLY generated by tfplugindocs,
42
+ * then manually tweaked to circumvent current limitations.
43
+ *
44
+ * This should be revisited, once https://github.com/hashicorp/terraform-plugin-docs/issues/66 is resolved.
45
+ * -->
46
+ */
3
47
  export declare function getCertificate(args?: GetCertificateArgs, opts?: pulumi.InvokeOptions): Promise<GetCertificateResult>;
4
48
  /**
5
49
  * A collection of arguments for invoking getCertificate.
@@ -43,7 +87,51 @@ export interface GetCertificateResult {
43
87
  */
44
88
  readonly verifyChain?: boolean;
45
89
  }
46
- export declare function getCertificateOutput(args?: GetCertificateOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetCertificateResult>;
90
+ /**
91
+ * Get information about the TLS certificates securing a host.
92
+ *
93
+ * Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that protects a URL.
94
+ *
95
+ * ## Example Usage
96
+ *
97
+ * ### URL Usage
98
+ * ```typescript
99
+ * import * as pulumi from "@pulumi/pulumi";
100
+ * import * as aws from "@pulumi/aws";
101
+ * import * as tls from "@pulumi/tls";
102
+ *
103
+ * const exampleEksCluster = new aws.index.EksCluster("example", {name: "example"});
104
+ * const example = tls.getCertificate({
105
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
106
+ * });
107
+ * const exampleIamOpenidConnectProvider = new aws.index.IamOpenidConnectProvider("example", {
108
+ * clientIdList: ["sts.amazonaws.com"],
109
+ * thumbprintList: [example.certificates?.[0]?.sha1Fingerprint],
110
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
111
+ * });
112
+ * ```
113
+ *
114
+ * ### Content Usage
115
+ * ```typescript
116
+ * import * as pulumi from "@pulumi/pulumi";
117
+ * import * as std from "@pulumi/std";
118
+ * import * as tls from "@pulumi/tls";
119
+ *
120
+ * const exampleContent = std.file({
121
+ * input: "example.pem",
122
+ * }).then(invoke => tls.getCertificate({
123
+ * content: invoke.result,
124
+ * }));
125
+ * ```
126
+ *
127
+ * <!--
128
+ * Schema ORIGINALLY generated by tfplugindocs,
129
+ * then manually tweaked to circumvent current limitations.
130
+ *
131
+ * This should be revisited, once https://github.com/hashicorp/terraform-plugin-docs/issues/66 is resolved.
132
+ * -->
133
+ */
134
+ export declare function getCertificateOutput(args?: GetCertificateOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCertificateResult>;
47
135
  /**
48
136
  * A collection of arguments for invoking getCertificate.
49
137
  */
@@ -51,13 +139,14 @@ export interface GetCertificateOutputArgs {
51
139
  /**
52
140
  * The content of the certificate in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. Cannot be used with `url`.
53
141
  */
54
- content?: pulumi.Input<string>;
142
+ content?: pulumi.Input<string | undefined>;
55
143
  /**
56
144
  * The URL of the website to get the certificates from. Cannot be used with `content`.
57
145
  */
58
- url?: pulumi.Input<string>;
146
+ url?: pulumi.Input<string | undefined>;
59
147
  /**
60
148
  * Whether to verify the certificate chain while parsing it or not (default: `true`). Cannot be used with `content`.
61
149
  */
62
- verifyChain?: pulumi.Input<boolean>;
150
+ verifyChain?: pulumi.Input<boolean | undefined>;
63
151
  }
152
+ //# sourceMappingURL=getCertificate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"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C;IAC3C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACnD"}
package/getCertificate.js CHANGED
@@ -1,10 +1,77 @@
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-language-nodejs. ***
3
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
4
27
  Object.defineProperty(exports, "__esModule", { value: true });
5
28
  exports.getCertificateOutput = exports.getCertificate = void 0;
6
- const pulumi = require("@pulumi/pulumi");
7
- const utilities = require("./utilities");
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * Get information about the TLS certificates securing a host.
33
+ *
34
+ * Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that protects a URL.
35
+ *
36
+ * ## Example Usage
37
+ *
38
+ * ### URL Usage
39
+ * ```typescript
40
+ * import * as pulumi from "@pulumi/pulumi";
41
+ * import * as aws from "@pulumi/aws";
42
+ * import * as tls from "@pulumi/tls";
43
+ *
44
+ * const exampleEksCluster = new aws.index.EksCluster("example", {name: "example"});
45
+ * const example = tls.getCertificate({
46
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
47
+ * });
48
+ * const exampleIamOpenidConnectProvider = new aws.index.IamOpenidConnectProvider("example", {
49
+ * clientIdList: ["sts.amazonaws.com"],
50
+ * thumbprintList: [example.certificates?.[0]?.sha1Fingerprint],
51
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
52
+ * });
53
+ * ```
54
+ *
55
+ * ### Content Usage
56
+ * ```typescript
57
+ * import * as pulumi from "@pulumi/pulumi";
58
+ * import * as std from "@pulumi/std";
59
+ * import * as tls from "@pulumi/tls";
60
+ *
61
+ * const exampleContent = std.file({
62
+ * input: "example.pem",
63
+ * }).then(invoke => tls.getCertificate({
64
+ * content: invoke.result,
65
+ * }));
66
+ * ```
67
+ *
68
+ * <!--
69
+ * Schema ORIGINALLY generated by tfplugindocs,
70
+ * then manually tweaked to circumvent current limitations.
71
+ *
72
+ * This should be revisited, once https://github.com/hashicorp/terraform-plugin-docs/issues/66 is resolved.
73
+ * -->
74
+ */
8
75
  function getCertificate(args, opts) {
9
76
  args = args || {};
10
77
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
@@ -15,8 +82,58 @@ function getCertificate(args, opts) {
15
82
  }, opts);
16
83
  }
17
84
  exports.getCertificate = getCertificate;
85
+ /**
86
+ * Get information about the TLS certificates securing a host.
87
+ *
88
+ * Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that protects a URL.
89
+ *
90
+ * ## Example Usage
91
+ *
92
+ * ### URL Usage
93
+ * ```typescript
94
+ * import * as pulumi from "@pulumi/pulumi";
95
+ * import * as aws from "@pulumi/aws";
96
+ * import * as tls from "@pulumi/tls";
97
+ *
98
+ * const exampleEksCluster = new aws.index.EksCluster("example", {name: "example"});
99
+ * const example = tls.getCertificate({
100
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
101
+ * });
102
+ * const exampleIamOpenidConnectProvider = new aws.index.IamOpenidConnectProvider("example", {
103
+ * clientIdList: ["sts.amazonaws.com"],
104
+ * thumbprintList: [example.certificates?.[0]?.sha1Fingerprint],
105
+ * url: exampleEksCluster.identity[0].oidc[0].issuer,
106
+ * });
107
+ * ```
108
+ *
109
+ * ### Content Usage
110
+ * ```typescript
111
+ * import * as pulumi from "@pulumi/pulumi";
112
+ * import * as std from "@pulumi/std";
113
+ * import * as tls from "@pulumi/tls";
114
+ *
115
+ * const exampleContent = std.file({
116
+ * input: "example.pem",
117
+ * }).then(invoke => tls.getCertificate({
118
+ * content: invoke.result,
119
+ * }));
120
+ * ```
121
+ *
122
+ * <!--
123
+ * Schema ORIGINALLY generated by tfplugindocs,
124
+ * then manually tweaked to circumvent current limitations.
125
+ *
126
+ * This should be revisited, once https://github.com/hashicorp/terraform-plugin-docs/issues/66 is resolved.
127
+ * -->
128
+ */
18
129
  function getCertificateOutput(args, opts) {
19
- return pulumi.output(args).apply((a) => getCertificate(a, opts));
130
+ args = args || {};
131
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
132
+ return pulumi.runtime.invokeOutput("tls:index/getCertificate:getCertificate", {
133
+ "content": args.content,
134
+ "url": args.url,
135
+ "verifyChain": args.verifyChain,
136
+ }, opts);
20
137
  }
21
138
  exports.getCertificateOutput = getCertificateOutput;
22
139
  //# sourceMappingURL=getCertificate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCertificate.js","sourceRoot":"","sources":["../getCertificate.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,S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