pulumi-venafi 1.8.0a1710160781__py3-none-any.whl → 1.11.0a1736835975__py3-none-any.whl

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.

Potentially problematic release.


This version of pulumi-venafi might be problematic. Click here for more details.

@@ -0,0 +1,167 @@
1
+ # coding=utf-8
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
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = [
18
+ 'GetCloudProviderResult',
19
+ 'AwaitableGetCloudProviderResult',
20
+ 'get_cloud_provider',
21
+ 'get_cloud_provider_output',
22
+ ]
23
+
24
+ @pulumi.output_type
25
+ class GetCloudProviderResult:
26
+ """
27
+ A collection of values returned by getCloudProvider.
28
+ """
29
+ def __init__(__self__, id=None, keystores_count=None, name=None, status=None, status_details=None, type=None):
30
+ if id and not isinstance(id, str):
31
+ raise TypeError("Expected argument 'id' to be a str")
32
+ pulumi.set(__self__, "id", id)
33
+ if keystores_count and not isinstance(keystores_count, int):
34
+ raise TypeError("Expected argument 'keystores_count' to be a int")
35
+ pulumi.set(__self__, "keystores_count", keystores_count)
36
+ if name and not isinstance(name, str):
37
+ raise TypeError("Expected argument 'name' to be a str")
38
+ pulumi.set(__self__, "name", name)
39
+ if status and not isinstance(status, str):
40
+ raise TypeError("Expected argument 'status' to be a str")
41
+ pulumi.set(__self__, "status", status)
42
+ if status_details and not isinstance(status_details, str):
43
+ raise TypeError("Expected argument 'status_details' to be a str")
44
+ pulumi.set(__self__, "status_details", status_details)
45
+ if type and not isinstance(type, str):
46
+ raise TypeError("Expected argument 'type' to be a str")
47
+ pulumi.set(__self__, "type", type)
48
+
49
+ @property
50
+ @pulumi.getter
51
+ def id(self) -> str:
52
+ """
53
+ The provider-assigned unique ID for this managed resource.
54
+ """
55
+ return pulumi.get(self, "id")
56
+
57
+ @property
58
+ @pulumi.getter(name="keystoresCount")
59
+ def keystores_count(self) -> int:
60
+ """
61
+ Number of Cloud Keystores configured with the Cloud Provider
62
+ """
63
+ return pulumi.get(self, "keystores_count")
64
+
65
+ @property
66
+ @pulumi.getter
67
+ def name(self) -> str:
68
+ return pulumi.get(self, "name")
69
+
70
+ @property
71
+ @pulumi.getter
72
+ def status(self) -> str:
73
+ """
74
+ The status of the Cloud Provider. Either `VALIDATED` or `NOT_VALIDATED`.
75
+ """
76
+ return pulumi.get(self, "status")
77
+
78
+ @property
79
+ @pulumi.getter(name="statusDetails")
80
+ def status_details(self) -> str:
81
+ """
82
+ The details of the Cloud Provider status. If the status is `VALIDATED`, this value will be empty.
83
+ """
84
+ return pulumi.get(self, "status_details")
85
+
86
+ @property
87
+ @pulumi.getter
88
+ def type(self) -> str:
89
+ """
90
+ The Cloud Provider type. Either `AWS`, `AZURE` or `GCP`
91
+ """
92
+ return pulumi.get(self, "type")
93
+
94
+
95
+ class AwaitableGetCloudProviderResult(GetCloudProviderResult):
96
+ # pylint: disable=using-constant-test
97
+ def __await__(self):
98
+ if False:
99
+ yield self
100
+ return GetCloudProviderResult(
101
+ id=self.id,
102
+ keystores_count=self.keystores_count,
103
+ name=self.name,
104
+ status=self.status,
105
+ status_details=self.status_details,
106
+ type=self.type)
107
+
108
+
109
+ def get_cloud_provider(name: Optional[str] = None,
110
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCloudProviderResult:
111
+ """
112
+ Use this data source to get the `ID` of a cloud provider in Venafi Control Plane, referenced by its name.
113
+
114
+ ## Example Usage
115
+
116
+ ```python
117
+ import pulumi
118
+ import pulumi_venafi as venafi
119
+
120
+ # Find a cloud provider
121
+ cp_example = venafi.get_cloud_provider(name="Cloud Provider Example")
122
+ ```
123
+
124
+
125
+ :param str name: Name of the Cloud Provider to look up.
126
+ """
127
+ __args__ = dict()
128
+ __args__['name'] = name
129
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
130
+ __ret__ = pulumi.runtime.invoke('venafi:index/getCloudProvider:getCloudProvider', __args__, opts=opts, typ=GetCloudProviderResult).value
131
+
132
+ return AwaitableGetCloudProviderResult(
133
+ id=pulumi.get(__ret__, 'id'),
134
+ keystores_count=pulumi.get(__ret__, 'keystores_count'),
135
+ name=pulumi.get(__ret__, 'name'),
136
+ status=pulumi.get(__ret__, 'status'),
137
+ status_details=pulumi.get(__ret__, 'status_details'),
138
+ type=pulumi.get(__ret__, 'type'))
139
+ def get_cloud_provider_output(name: Optional[pulumi.Input[str]] = None,
140
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCloudProviderResult]:
141
+ """
142
+ Use this data source to get the `ID` of a cloud provider in Venafi Control Plane, referenced by its name.
143
+
144
+ ## Example Usage
145
+
146
+ ```python
147
+ import pulumi
148
+ import pulumi_venafi as venafi
149
+
150
+ # Find a cloud provider
151
+ cp_example = venafi.get_cloud_provider(name="Cloud Provider Example")
152
+ ```
153
+
154
+
155
+ :param str name: Name of the Cloud Provider to look up.
156
+ """
157
+ __args__ = dict()
158
+ __args__['name'] = name
159
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
160
+ __ret__ = pulumi.runtime.invoke_output('venafi:index/getCloudProvider:getCloudProvider', __args__, opts=opts, typ=GetCloudProviderResult)
161
+ return __ret__.apply(lambda __response__: GetCloudProviderResult(
162
+ id=pulumi.get(__response__, 'id'),
163
+ keystores_count=pulumi.get(__response__, 'keystores_count'),
164
+ name=pulumi.get(__response__, 'name'),
165
+ status=pulumi.get(__response__, 'status'),
166
+ status_details=pulumi.get(__response__, 'status_details'),
167
+ type=pulumi.get(__response__, 'type')))
pulumi_venafi/policy.py CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = ['PolicyArgs', 'Policy']
@@ -18,11 +23,11 @@ class PolicyArgs:
18
23
  zone: Optional[pulumi.Input[str]] = None):
