@pulumi/tls 4.2.0-alpha.1648832596 → 4.2.0-alpha.1649280269
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/certRequest.d.ts +49 -30
- package/certRequest.js +4 -6
- package/certRequest.js.map +1 -1
- package/getCertificate.d.ts +0 -55
- package/getCertificate.js +0 -22
- package/getCertificate.js.map +1 -1
- package/getPublicKey.d.ts +20 -39
- package/getPublicKey.js +13 -6
- package/getPublicKey.js.map +1 -1
- package/locallySignedCert.d.ts +103 -65
- package/locallySignedCert.js +2 -3
- package/locallySignedCert.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +2 -2
- package/privateKey.d.ts +61 -43
- package/privateKey.js +6 -0
- package/privateKey.js.map +1 -1
- package/selfSignedCert.d.ts +112 -71
- package/selfSignedCert.js +2 -3
- package/selfSignedCert.js.map +1 -1
package/certRequest.d.ts
CHANGED
|
@@ -5,12 +5,11 @@ import { input as inputs, output as outputs } from "./types";
|
|
|
5
5
|
*
|
|
6
6
|
* ```typescript
|
|
7
7
|
* import * as pulumi from "@pulumi/pulumi";
|
|
8
|
-
* import * as fs from "fs";
|
|
9
8
|
* import * as tls from "@pulumi/tls";
|
|
9
|
+
* import * from "fs";
|
|
10
10
|
*
|
|
11
11
|
* const example = new tls.CertRequest("example", {
|
|
12
|
-
*
|
|
13
|
-
* privateKeyPem: fs.readFileSync("private_key.pem", "utf-8"),
|
|
12
|
+
* privateKeyPem: fs.readFileSync("private_key.pem"),
|
|
14
13
|
* subjects: [{
|
|
15
14
|
* commonName: "example.com",
|
|
16
15
|
* organization: "ACME Examples, Inc",
|
|
@@ -35,33 +34,41 @@ export declare class CertRequest extends pulumi.CustomResource {
|
|
|
35
34
|
*/
|
|
36
35
|
static isInstance(obj: any): obj is CertRequest;
|
|
37
36
|
/**
|
|
38
|
-
* The certificate request data in PEM format.
|
|
37
|
+
* The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
|
|
39
38
|
*/
|
|
40
39
|
readonly certRequestPem: pulumi.Output<string>;
|
|
41
40
|
/**
|
|
42
|
-
* List of DNS names for which a certificate is being requested.
|
|
41
|
+
* List of DNS names for which a certificate is being requested (i.e. certificate subjects).
|
|
43
42
|
*/
|
|
44
43
|
readonly dnsNames: pulumi.Output<string[] | undefined>;
|
|
45
44
|
/**
|
|
46
|
-
*
|
|
45
|
+
* Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource.
|
|
46
|
+
*/
|
|
47
|
+
readonly id: pulumi.Output<string>;
|
|
48
|
+
/**
|
|
49
|
+
* List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
|
|
47
50
|
*/
|
|
48
51
|
readonly ipAddresses: pulumi.Output<string[] | undefined>;
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
53
|
+
* Name of the algorithm used when generating the private key provided in `private_key_pem`. **NOTE**: this is deprecated
|
|
54
|
+
* and ignored, as the key algorithm is now inferred from the key.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated This is now ignored, as the key algorithm is inferred from the `private_key_pem`.
|
|
52
57
|
*/
|
|
53
58
|
readonly keyAlgorithm: pulumi.Output<string>;
|
|
54
59
|
/**
|
|
55
|
-
* PEM
|
|
60
|
+
* Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
|
|
61
|
+
* to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
|
|
62
|
+
* interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
|
|
56
63
|
*/
|
|
57
64
|
readonly privateKeyPem: pulumi.Output<string>;
|
|
58
65
|
/**
|
|
59
|
-
* The subject for which a certificate is being requested.
|
|
60
|
-
*
|
|
66
|
+
* The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is
|
|
67
|
+
* based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
|
|
61
68
|
*/
|
|
62
69
|
readonly subjects: pulumi.Output<outputs.CertRequestSubject[]>;
|
|
63
70
|
/**
|
|
64
|
-
* List of URIs for which a certificate is being requested.
|
|
71
|
+
* List of URIs for which a certificate is being requested (i.e. certificate subjects).
|
|
65
72
|
*/
|
|
66
73
|
readonly uris: pulumi.Output<string[] | undefined>;
|
|
67
74
|
/**
|
|
@@ -78,33 +85,41 @@ export declare class CertRequest extends pulumi.CustomResource {
|
|
|
78
85
|
*/
|
|
79
86
|
export interface CertRequestState {
|
|
80
87
|
/**
|
|
81
|
-
* The certificate request data in PEM format.
|
|
88
|
+
* The certificate request data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format.
|
|
82
89
|
*/
|
|
83
90
|
certRequestPem?: pulumi.Input<string>;
|
|
84
91
|
/**
|
|
85
|
-
* List of DNS names for which a certificate is being requested.
|
|
92
|
+
* List of DNS names for which a certificate is being requested (i.e. certificate subjects).
|
|
86
93
|
*/
|
|
87
94
|
dnsNames?: pulumi.Input<pulumi.Input<string>[]>;
|
|
88
95
|
/**
|
|
89
|
-
*
|
|
96
|
+
* Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource.
|
|
97
|
+
*/
|
|
98
|
+
id?: pulumi.Input<string>;
|
|
99
|
+
/**
|
|
100
|
+
* List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
|
|
90
101
|
*/
|
|
91
102
|
ipAddresses?: pulumi.Input<pulumi.Input<string>[]>;
|
|
92
103
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
104
|
+
* Name of the algorithm used when generating the private key provided in `private_key_pem`. **NOTE**: this is deprecated
|
|
105
|
+
* and ignored, as the key algorithm is now inferred from the key.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated This is now ignored, as the key algorithm is inferred from the `private_key_pem`.
|
|
95
108
|
*/
|
|
96
109
|
keyAlgorithm?: pulumi.Input<string>;
|
|
97
110
|
/**
|
|
98
|
-
* PEM
|
|
111
|
+
* Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
|
|
112
|
+
* to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
|
|
113
|
+
* interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
|
|
99
114
|
*/
|
|
100
115
|
privateKeyPem?: pulumi.Input<string>;
|
|
101
116
|
/**
|
|
102
|
-
* The subject for which a certificate is being requested.
|
|
103
|
-
*
|
|
117
|
+
* The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is
|
|
118
|
+
* based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
|
|
104
119
|
*/
|
|
105
120
|
subjects?: pulumi.Input<pulumi.Input<inputs.CertRequestSubject>[]>;
|
|
106
121
|
/**
|
|
107
|
-
* List of URIs for which a certificate is being requested.
|
|
122
|
+
* List of URIs for which a certificate is being requested (i.e. certificate subjects).
|
|
108
123
|
*/
|
|
109
124
|
uris?: pulumi.Input<pulumi.Input<string>[]>;
|
|
110
125
|
}
|
|
@@ -113,29 +128,33 @@ export interface CertRequestState {
|
|
|
113
128
|
*/
|
|
114
129
|
export interface CertRequestArgs {
|
|
115
130
|
/**
|
|
116
|
-
* List of DNS names for which a certificate is being requested.
|
|
131
|
+
* List of DNS names for which a certificate is being requested (i.e. certificate subjects).
|
|
117
132
|
*/
|
|
118
133
|
dnsNames?: pulumi.Input<pulumi.Input<string>[]>;
|
|
119
134
|
/**
|
|
120
|
-
* List of IP addresses for which a certificate is being requested.
|
|
135
|
+
* List of IP addresses for which a certificate is being requested (i.e. certificate subjects).
|
|
121
136
|
*/
|
|
122
137
|
ipAddresses?: pulumi.Input<pulumi.Input<string>[]>;
|
|
123
138
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
139
|
+
* Name of the algorithm used when generating the private key provided in `private_key_pem`. **NOTE**: this is deprecated
|
|
140
|
+
* and ignored, as the key algorithm is now inferred from the key.
|
|
141
|
+
*
|
|
142
|
+
* @deprecated This is now ignored, as the key algorithm is inferred from the `private_key_pem`.
|
|
126
143
|
*/
|
|
127
|
-
keyAlgorithm
|
|
144
|
+
keyAlgorithm?: pulumi.Input<string>;
|
|
128
145
|
/**
|
|
129
|
-
* PEM
|
|
146
|
+
* Private key in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format, that the certificate will belong
|
|
147
|
+
* to. This can be read from a separate file using the [`file`](https://www.terraform.io/language/functions/file)
|
|
148
|
+
* interpolation function. Only an irreversible secure hash of the private key will be stored in the Terraform state.
|
|
130
149
|
*/
|
|
131
150
|
privateKeyPem: pulumi.Input<string>;
|
|
132
151
|
/**
|
|
133
|
-
* The subject for which a certificate is being requested.
|
|
134
|
-
*
|
|
152
|
+
* The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is
|
|
153
|
+
* based upon [Issuer Distinguished Names (RFC5280)](https://tools.ietf.org/html/rfc5280#section-4.1.2.4) section.
|
|
135
154
|
*/
|
|
136
155
|
subjects: pulumi.Input<pulumi.Input<inputs.CertRequestSubject>[]>;
|
|
137
156
|
/**
|
|
138
|
-
* List of URIs for which a certificate is being requested.
|
|
157
|
+
* List of URIs for which a certificate is being requested (i.e. certificate subjects).
|
|
139
158
|
*/
|
|
140
159
|
uris?: pulumi.Input<pulumi.Input<string>[]>;
|
|
141
160
|
}
|
package/certRequest.js
CHANGED
|
@@ -10,12 +10,11 @@ const utilities = require("./utilities");
|
|
|
10
10
|
*
|
|
11
11
|
* ```typescript
|
|
12
12
|
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
-
* import * as fs from "fs";
|
|
14
13
|
* import * as tls from "@pulumi/tls";
|
|
14
|
+
* import * from "fs";
|
|
15
15
|
*
|
|
16
16
|
* const example = new tls.CertRequest("example", {
|
|
17
|
-
*
|
|
18
|
-
* privateKeyPem: fs.readFileSync("private_key.pem", "utf-8"),
|
|
17
|
+
* privateKeyPem: fs.readFileSync("private_key.pem"),
|
|
19
18
|
* subjects: [{
|
|
20
19
|
* commonName: "example.com",
|
|
21
20
|
* organization: "ACME Examples, Inc",
|
|
@@ -31,6 +30,7 @@ class CertRequest extends pulumi.CustomResource {
|
|
|
31
30
|
const state = argsOrState;
|
|
32
31
|
resourceInputs["certRequestPem"] = state ? state.certRequestPem : undefined;
|
|
33
32
|
resourceInputs["dnsNames"] = state ? state.dnsNames : undefined;
|
|
33
|
+
resourceInputs["id"] = state ? state.id : undefined;
|
|
34
34
|
resourceInputs["ipAddresses"] = state ? state.ipAddresses : undefined;
|
|
35
35
|
resourceInputs["keyAlgorithm"] = state ? state.keyAlgorithm : undefined;
|
|
36
36
|
resourceInputs["privateKeyPem"] = state ? state.privateKeyPem : undefined;
|
|
@@ -39,9 +39,6 @@ class CertRequest extends pulumi.CustomResource {
|
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
const args = argsOrState;
|
|
42
|
-
if ((!args || args.keyAlgorithm === undefined) && !opts.urn) {
|
|
43
|
-
throw new Error("Missing required property 'keyAlgorithm'");
|
|
44
|
-
}
|
|
45
42
|
if ((!args || args.privateKeyPem === undefined) && !opts.urn) {
|
|
46
43
|
throw new Error("Missing required property 'privateKeyPem'");
|
|
47
44
|
}
|
|
@@ -55,6 +52,7 @@ class CertRequest extends pulumi.CustomResource {
|
|
|
55
52
|
resourceInputs["subjects"] = args ? args.subjects : undefined;
|
|
56
53
|
resourceInputs["uris"] = args ? args.uris : undefined;
|
|
57
54
|
resourceInputs["certRequestPem"] = undefined /*out*/;
|
|
55
|
+
resourceInputs["id"] = undefined /*out*/;
|
|
58
56
|
}
|
|
59
57
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
60
58
|
super(CertRequest.__pulumiType, name, resourceInputs, opts);
|
package/certRequest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certRequest.js","sourceRoot":"","sources":["../certRequest.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF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AAS,CAAC,OAAO,CAAC;SAC5C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IA1GD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,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,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;;AA1BL,kCA4GC;AA9FG,gBAAgB;AACO,wBAAY,GAAG,mCAAmC,CAAC"}
|
package/getCertificate.d.ts
CHANGED
|
@@ -1,67 +1,18 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import { output as outputs } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that
|
|
5
|
-
* protect an HTTPS website. Note that the certificate chain isn't verified.
|
|
6
|
-
*
|
|
7
|
-
* ## Example Usage
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
-
* import * as aws from "@pulumi/aws";
|
|
12
|
-
* import * as tls from "@pulumi/tls";
|
|
13
|
-
*
|
|
14
|
-
* const exampleCluster = new aws.eks.Cluster("example", {});
|
|
15
|
-
* const exampleCertificate = exampleCluster.identities.apply(identities => tls.getCertificate({
|
|
16
|
-
* url: identities[0].oidcs[0].issuer,
|
|
17
|
-
* }));
|
|
18
|
-
* const exampleOpenIdConnectProvider = new aws.iam.OpenIdConnectProvider("example", {
|
|
19
|
-
* clientIdLists: ["sts.amazonaws.com"],
|
|
20
|
-
* thumbprintLists: [exampleCertificate.certificates[0].sha1Fingerprint],
|
|
21
|
-
* url: exampleCluster.identities[0].oidcs[0].issuer,
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
3
|
export declare function getCertificate(args: GetCertificateArgs, opts?: pulumi.InvokeOptions): Promise<GetCertificateResult>;
|
|
26
4
|
/**
|
|
27
5
|
* A collection of arguments for invoking getCertificate.
|
|
28
6
|
*/
|
|
29
7
|
export interface GetCertificateArgs {
|
|
30
|
-
/**
|
|
31
|
-
* The URL of the website to get the certificates from.
|
|
32
|
-
*/
|
|
33
8
|
url: string;
|
|
34
|
-
/**
|
|
35
|
-
* Whether to verify the certificate chain while parsing it or not
|
|
36
|
-
*/
|
|
37
9
|
verifyChain?: boolean;
|
|
38
10
|
}
|
|
39
11
|
/**
|
|
40
12
|
* A collection of values returned by getCertificate.
|
|
41
13
|
*/
|
|
42
14
|
export interface GetCertificateResult {
|
|
43
|
-
/**
|
|
44
|
-
* The certificates protecting the site, with the root of the chain first.
|
|
45
|
-
* * `certificates.#.not_after` - The time until which the certificate is invalid, as an
|
|
46
|
-
* [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp.
|
|
47
|
-
* * `certificates.#.not_before` - The time after which the certificate is valid, as an
|
|
48
|
-
* [RFC3339](https://tools.ietf.org/html/rfc3339) timestamp.
|
|
49
|
-
* * `certificates.#.is_ca` - `true` if this certificate is a ca certificate.
|
|
50
|
-
* * `certificates.#.issuer` - Who verified and signed the certificate, roughly following
|
|
51
|
-
* [RFC2253](https://tools.ietf.org/html/rfc2253).
|
|
52
|
-
* * `certificates.#.public_key_algorithm` - The algorithm used to create the certificate.
|
|
53
|
-
* * `certificates.#.serial_number` - Number that uniquely identifies the certificate with the CA's system. The `format`
|
|
54
|
-
* function can be used to convert this base 10 number into other bases, such as hex.
|
|
55
|
-
* * `certificates.#.sha1_fingerprint` - The SHA1 fingerprint of the public key of the certificate.
|
|
56
|
-
* * `certificates.#.signature_algorithm` - The algorithm used to sign the certificate.
|
|
57
|
-
* * `certificates.#.subject` - The entity the certificate belongs to, roughly following
|
|
58
|
-
* [RFC2253](https://tools.ietf.org/html/rfc2253).
|
|
59
|
-
* * `certificates.#.version` - The version the certificate is in.
|
|
60
|
-
*/
|
|
61
15
|
readonly certificates: outputs.GetCertificateCertificate[];
|
|
62
|
-
/**
|
|
63
|
-
* The provider-assigned unique ID for this managed resource.
|
|
64
|
-
*/
|
|
65
16
|
readonly id: string;
|
|
66
17
|
readonly url: string;
|
|
67
18
|
readonly verifyChain?: boolean;
|
|
@@ -71,12 +22,6 @@ export declare function getCertificateOutput(args: GetCertificateOutputArgs, opt
|
|
|
71
22
|
* A collection of arguments for invoking getCertificate.
|
|
72
23
|
*/
|
|
73
24
|
export interface GetCertificateOutputArgs {
|
|
74
|
-
/**
|
|
75
|
-
* The URL of the website to get the certificates from.
|
|
76
|
-
*/
|
|
77
25
|
url: pulumi.Input<string>;
|
|
78
|
-
/**
|
|
79
|
-
* Whether to verify the certificate chain while parsing it or not
|
|
80
|
-
*/
|
|
81
26
|
verifyChain?: pulumi.Input<boolean>;
|
|
82
27
|
}
|
package/getCertificate.js
CHANGED
|
@@ -5,28 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.getCertificateOutput = exports.getCertificate = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
-
/**
|
|
9
|
-
* Use this data source to get information, such as SHA1 fingerprint or serial number, about the TLS certificates that
|
|
10
|
-
* protect an HTTPS website. Note that the certificate chain isn't verified.
|
|
11
|
-
*
|
|
12
|
-
* ## Example Usage
|
|
13
|
-
*
|
|
14
|
-
* ```typescript
|
|
15
|
-
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
-
* import * as aws from "@pulumi/aws";
|
|
17
|
-
* import * as tls from "@pulumi/tls";
|
|
18
|
-
*
|
|
19
|
-
* const exampleCluster = new aws.eks.Cluster("example", {});
|
|
20
|
-
* const exampleCertificate = exampleCluster.identities.apply(identities => tls.getCertificate({
|
|
21
|
-
* url: identities[0].oidcs[0].issuer,
|
|
22
|
-
* }));
|
|
23
|
-
* const exampleOpenIdConnectProvider = new aws.iam.OpenIdConnectProvider("example", {
|
|
24
|
-
* clientIdLists: ["sts.amazonaws.com"],
|
|
25
|
-
* thumbprintLists: [exampleCertificate.certificates[0].sha1Fingerprint],
|
|
26
|
-
* url: exampleCluster.identities[0].oidcs[0].issuer,
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
8
|
function getCertificate(args, opts) {
|
|
31
9
|
if (!opts) {
|
|
32
10
|
opts = {};
|
package/getCertificate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCertificate.js","sourceRoot":"","sources":["../getCertificate.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"getCertificate.js","sourceRoot":"","sources":["../getCertificate.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC,SAAgB,cAAc,CAAC,IAAwB,EAAE,IAA2B;IAChF,IAAI,CAAC,IAAI,EAAE;QACP,IAAI,GAAG,EAAE,CAAA;KACZ;IAED,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,yCAAyC,EAAE;QACpE,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,aAAa,EAAE,IAAI,CAAC,WAAW;KAClC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAVD,wCAUC;AAoBD,SAAgB,oBAAoB,CAAC,IAA8B,EAAE,IAA2B;IAC5F,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAClE,CAAC;AAFD,oDAEC"}
|
package/getPublicKey.d.ts
CHANGED
|
@@ -1,70 +1,51 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Get a public key from a PEM-encoded private key.
|
|
4
|
+
*
|
|
5
|
+
* Use this data source to get the public key from a [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) or [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) formatted private key, for use in other resources.
|
|
5
6
|
*
|
|
6
7
|
* ## Example Usage
|
|
7
8
|
*
|
|
8
9
|
* ```typescript
|
|
9
10
|
* import * as pulumi from "@pulumi/pulumi";
|
|
10
|
-
* import * as fs from "fs";
|
|
11
11
|
* import * as tls from "@pulumi/tls";
|
|
12
|
+
* import * from "fs";
|
|
12
13
|
*
|
|
13
|
-
* const
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
|
|
15
|
+
* const privateKeyPem-example = tls.getPublicKeyOutput({
|
|
16
|
+
* privateKeyPem: ed25519_example.privateKeyPem,
|
|
17
|
+
* });
|
|
18
|
+
* const privateKeyOpenssh-example = tls.getPublicKey({
|
|
19
|
+
* privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
|
|
20
|
+
* });
|
|
16
21
|
* ```
|
|
17
22
|
*/
|
|
18
|
-
export declare function getPublicKey(args
|
|
23
|
+
export declare function getPublicKey(args?: GetPublicKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetPublicKeyResult>;
|
|
19
24
|
/**
|
|
20
25
|
* A collection of arguments for invoking getPublicKey.
|
|
21
26
|
*/
|
|
22
27
|
export interface GetPublicKeyArgs {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
privateKeyPem: string;
|
|
28
|
+
privateKeyOpenssh?: string;
|
|
29
|
+
privateKeyPem?: string;
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* A collection of values returned by getPublicKey.
|
|
30
33
|
*/
|
|
31
34
|
export interface GetPublicKeyResult {
|
|
32
35
|
readonly algorithm: string;
|
|
33
|
-
/**
|
|
34
|
-
* The provider-assigned unique ID for this managed resource.
|
|
35
|
-
*/
|
|
36
36
|
readonly id: string;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*/
|
|
40
|
-
readonly privateKeyPem: string;
|
|
41
|
-
/**
|
|
42
|
-
* The md5 hash of the public key data in
|
|
43
|
-
* OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the
|
|
44
|
-
* selected private key format is compatible, as per the rules for
|
|
45
|
-
* `publicKeyOpenssh`.
|
|
46
|
-
*/
|
|
37
|
+
readonly privateKeyOpenssh?: string;
|
|
38
|
+
readonly privateKeyPem?: string;
|
|
47
39
|
readonly publicKeyFingerprintMd5: string;
|
|
48
|
-
|
|
49
|
-
* The public key data in OpenSSH `authorizedKeys`
|
|
50
|
-
* format, if the selected private key format is compatible. All RSA keys
|
|
51
|
-
* are supported, and ECDSA keys with curves "P256", "P384" and "P521"
|
|
52
|
-
* are supported. This attribute is empty if an incompatible ECDSA curve
|
|
53
|
-
* is selected.
|
|
54
|
-
*/
|
|
40
|
+
readonly publicKeyFingerprintSha256: string;
|
|
55
41
|
readonly publicKeyOpenssh: string;
|
|
56
|
-
/**
|
|
57
|
-
* The public key data in PEM format.
|
|
58
|
-
*/
|
|
59
42
|
readonly publicKeyPem: string;
|
|
60
43
|
}
|
|
61
|
-
export declare function getPublicKeyOutput(args
|
|
44
|
+
export declare function getPublicKeyOutput(args?: GetPublicKeyOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetPublicKeyResult>;
|
|
62
45
|
/**
|
|
63
46
|
* A collection of arguments for invoking getPublicKey.
|
|
64
47
|
*/
|
|
65
48
|
export interface GetPublicKeyOutputArgs {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*/
|
|
69
|
-
privateKeyPem: pulumi.Input<string>;
|
|
49
|
+
privateKeyOpenssh?: pulumi.Input<string>;
|
|
50
|
+
privateKeyPem?: pulumi.Input<string>;
|
|
70
51
|
}
|
package/getPublicKey.js
CHANGED
|
@@ -6,27 +6,34 @@ exports.getPublicKeyOutput = exports.getPublicKey = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Get a public key from a PEM-encoded private key.
|
|
10
|
+
*
|
|
11
|
+
* Use this data source to get the public key from a [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) or [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) formatted private key, for use in other resources.
|
|
11
12
|
*
|
|
12
13
|
* ## Example Usage
|
|
13
14
|
*
|
|
14
15
|
* ```typescript
|
|
15
16
|
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
-
* import * as fs from "fs";
|
|
17
17
|
* import * as tls from "@pulumi/tls";
|
|
18
|
+
* import * from "fs";
|
|
18
19
|
*
|
|
19
|
-
* const
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* const ed25519_example = new tls.PrivateKey("ed25519-example", {algorithm: "ED25519"});
|
|
21
|
+
* const privateKeyPem-example = tls.getPublicKeyOutput({
|
|
22
|
+
* privateKeyPem: ed25519_example.privateKeyPem,
|
|
23
|
+
* });
|
|
24
|
+
* const privateKeyOpenssh-example = tls.getPublicKey({
|
|
25
|
+
* privateKeyOpenssh: fs.readFileSync("~/.ssh/id_rsa_rfc4716"),
|
|
26
|
+
* });
|
|
22
27
|
* ```
|
|
23
28
|
*/
|
|
24
29
|
function getPublicKey(args, opts) {
|
|
30
|
+
args = args || {};
|
|
25
31
|
if (!opts) {
|
|
26
32
|
opts = {};
|
|
27
33
|
}
|
|
28
34
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
29
35
|
return pulumi.runtime.invoke("tls:index/getPublicKey:getPublicKey", {
|
|
36
|
+
"privateKeyOpenssh": args.privateKeyOpenssh,
|
|
30
37
|
"privateKeyPem": args.privateKeyPem,
|
|
31
38
|
}, opts);
|
|
32
39
|
}
|
package/getPublicKey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPublicKey.js","sourceRoot":"","sources":["../getPublicKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"getPublicKey.js","sourceRoot":"","sources":["../getPublicKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,YAAY,CAAC,IAAuB,EAAE,IAA2B;IAC7E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAClB,IAAI,CAAC,IAAI,EAAE;QACP,IAAI,GAAG,EAAE,CAAA;KACZ;IAED,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,mBAAmB,EAAE,IAAI,CAAC,iBAAiB;QAC3C,eAAe,EAAE,IAAI,CAAC,aAAa;KACtC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAXD,oCAWC;AAwBD,SAAgB,kBAAkB,CAAC,IAA6B,EAAE,IAA2B;IACzF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,gDAEC"}
|