@pulumi/venafi 1.2.0-alpha.1632761760

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/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ [![Actions Status](https://github.com/pulumi/pulumi-venafi/workflows/master/badge.svg)](https://github.com/pulumi/pulumi-venafi/actions)
2
+ [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com)
3
+ [![NPM version](https://badge.fury.io/js/%40pulumi%2Fvenafi.svg)](https://www.npmjs.com/package/@pulumi/venafi)
4
+ [![Python version](https://badge.fury.io/py/pulumi-venafi.svg)](https://pypi.org/project/pulumi-venafi)
5
+ [![NuGet version](https://badge.fury.io/nu/pulumi.venafi.svg)](https://badge.fury.io/nu/pulumi.venafi)
6
+ [![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-venafi/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-venafi/sdk/go)
7
+ [![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-venafi/blob/master/LICENSE)
8
+
9
+ # Venafi Resource Provider
10
+
11
+ The Venafi Resource Provider lets you manage Venafi resources.
12
+
13
+ ## Installing
14
+
15
+ This package is available in many languages in the standard packaging formats.
16
+
17
+ ### Node.js (Java/TypeScript)
18
+
19
+ To use from JavaScript or TypeScript in Node.js, install using either `npm`:
20
+
21
+ $ npm install @pulumi/venafi
22
+
23
+ or `yarn`:
24
+
25
+ $ yarn add @pulumi/venafi
26
+
27
+ ### Python
28
+
29
+ To use from Python, install using `pip`:
30
+
31
+ $ pip install pulumi_venafi
32
+
33
+ ### Go
34
+
35
+ To use from Go, use `go get` to grab the latest version of the library
36
+
37
+ $ go get github.com/pulumi/pulumi-venafi/sdk/go/...
38
+
39
+ ### .NET
40
+
41
+ To use from .NET, install using `dotnet add package`:
42
+
43
+ $ dotnet add package Pulumi.Venafi
44
+
45
+ ## Configuration
46
+
47
+ The following configuration points are available:
48
+
49
+ - `venafi:zone` - (Optional) Zone ID for Venafi Cloud or policy folder for Venafi Platform.
50
+ It can also be sourced from the `VENAFI_ZONE` environment variable.
51
+ - `venafi:url` - (Optional) Venafi URL (e.g. `https://tpp.venafi.example`). It can also be sourced
52
+ from the `VENAFI_URL` environment variable.
53
+ - `venafi:accessToken` - (Optional) authentication token for the API Application
54
+ (applies only to Venafi Platform). It can also be sourced from the `VENAFI_TOKEN` environment variable.
55
+ - `venafi:apiKey` - (Optional) REST API key for authentication (applies only to Venafi Cloud).
56
+ It can also be sourced from the `VENAFI_API` environment variable.
57
+ - `venafi:tppUsername` - (Optional) WebSDK account username for authentication (applies only to Venafi Platform).
58
+ It can also be sourced from the `VENAFI_USER` environment variable.
59
+ - `venafi:tppPassword` - (Optional) WebSDK account password for authentication (applies only to Venafi Platform).
60
+ It can also be sourced from the `VENAFI_PASS` environment variable.
61
+ - `venafi:trustBundle` - (Optional) PEM trust bundle for Venafi Platform server certificate.
62
+ - `venafi:devMode` - (Optional) When `true` will test the provider without connecting to Venafi Platform or Venafi Cloud.
63
+ It can also be sourced from the `VENAFI_DEVMODE` environment variable.
64
+
65
+ ## Reference
66
+
67
+ For further information, please visit [the Venafi provider docs](https://www.pulumi.com/docs/intro/cloud-providers/venafi)
68
+ or for detailed reference documentation, please visit [the API docs](https://www.pulumi.com/docs/reference/pkg/venafi).
@@ -0,0 +1,295 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Provides access to TLS key and certificate data enrolled using Venafi. This can be used to define a
4
+ * certificate.
5
+ *
6
+ * The `venafi.Certificate` resource handles certificate renewals as long as a
7
+ * `pulumi up` is run within the `expirationWindow` period. Keep in mind that the
8
+ * `expirationWindow` in the provider configuration needs to align with the renewal
9
+ * window of the issuing CA to achieve the desired result.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as venafi from "@pulumi/venafi";
16
+ *
17
+ * const webserver = new venafi.Certificate("webserver", {
18
+ * algorithm: "RSA",
19
+ * commonName: "web.venafi.example",
20
+ * customFields: {
21
+ * "Cost Center": "AB1234",
22
+ * Environment: "UAT|Staging",
23
+ * },
24
+ * keyPassword: var_pk_pass,
25
+ * rsaBits: 2048,
26
+ * sanDns: [
27
+ * "web01.venafi.example",
28
+ * "web02.venafi.example",
29
+ * ],
30
+ * });
31
+ * ```
32
+ */
33
+ export declare class Certificate extends pulumi.CustomResource {
34
+ /**
35
+ * Get an existing Certificate resource's state with the given name, ID, and optional extra
36
+ * properties used to qualify the lookup.
37
+ *
38
+ * @param name The _unique_ name of the resulting resource.
39
+ * @param id The _unique_ provider ID of the resource to lookup.
40
+ * @param state Any extra arguments used during the lookup.
41
+ * @param opts Optional settings to control the behavior of the CustomResource.
42
+ */
43
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CertificateState, opts?: pulumi.CustomResourceOptions): Certificate;
44
+ /**
45
+ * Returns true if the given object is an instance of Certificate. This is designed to work even
46
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
47
+ */
48
+ static isInstance(obj: any): obj is Certificate;
49
+ /**
50
+ * Key encryption algorithm, either `RSA` or `ECDSA`.
51
+ * Defaults to `RSA`.
52
+ */
53
+ readonly algorithm: pulumi.Output<string | undefined>;
54
+ /**
55
+ * The X509 certificate in PEM format.
56
+ */
57
+ readonly certificate: pulumi.Output<string>;
58
+ readonly certificateDn: pulumi.Output<string>;
59
+ /**
60
+ * The trust chain of X509 certificate authority certificates in PEM format
61
+ * concatenated together.
62
+ */
63
+ readonly chain: pulumi.Output<string>;
64
+ /**
65
+ * The common name of the certificate.
66
+ */
67
+ readonly commonName: pulumi.Output<string>;
68
+ readonly csrPem: pulumi.Output<string>;
69
+ /**
70
+ * Collection of Custom Field name-value pairs to
71
+ * assign to the certificate.
72
+ */
73
+ readonly customFields: pulumi.Output<{
74
+ [key: string]: string;
75
+ } | undefined>;
76
+ /**
77
+ * ECDSA curve to use when generating a key
78
+ */
79
+ readonly ecdsaCurve: pulumi.Output<string | undefined>;
80
+ /**
81
+ * Number of hours before certificate expiry
82
+ * to request a new certificate.
83
+ */
84
+ readonly expirationWindow: pulumi.Output<number | undefined>;
85
+ /**
86
+ * Used with validDays to indicate the target
87
+ * issuer when using Trust Protection Platform. Relevant values are: "DigiCert",
88
+ * "Entrust", and "Microsoft".
89
+ */
90
+ readonly issuerHint: pulumi.Output<string | undefined>;
91
+ /**
92
+ * The password used to encrypt the private key.
93
+ */
94
+ readonly keyPassword: pulumi.Output<string | undefined>;
95
+ /**
96
+ * A base64-encoded PKCS#12 keystore secured by the `keyPassword`.
97
+ */
98
+ readonly pkcs12: pulumi.Output<string>;
99
+ /**
100
+ * The private key in PEM format.
101
+ */
102
+ readonly privateKeyPem: pulumi.Output<string>;
103
+ /**
104
+ * Number of bits to use when generating an RSA key.
105
+ * Applies when `algorithm=RSA`. Defaults to `2048`.
106
+ */
107
+ readonly rsaBits: pulumi.Output<number | undefined>;
108
+ /**
109
+ * List of DNS names to use as alternative
110
+ * subjects of the certificate.
111
+ */
112
+ readonly sanDns: pulumi.Output<string[] | undefined>;
113
+ /**
114
+ * List of email addresses to use as
115
+ * alternative subjects of the certificate.
116
+ */
117
+ readonly sanEmails: pulumi.Output<string[] | undefined>;
118
+ /**
119
+ * List of IP addresses to use as alternative
120
+ * subjects of the certificate.
121
+ */
122
+ readonly sanIps: pulumi.Output<string[] | undefined>;
123
+ /**
124
+ * Desired number of days for which the new
125
+ * certificate will be valid.
126
+ */
127
+ readonly validDays: pulumi.Output<number | undefined>;
128
+ /**
129
+ * Create a Certificate resource with the given unique name, arguments, and options.
130
+ *
131
+ * @param name The _unique_ name of the resource.
132
+ * @param args The arguments to use to populate this resource's properties.
133
+ * @param opts A bag of options that control this resource's behavior.
134
+ */
135
+ constructor(name: string, args: CertificateArgs, opts?: pulumi.CustomResourceOptions);
136
+ }
137
+ /**
138
+ * Input properties used for looking up and filtering Certificate resources.
139
+ */
140
+ export interface CertificateState {
141
+ /**
142
+ * Key encryption algorithm, either `RSA` or `ECDSA`.
143
+ * Defaults to `RSA`.
144
+ */
145
+ readonly algorithm?: pulumi.Input<string>;
146
+ /**
147
+ * The X509 certificate in PEM format.
148
+ */
149
+ readonly certificate?: pulumi.Input<string>;
150
+ readonly certificateDn?: pulumi.Input<string>;
151
+ /**
152
+ * The trust chain of X509 certificate authority certificates in PEM format
153
+ * concatenated together.
154
+ */
155
+ readonly chain?: pulumi.Input<string>;
156
+ /**
157
+ * The common name of the certificate.
158
+ */
159
+ readonly commonName?: pulumi.Input<string>;
160
+ readonly csrPem?: pulumi.Input<string>;
161
+ /**
162
+ * Collection of Custom Field name-value pairs to
163
+ * assign to the certificate.
164
+ */
165
+ readonly customFields?: pulumi.Input<{
166
+ [key: string]: pulumi.Input<string>;
167
+ }>;
168
+ /**
169
+ * ECDSA curve to use when generating a key
170
+ */
171
+ readonly ecdsaCurve?: pulumi.Input<string>;
172
+ /**
173
+ * Number of hours before certificate expiry
174
+ * to request a new certificate.
175
+ */
176
+ readonly expirationWindow?: pulumi.Input<number>;
177
+ /**
178
+ * Used with validDays to indicate the target
179
+ * issuer when using Trust Protection Platform. Relevant values are: "DigiCert",
180
+ * "Entrust", and "Microsoft".
181
+ */
182
+ readonly issuerHint?: pulumi.Input<string>;
183
+ /**
184
+ * The password used to encrypt the private key.
185
+ */
186
+ readonly keyPassword?: pulumi.Input<string>;
187
+ /**
188
+ * A base64-encoded PKCS#12 keystore secured by the `keyPassword`.
189
+ */
190
+ readonly pkcs12?: pulumi.Input<string>;
191
+ /**
192
+ * The private key in PEM format.
193
+ */
194
+ readonly privateKeyPem?: pulumi.Input<string>;
195
+ /**
196
+ * Number of bits to use when generating an RSA key.
197
+ * Applies when `algorithm=RSA`. Defaults to `2048`.
198
+ */
199
+ readonly rsaBits?: pulumi.Input<number>;
200
+ /**
201
+ * List of DNS names to use as alternative
202
+ * subjects of the certificate.
203
+ */
204
+ readonly sanDns?: pulumi.Input<pulumi.Input<string>[]>;
205
+ /**
206
+ * List of email addresses to use as
207
+ * alternative subjects of the certificate.
208
+ */
209
+ readonly sanEmails?: pulumi.Input<pulumi.Input<string>[]>;
210
+ /**
211
+ * List of IP addresses to use as alternative
212
+ * subjects of the certificate.
213
+ */
214
+ readonly sanIps?: pulumi.Input<pulumi.Input<string>[]>;
215
+ /**
216
+ * Desired number of days for which the new
217
+ * certificate will be valid.
218
+ */
219
+ readonly validDays?: pulumi.Input<number>;
220
+ }
221
+ /**
222
+ * The set of arguments for constructing a Certificate resource.
223
+ */
224
+ export interface CertificateArgs {
225
+ /**
226
+ * Key encryption algorithm, either `RSA` or `ECDSA`.
227
+ * Defaults to `RSA`.
228
+ */
229
+ readonly algorithm?: pulumi.Input<string>;
230
+ readonly certificateDn?: pulumi.Input<string>;
231
+ /**
232
+ * The common name of the certificate.
233
+ */
234
+ readonly commonName: pulumi.Input<string>;
235
+ readonly csrPem?: pulumi.Input<string>;
236
+ /**
237
+ * Collection of Custom Field name-value pairs to
238
+ * assign to the certificate.
239
+ */
240
+ readonly customFields?: pulumi.Input<{
241
+ [key: string]: pulumi.Input<string>;
242
+ }>;
243
+ /**
244
+ * ECDSA curve to use when generating a key
245
+ */
246
+ readonly ecdsaCurve?: pulumi.Input<string>;
247
+ /**
248
+ * Number of hours before certificate expiry
249
+ * to request a new certificate.
250
+ */
251
+ readonly expirationWindow?: pulumi.Input<number>;
252
+ /**
253
+ * Used with validDays to indicate the target
254
+ * issuer when using Trust Protection Platform. Relevant values are: "DigiCert",
255
+ * "Entrust", and "Microsoft".
256
+ */
257
+ readonly issuerHint?: pulumi.Input<string>;
258
+ /**
259
+ * The password used to encrypt the private key.
260
+ */
261
+ readonly keyPassword?: pulumi.Input<string>;
262
+ /**
263
+ * A base64-encoded PKCS#12 keystore secured by the `keyPassword`.
264
+ */
265
+ readonly pkcs12?: pulumi.Input<string>;
266
+ /**
267
+ * The private key in PEM format.
268
+ */
269
+ readonly privateKeyPem?: pulumi.Input<string>;
270
+ /**
271
+ * Number of bits to use when generating an RSA key.
272
+ * Applies when `algorithm=RSA`. Defaults to `2048`.
273
+ */
274
+ readonly rsaBits?: pulumi.Input<number>;
275
+ /**
276
+ * List of DNS names to use as alternative
277
+ * subjects of the certificate.
278
+ */
279
+ readonly sanDns?: pulumi.Input<pulumi.Input<string>[]>;
280
+ /**
281
+ * List of email addresses to use as
282
+ * alternative subjects of the certificate.
283
+ */
284
+ readonly sanEmails?: pulumi.Input<pulumi.Input<string>[]>;
285
+ /**
286
+ * List of IP addresses to use as alternative
287
+ * subjects of the certificate.
288
+ */
289
+ readonly sanIps?: pulumi.Input<pulumi.Input<string>[]>;
290
+ /**
291
+ * Desired number of days for which the new
292
+ * certificate will be valid.
293
+ */
294
+ readonly validDays?: pulumi.Input<number>;
295
+ }
package/certificate.js ADDED
@@ -0,0 +1,118 @@
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 utilities = require("./utilities");
7
+ /**
8
+ * Provides access to TLS key and certificate data enrolled using Venafi. This can be used to define a
9
+ * certificate.
10
+ *
11
+ * The `venafi.Certificate` resource handles certificate renewals as long as a
12
+ * `pulumi up` is run within the `expirationWindow` period. Keep in mind that the
13
+ * `expirationWindow` in the provider configuration needs to align with the renewal
14
+ * window of the issuing CA to achieve the desired result.
15
+ *
16
+ * ## Example Usage
17
+ *
18
+ * ```typescript
19
+ * import * as pulumi from "@pulumi/pulumi";
20
+ * import * as venafi from "@pulumi/venafi";
21
+ *
22
+ * const webserver = new venafi.Certificate("webserver", {
23
+ * algorithm: "RSA",
24
+ * commonName: "web.venafi.example",
25
+ * customFields: {
26
+ * "Cost Center": "AB1234",
27
+ * Environment: "UAT|Staging",
28
+ * },
29
+ * keyPassword: var_pk_pass,
30
+ * rsaBits: 2048,
31
+ * sanDns: [
32
+ * "web01.venafi.example",
33
+ * "web02.venafi.example",
34
+ * ],
35
+ * });
36
+ * ```
37
+ */
38
+ class Certificate extends pulumi.CustomResource {
39
+ constructor(name, argsOrState, opts) {
40
+ let inputs = {};
41
+ opts = opts || {};
42
+ if (opts.id) {
43
+ const state = argsOrState;
44
+ inputs["algorithm"] = state ? state.algorithm : undefined;
45
+ inputs["certificate"] = state ? state.certificate : undefined;
46
+ inputs["certificateDn"] = state ? state.certificateDn : undefined;
47
+ inputs["chain"] = state ? state.chain : undefined;
48
+ inputs["commonName"] = state ? state.commonName : undefined;
49
+ inputs["csrPem"] = state ? state.csrPem : undefined;
50
+ inputs["customFields"] = state ? state.customFields : undefined;
51
+ inputs["ecdsaCurve"] = state ? state.ecdsaCurve : undefined;
52
+ inputs["expirationWindow"] = state ? state.expirationWindow : undefined;
53
+ inputs["issuerHint"] = state ? state.issuerHint : undefined;
54
+ inputs["keyPassword"] = state ? state.keyPassword : undefined;
55
+ inputs["pkcs12"] = state ? state.pkcs12 : undefined;
56
+ inputs["privateKeyPem"] = state ? state.privateKeyPem : undefined;
57
+ inputs["rsaBits"] = state ? state.rsaBits : undefined;
58
+ inputs["sanDns"] = state ? state.sanDns : undefined;
59
+ inputs["sanEmails"] = state ? state.sanEmails : undefined;
60
+ inputs["sanIps"] = state ? state.sanIps : undefined;
61
+ inputs["validDays"] = state ? state.validDays : undefined;
62
+ }
63
+ else {
64
+ const args = argsOrState;
65
+ if ((!args || args.commonName === undefined) && !opts.urn) {
66
+ throw new Error("Missing required property 'commonName'");
67
+ }
68
+ inputs["algorithm"] = args ? args.algorithm : undefined;
69
+ inputs["certificateDn"] = args ? args.certificateDn : undefined;
70
+ inputs["commonName"] = args ? args.commonName : undefined;
71
+ inputs["csrPem"] = args ? args.csrPem : undefined;
72
+ inputs["customFields"] = args ? args.customFields : undefined;
73
+ inputs["ecdsaCurve"] = args ? args.ecdsaCurve : undefined;
74
+ inputs["expirationWindow"] = args ? args.expirationWindow : undefined;
75
+ inputs["issuerHint"] = args ? args.issuerHint : undefined;
76
+ inputs["keyPassword"] = args ? args.keyPassword : undefined;
77
+ inputs["pkcs12"] = args ? args.pkcs12 : undefined;
78
+ inputs["privateKeyPem"] = args ? args.privateKeyPem : undefined;
79
+ inputs["rsaBits"] = args ? args.rsaBits : undefined;
80
+ inputs["sanDns"] = args ? args.sanDns : undefined;
81
+ inputs["sanEmails"] = args ? args.sanEmails : undefined;
82
+ inputs["sanIps"] = args ? args.sanIps : undefined;
83
+ inputs["validDays"] = args ? args.validDays : undefined;
84
+ inputs["certificate"] = undefined /*out*/;
85
+ inputs["chain"] = undefined /*out*/;
86
+ }
87
+ if (!opts.version) {
88
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
89
+ }
90
+ super(Certificate.__pulumiType, name, inputs, opts);
91
+ }
92
+ /**
93
+ * Get an existing Certificate resource's state with the given name, ID, and optional extra
94
+ * properties used to qualify the lookup.
95
+ *
96
+ * @param name The _unique_ name of the resulting resource.
97
+ * @param id The _unique_ provider ID of the resource to lookup.
98
+ * @param state Any extra arguments used during the lookup.
99
+ * @param opts Optional settings to control the behavior of the CustomResource.
100
+ */
101
+ static get(name, id, state, opts) {
102
+ return new Certificate(name, state, Object.assign(Object.assign({}, opts), { id: id }));
103
+ }
104
+ /**
105
+ * Returns true if the given object is an instance of Certificate. This is designed to work even
106
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
107
+ */
108
+ static isInstance(obj) {
109
+ if (obj === undefined || obj === null) {
110
+ return false;
111
+ }
112
+ return obj['__pulumiType'] === Certificate.__pulumiType;
113
+ }
114
+ }
115
+ exports.Certificate = Certificate;
116
+ /** @internal */
117
+ Certificate.__pulumiType = 'venafi:index/certificate:Certificate';
118
+ //# sourceMappingURL=certificate.js.map