19
24
  """
20
25
  The set of arguments for constructing a Policy resource.
21
- :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy
22
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
23
- Typically read from a file using the `file` function.
24
- :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or
25
- *Venafi as a Service* application and issuing template.
26
+ :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy specification as documented
27
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
28
+ function.
29
+ :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
30
+ issuing template.
26
31
  """
27
32
  if policy_specification is not None:
28
33
  pulumi.set(__self__, "policy_specification", policy_specification)
@@ -33,9 +38,9 @@ class PolicyArgs:
33
38
  @pulumi.getter(name="policySpecification")
34
39
  def policy_specification(self) -> Optional[pulumi.Input[str]]:
35
40
  """
36
- The JSON-formatted certificate policy
37
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
38
- Typically read from a file using the `file` function.
41
+ The JSON-formatted certificate policy specification as documented
42
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
43
+ function.
39
44
  """
40
45
  return pulumi.get(self, "policy_specification")
41
46
 
@@ -47,8 +52,8 @@ class PolicyArgs:
47
52
  @pulumi.getter
48
53
  def zone(self) -> Optional[pulumi.Input[str]]:
49
54
  """
50
- The *Trust Protection Plaform* policy folder or
51
- *Venafi as a Service* application and issuing template.
55
+ The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
56
+ issuing template.
52
57
  """
53
58
  return pulumi.get(self, "zone")
54
59
 
@@ -64,11 +69,11 @@ class _PolicyState:
64
69
  zone: Optional[pulumi.Input[str]] = None):
65
70
  """
66
71
  Input properties used for looking up and filtering Policy resources.
67
- :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy
68
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
69
- Typically read from a file using the `file` function.
70
- :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or
71
- *Venafi as a Service* application and issuing template.
72
+ :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy specification as documented
73
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
74
+ function.
75
+ :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
76
+ issuing template.
72
77
  """
73
78
  if policy_specification is not None:
74
79
  pulumi.set(__self__, "policy_specification", policy_specification)
@@ -79,9 +84,9 @@ class _PolicyState:
79
84
  @pulumi.getter(name="policySpecification")
80
85
  def policy_specification(self) -> Optional[pulumi.Input[str]]:
81
86
  """
82
- The JSON-formatted certificate policy
83
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
84
- Typically read from a file using the `file` function.
87
+ The JSON-formatted certificate policy specification as documented
88
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
89
+ function.
85
90
  """
86
91
  return pulumi.get(self, "policy_specification")
87
92
 
@@ -93,8 +98,8 @@ class _PolicyState:
93
98
  @pulumi.getter
94
99
  def zone(self) -> Optional[pulumi.Input[str]]:
95
100
  """
96
- The *Trust Protection Plaform* policy folder or
97
- *Venafi as a Service* application and issuing template.
101
+ The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
102
+ issuing template.
98
103
  """
99
104
  return pulumi.get(self, "zone")
100
105
 
@@ -112,36 +117,30 @@ class Policy(pulumi.CustomResource):
112
117
  zone: Optional[pulumi.Input[str]] = None,
113
118
  __props__=None):
114
119
  """
115
- Provides access to read and write certificate policy in Venafi. This can be used
116
- to define a new policy (folder in *Trust Protection Platform*; application
117
- and/or issuing template in *Venafi as a Service*).
120
+ Provides access to read and write certificate policy in Venafi. This can be used to define a new policy (folder in
121
+ *Trust Protection Platform*; application and issuing template in *Venafi Control Plane*).
118
122
 
119
123
  ## Example Usage
120
124
 
121
- <!--Start PulumiCodeChooser -->
122
125
  ```python
123
126
  import pulumi
127
+ import pulumi_std as std
124
128
  import pulumi_venafi as venafi
125
129
 
126
- internal_policy = venafi.Policy("internalPolicy",
130
+ internal_policy = venafi.Policy("internal_policy",
127
131
  zone="My Business App\\\\Enterprise Trusted Certs",
128
- policy_specification=(lambda path: open(path).read())("/path-to/internal-policy.json"))
132
+ policy_specification=std.file(input="/path-to/internal-policy.json").result)
129
133
  ```
130
- <!--End PulumiCodeChooser -->
131
134
 
132
135
  ## Import
133
136
 
134
- The `venafi_policy` resource supports the Terraform import
137
+ The `venafi_policy` resource supports the Terraform import method.
135
138
 
136
- method. When used, the `zone` and `policy_specification` resource arguments
139
+ When used, the `zone` and `policy_specification` resource arguments are not required since the zone is a required
137
140
 
138
- are not required since the zone is a required parameter of the import method
141
+ parameter of the import method and the policy specification is populated from the existing infrastructure. Policy that
139
142
 
140
- and the policy specification is populated from the existing infrastructure.
141
-
142
- Policy that is successfully imported is also output to a file named after the
143
-
144
- zone that was specified.
143
+ is successfully imported is also output to a file named after the zone that was specified.
145
144
 
146
145
  hcl
147
146
 
@@ -153,11 +152,11 @@ class Policy(pulumi.CustomResource):
153
152
 
154
153
  :param str resource_name: The name of the resource.
155
154
  :param pulumi.ResourceOptions opts: Options for the resource.
156
- :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy
157
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
158
- Typically read from a file using the `file` function.
159
- :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or
160
- *Venafi as a Service* application and issuing template.
155
+ :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy specification as documented
156
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
157
+ function.
158
+ :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
159
+ issuing template.
161
160
  """
162
161
  ...
163
162
  @overload
@@ -166,36 +165,30 @@ class Policy(pulumi.CustomResource):
166
165
  args: Optional[PolicyArgs] = None,
167
166
  opts: Optional[pulumi.ResourceOptions] = None):
168
167
  """
169
- Provides access to read and write certificate policy in Venafi. This can be used
170
- to define a new policy (folder in *Trust Protection Platform*; application
171
- and/or issuing template in *Venafi as a Service*).
168
+ Provides access to read and write certificate policy in Venafi. This can be used to define a new policy (folder in
169
+ *Trust Protection Platform*; application and issuing template in *Venafi Control Plane*).
172
170
 
173
171
  ## Example Usage
174
172
 
175
- <!--Start PulumiCodeChooser -->
176
173
  ```python
177
174
  import pulumi
175
+ import pulumi_std as std
178
176
  import pulumi_venafi as venafi
179
177
 
180
- internal_policy = venafi.Policy("internalPolicy",
178
+ internal_policy = venafi.Policy("internal_policy",
181
179
  zone="My Business App\\\\Enterprise Trusted Certs",
182
- policy_specification=(lambda path: open(path).read())("/path-to/internal-policy.json"))
180
+ policy_specification=std.file(input="/path-to/internal-policy.json").result)
183
181
  ```
184
- <!--End PulumiCodeChooser -->
185
182
 
186
183
  ## Import
187
184
 
188
- The `venafi_policy` resource supports the Terraform import
189
-
190
- method. When used, the `zone` and `policy_specification` resource arguments
191
-
192
- are not required since the zone is a required parameter of the import method
185
+ The `venafi_policy` resource supports the Terraform import method.
193
186
 
194
- and the policy specification is populated from the existing infrastructure.
187
+ When used, the `zone` and `policy_specification` resource arguments are not required since the zone is a required
195
188
 
196
- Policy that is successfully imported is also output to a file named after the
189
+ parameter of the import method and the policy specification is populated from the existing infrastructure. Policy that
197
190
 
198
- zone that was specified.
191
+ is successfully imported is also output to a file named after the zone that was specified.
199
192
 
200
193
  hcl
201
194
 
@@ -252,11 +245,11 @@ class Policy(pulumi.CustomResource):
252
245
  :param str resource_name: The unique name of the resulting resource.
253
246
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
254
247
  :param pulumi.ResourceOptions opts: Options for the resource.
255
- :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy
256
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
257
- Typically read from a file using the `file` function.
258
- :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or
259
- *Venafi as a Service* application and issuing template.
248
+ :param pulumi.Input[str] policy_specification: The JSON-formatted certificate policy specification as documented
249
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
250
+ function.
251
+ :param pulumi.Input[str] zone: The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
252
+ issuing template.
260
253
  """
261
254
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
262
255
 
@@ -270,9 +263,9 @@ class Policy(pulumi.CustomResource):
270
263
  @pulumi.getter(name="policySpecification")
271
264
  def policy_specification(self) -> pulumi.Output[Optional[str]]:
272
265
  """
273
- The JSON-formatted certificate policy
274
- specification as documented [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md).
275
- Typically read from a file using the `file` function.
266
+ The JSON-formatted certificate policy specification as documented
267
+ [here](https://github.com/Venafi/vcert/blob/master/README-POLICY-SPEC.md). Typically read from a file using the `file`
268
+ function.
276
269
  """
277
270
  return pulumi.get(self, "policy_specification")
278
271
 
@@ -280,8 +273,8 @@ class Policy(pulumi.CustomResource):
280
273
  @pulumi.getter
281
274
  def zone(self) -> pulumi.Output[Optional[str]]:
282
275
  """
283
- The *Trust Protection Plaform* policy folder or
284
- *Venafi as a Service* application and issuing template.
276
+ The *Trust Protection Plaform* policy folder or *Venafi Control Plane* application and
277
+ issuing template.
285
278
  """
286
279
  return pulumi.get(self, "zone")
287
280