pulumi-azuread 5.48.0a1706744699__py3-none-any.whl → 6.8.0a1766208344__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-azuread might be problematic. Click here for more details.
- pulumi_azuread/__init__.py +48 -1
- pulumi_azuread/_inputs.py +3803 -919
- pulumi_azuread/_utilities.py +52 -12
- pulumi_azuread/access_package.py +84 -78
- pulumi_azuread/access_package_assignment_policy.py +202 -196
- pulumi_azuread/access_package_catalog.py +82 -76
- pulumi_azuread/access_package_catalog_role_assignment.py +73 -67
- pulumi_azuread/access_package_resource_catalog_association.py +73 -67
- pulumi_azuread/access_package_resource_package_association.py +79 -73
- pulumi_azuread/administrative_unit.py +120 -100
- pulumi_azuread/administrative_unit_member.py +66 -50
- pulumi_azuread/administrative_unit_role_member.py +75 -69
- pulumi_azuread/app_role_assignment.py +164 -264
- pulumi_azuread/application.py +766 -692
- pulumi_azuread/application_api_access.py +84 -80
- pulumi_azuread/application_app_role.py +120 -116
- pulumi_azuread/application_certificate.py +349 -211
- pulumi_azuread/application_fallback_public_client.py +50 -44
- pulumi_azuread/application_federated_identity_credential.py +142 -197
- pulumi_azuread/application_from_template.py +90 -84
- pulumi_azuread/application_identifier_uri.py +56 -52
- pulumi_azuread/application_known_clients.py +50 -44
- pulumi_azuread/application_optional_claims.py +87 -81
- pulumi_azuread/application_owner.py +76 -42
- pulumi_azuread/application_password.py +159 -205
- pulumi_azuread/application_permission_scope.py +160 -156
- pulumi_azuread/application_pre_authorized.py +120 -236
- pulumi_azuread/application_redirect_uris.py +75 -69
- pulumi_azuread/application_registration.py +315 -309
- pulumi_azuread/authentication_strength_policy.py +73 -67
- pulumi_azuread/claims_mapping_policy.py +48 -42
- pulumi_azuread/conditional_access_policy.py +248 -232
- pulumi_azuread/config/__init__.py +2 -1
- pulumi_azuread/config/__init__.pyi +23 -17
- pulumi_azuread/config/vars.py +47 -37
- pulumi_azuread/custom_directory_role.py +128 -122
- pulumi_azuread/directory_role.py +60 -54
- pulumi_azuread/directory_role_assignment.py +194 -181
- pulumi_azuread/directory_role_eligibility_schedule_request.py +86 -80
- pulumi_azuread/directory_role_member.py +54 -48
- pulumi_azuread/get_access_package.py +45 -31
- pulumi_azuread/get_access_package_catalog.py +40 -27
- pulumi_azuread/get_access_package_catalog_role.py +39 -25
- pulumi_azuread/get_administrative_unit.py +42 -27
- pulumi_azuread/get_application.py +135 -94
- pulumi_azuread/get_application_published_app_ids.py +42 -47
- pulumi_azuread/get_application_template.py +49 -33
- pulumi_azuread/get_client_config.py +24 -15
- pulumi_azuread/get_directory_object.py +32 -21
- pulumi_azuread/get_directory_role_templates.py +20 -12
- pulumi_azuread/get_directory_roles.py +23 -14
- pulumi_azuread/get_domains.py +65 -46
- pulumi_azuread/get_group.py +147 -88
- pulumi_azuread/get_group_role_management_policy.py +178 -0
- pulumi_azuread/get_groups.py +71 -51
- pulumi_azuread/get_named_location.py +47 -22
- pulumi_azuread/get_service_principal.py +108 -90
- pulumi_azuread/get_service_principals.py +60 -64
- pulumi_azuread/get_user.py +186 -118
- pulumi_azuread/get_users.py +96 -53
- pulumi_azuread/group.py +622 -464
- pulumi_azuread/group_member.py +56 -50
- pulumi_azuread/group_role_management_policy.py +544 -0
- pulumi_azuread/group_without_members.py +1610 -0
- pulumi_azuread/invitation.py +126 -120
- pulumi_azuread/named_location.py +90 -76
- pulumi_azuread/outputs.py +2844 -1308
- pulumi_azuread/privileged_access_group_assignment_schedule.py +695 -0
- pulumi_azuread/privileged_access_group_eligibility_schedule.py +695 -0
- pulumi_azuread/provider.py +292 -246
- pulumi_azuread/pulumi-plugin.json +2 -1
- pulumi_azuread/service_principal.py +400 -461
- pulumi_azuread/service_principal_certificate.py +230 -145
- pulumi_azuread/service_principal_claims_mapping_policy_assignment.py +53 -47
- pulumi_azuread/service_principal_delegated_permission_grant.py +146 -140
- pulumi_azuread/service_principal_password.py +156 -141
- pulumi_azuread/service_principal_token_signing_certificate.py +119 -124
- pulumi_azuread/synchronization_job.py +105 -111
- pulumi_azuread/synchronization_job_provision_on_demand.py +396 -0
- pulumi_azuread/synchronization_secret.py +64 -70
- pulumi_azuread/user.py +776 -730
- pulumi_azuread/user_flow_attribute.py +76 -70
- {pulumi_azuread-5.48.0a1706744699.dist-info → pulumi_azuread-6.8.0a1766208344.dist-info}/METADATA +21 -20
- pulumi_azuread-6.8.0a1766208344.dist-info/RECORD +87 -0
- {pulumi_azuread-5.48.0a1706744699.dist-info → pulumi_azuread-6.8.0a1766208344.dist-info}/WHEEL +1 -1
- pulumi_azuread-5.48.0a1706744699.dist-info/RECORD +0 -81
- {pulumi_azuread-5.48.0a1706744699.dist-info → pulumi_azuread-6.8.0a1766208344.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
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__ = ['ApplicationCertificateArgs', 'ApplicationCertificate']
|
|
@@ -14,43 +19,38 @@ __all__ = ['ApplicationCertificateArgs', 'ApplicationCertificate']
|
|
|
14
19
|
@pulumi.input_type
|
|
15
20
|
class ApplicationCertificateArgs:
|
|
16
21
|
def __init__(__self__, *,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type: Optional[pulumi.Input[str]] = None):
|
|
22
|
+
application_id: pulumi.Input[_builtins.str],
|
|
23
|
+
value: pulumi.Input[_builtins.str],
|
|
24
|
+
encoding: Optional[pulumi.Input[_builtins.str]] = None,
|
|
25
|
+
end_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
26
|
+
end_date_relative: Optional[pulumi.Input[_builtins.str]] = None,
|
|
27
|
+
key_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
28
|
+
start_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
29
|
+
type: Optional[pulumi.Input[_builtins.str]] = None):
|
|
26
30
|
"""
|
|
27
31
|
The set of arguments for constructing a ApplicationCertificate resource.
|
|
28
|
-
:param pulumi.Input[str]
|
|
29
|
-
:param pulumi.Input[str]
|
|
30
|
-
:param pulumi.Input[str]
|
|
31
|
-
:param pulumi.Input[str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
32
|
+
:param pulumi.Input[_builtins.str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
33
|
+
:param pulumi.Input[_builtins.str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
34
|
+
:param pulumi.Input[_builtins.str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
32
35
|
|
|
33
36
|
> **Tip for Azure Key Vault** The `hex` encoding option is useful for consuming certificate data from the azurerm_key_vault_certificate resource.
|
|
34
|
-
:param pulumi.Input[str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
35
|
-
:param pulumi.Input[str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
37
|
+
:param pulumi.Input[_builtins.str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
38
|
+
:param pulumi.Input[_builtins.str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
36
39
|
|
|
37
40
|
> One of `end_date` or `end_date_relative` must be specified. The maximum allowed duration is determined by Azure AD and is typically around 2 years from the creation date.
|
|
38
|
-
:param pulumi.Input[str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
39
|
-
:param pulumi.Input[str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
40
|
-
:param pulumi.Input[str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
41
|
+
:param pulumi.Input[_builtins.str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
42
|
+
:param pulumi.Input[_builtins.str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
43
|
+
:param pulumi.Input[_builtins.str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
41
44
|
"""
|
|
45
|
+
pulumi.set(__self__, "application_id", application_id)
|
|
42
46
|
pulumi.set(__self__, "value", value)
|
|
43
|
-
if application_id is not None:
|
|
44
|
-
pulumi.set(__self__, "application_id", application_id)
|
|
45
|
-
if application_object_id is not None:
|
|
46
|
-
warnings.warn("""The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""", DeprecationWarning)
|
|
47
|
-
pulumi.log.warn("""application_object_id is deprecated: The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""")
|
|
48
|
-
if application_object_id is not None:
|
|
49
|
-
pulumi.set(__self__, "application_object_id", application_object_id)
|
|
50
47
|
if encoding is not None:
|
|
51
48
|
pulumi.set(__self__, "encoding", encoding)
|
|
52
49
|
if end_date is not None:
|
|
53
50
|
pulumi.set(__self__, "end_date", end_date)
|
|
51
|
+
if end_date_relative is not None:
|
|
52
|
+
warnings.warn("""The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""", DeprecationWarning)
|
|
53
|
+
pulumi.log.warn("""end_date_relative is deprecated: The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""")
|
|
54
54
|
if end_date_relative is not None:
|
|
55
55
|
pulumi.set(__self__, "end_date_relative", end_date_relative)
|
|
56
56
|
if key_id is not None:
|
|
@@ -60,48 +60,33 @@ class ApplicationCertificateArgs:
|
|
|
60
60
|
if type is not None:
|
|
61
61
|
pulumi.set(__self__, "type", type)
|
|
62
62
|
|
|
63
|
-
@property
|
|
64
|
-
@pulumi.getter
|
|
65
|
-
def value(self) -> pulumi.Input[str]:
|
|
66
|
-
"""
|
|
67
|
-
The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
68
|
-
"""
|
|
69
|
-
return pulumi.get(self, "value")
|
|
70
|
-
|
|
71
|
-
@value.setter
|
|
72
|
-
def value(self, value: pulumi.Input[str]):
|
|
73
|
-
pulumi.set(self, "value", value)
|
|
74
|
-
|
|
75
|
-
@property
|
|
63
|
+
@_builtins.property
|
|
76
64
|
@pulumi.getter(name="applicationId")
|
|
77
|
-
def application_id(self) ->
|
|
65
|
+
def application_id(self) -> pulumi.Input[_builtins.str]:
|
|
78
66
|
"""
|
|
79
67
|
The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
80
68
|
"""
|
|
81
69
|
return pulumi.get(self, "application_id")
|
|
82
70
|
|
|
83
71
|
@application_id.setter
|
|
84
|
-
def application_id(self, value:
|
|
72
|
+
def application_id(self, value: pulumi.Input[_builtins.str]):
|
|
85
73
|
pulumi.set(self, "application_id", value)
|
|
86
74
|
|
|
87
|
-
@property
|
|
88
|
-
@pulumi.getter
|
|
89
|
-
def
|
|
75
|
+
@_builtins.property
|
|
76
|
+
@pulumi.getter
|
|
77
|
+
def value(self) -> pulumi.Input[_builtins.str]:
|
|
90
78
|
"""
|
|
91
|
-
The
|
|
79
|
+
The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
92
80
|
"""
|
|
93
|
-
|
|
94
|
-
pulumi.log.warn("""application_object_id is deprecated: The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""")
|
|
95
|
-
|
|
96
|
-
return pulumi.get(self, "application_object_id")
|
|
81
|
+
return pulumi.get(self, "value")
|
|
97
82
|
|
|
98
|
-
@
|
|
99
|
-
def
|
|
100
|
-
pulumi.set(self, "
|
|
83
|
+
@value.setter
|
|
84
|
+
def value(self, value: pulumi.Input[_builtins.str]):
|
|
85
|
+
pulumi.set(self, "value", value)
|
|
101
86
|
|
|
102
|
-
@property
|
|
87
|
+
@_builtins.property
|
|
103
88
|
@pulumi.getter
|
|
104
|
-
def encoding(self) -> Optional[pulumi.Input[str]]:
|
|
89
|
+
def encoding(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
105
90
|
"""
|
|
106
91
|
Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
107
92
|
|
|
@@ -110,24 +95,25 @@ class ApplicationCertificateArgs:
|
|
|
110
95
|
return pulumi.get(self, "encoding")
|
|
111
96
|
|
|
112
97
|
@encoding.setter
|
|
113
|
-
def encoding(self, value: Optional[pulumi.Input[str]]):
|
|
98
|
+
def encoding(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
114
99
|
pulumi.set(self, "encoding", value)
|
|
115
100
|
|
|
116
|
-
@property
|
|
101
|
+
@_builtins.property
|
|
117
102
|
@pulumi.getter(name="endDate")
|
|
118
|
-
def end_date(self) -> Optional[pulumi.Input[str]]:
|
|
103
|
+
def end_date(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
119
104
|
"""
|
|
120
105
|
The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
121
106
|
"""
|
|
122
107
|
return pulumi.get(self, "end_date")
|
|
123
108
|
|
|
124
109
|
@end_date.setter
|
|
125
|
-
def end_date(self, value: Optional[pulumi.Input[str]]):
|
|
110
|
+
def end_date(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
126
111
|
pulumi.set(self, "end_date", value)
|
|
127
112
|
|
|
128
|
-
@property
|
|
113
|
+
@_builtins.property
|
|
129
114
|
@pulumi.getter(name="endDateRelative")
|
|
130
|
-
|
|
115
|
+
@_utilities.deprecated("""The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""")
|
|
116
|
+
def end_date_relative(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
131
117
|
"""
|
|
132
118
|
A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
133
119
|
|
|
@@ -136,85 +122,81 @@ class ApplicationCertificateArgs:
|
|
|
136
122
|
return pulumi.get(self, "end_date_relative")
|
|
137
123
|
|
|
138
124
|
@end_date_relative.setter
|
|
139
|
-
def end_date_relative(self, value: Optional[pulumi.Input[str]]):
|
|
125
|
+
def end_date_relative(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
140
126
|
pulumi.set(self, "end_date_relative", value)
|
|
141
127
|
|
|
142
|
-
@property
|
|
128
|
+
@_builtins.property
|
|
143
129
|
@pulumi.getter(name="keyId")
|
|
144
|
-
def key_id(self) -> Optional[pulumi.Input[str]]:
|
|
130
|
+
def key_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
145
131
|
"""
|
|
146
132
|
A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
147
133
|
"""
|
|
148
134
|
return pulumi.get(self, "key_id")
|
|
149
135
|
|
|
150
136
|
@key_id.setter
|
|
151
|
-
def key_id(self, value: Optional[pulumi.Input[str]]):
|
|
137
|
+
def key_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
152
138
|
pulumi.set(self, "key_id", value)
|
|
153
139
|
|
|
154
|
-
@property
|
|
140
|
+
@_builtins.property
|
|
155
141
|
@pulumi.getter(name="startDate")
|
|
156
|
-
def start_date(self) -> Optional[pulumi.Input[str]]:
|
|
142
|
+
def start_date(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
157
143
|
"""
|
|
158
144
|
The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
159
145
|
"""
|
|
160
146
|
return pulumi.get(self, "start_date")
|
|
161
147
|
|
|
162
148
|
@start_date.setter
|
|
163
|
-
def start_date(self, value: Optional[pulumi.Input[str]]):
|
|
149
|
+
def start_date(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
164
150
|
pulumi.set(self, "start_date", value)
|
|
165
151
|
|
|
166
|
-
@property
|
|
152
|
+
@_builtins.property
|
|
167
153
|
@pulumi.getter
|
|
168
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
154
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
169
155
|
"""
|
|
170
156
|
The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
171
157
|
"""
|
|
172
158
|
return pulumi.get(self, "type")
|
|
173
159
|
|
|
174
160
|
@type.setter
|
|
175
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
161
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
176
162
|
pulumi.set(self, "type", value)
|
|
177
163
|
|
|
178
164
|
|
|
179
165
|
@pulumi.input_type
|
|
180
166
|
class _ApplicationCertificateState:
|
|
181
167
|
def __init__(__self__, *,
|
|
182
|
-
application_id: Optional[pulumi.Input[str]] = None,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
value: Optional[pulumi.Input[str]] = None):
|
|
168
|
+
application_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
169
|
+
encoding: Optional[pulumi.Input[_builtins.str]] = None,
|
|
170
|
+
end_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
171
|
+
end_date_relative: Optional[pulumi.Input[_builtins.str]] = None,
|
|
172
|
+
key_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
173
|
+
start_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
174
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
175
|
+
value: Optional[pulumi.Input[_builtins.str]] = None):
|
|
191
176
|
"""
|
|
192
177
|
Input properties used for looking up and filtering ApplicationCertificate resources.
|
|
193
|
-
:param pulumi.Input[str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
194
|
-
:param pulumi.Input[str]
|
|
195
|
-
:param pulumi.Input[str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
178
|
+
:param pulumi.Input[_builtins.str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
179
|
+
:param pulumi.Input[_builtins.str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
196
180
|
|
|
197
181
|
> **Tip for Azure Key Vault** The `hex` encoding option is useful for consuming certificate data from the azurerm_key_vault_certificate resource.
|
|
198
|
-
:param pulumi.Input[str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
199
|
-
:param pulumi.Input[str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
182
|
+
:param pulumi.Input[_builtins.str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
183
|
+
:param pulumi.Input[_builtins.str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
200
184
|
|
|
201
185
|
> One of `end_date` or `end_date_relative` must be specified. The maximum allowed duration is determined by Azure AD and is typically around 2 years from the creation date.
|
|
202
|
-
:param pulumi.Input[str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
203
|
-
:param pulumi.Input[str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
204
|
-
:param pulumi.Input[str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
205
|
-
:param pulumi.Input[str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
186
|
+
:param pulumi.Input[_builtins.str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
187
|
+
:param pulumi.Input[_builtins.str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
188
|
+
:param pulumi.Input[_builtins.str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
189
|
+
:param pulumi.Input[_builtins.str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
206
190
|
"""
|
|
207
191
|
if application_id is not None:
|
|
208
192
|
pulumi.set(__self__, "application_id", application_id)
|
|
209
|
-
if application_object_id is not None:
|
|
210
|
-
warnings.warn("""The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""", DeprecationWarning)
|
|
211
|
-
pulumi.log.warn("""application_object_id is deprecated: The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""")
|
|
212
|
-
if application_object_id is not None:
|
|
213
|
-
pulumi.set(__self__, "application_object_id", application_object_id)
|
|
214
193
|
if encoding is not None:
|
|
215
194
|
pulumi.set(__self__, "encoding", encoding)
|
|
216
195
|
if end_date is not None:
|
|
217
196
|
pulumi.set(__self__, "end_date", end_date)
|
|
197
|
+
if end_date_relative is not None:
|
|
198
|
+
warnings.warn("""The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""", DeprecationWarning)
|
|
199
|
+
pulumi.log.warn("""end_date_relative is deprecated: The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""")
|
|
218
200
|
if end_date_relative is not None:
|
|
219
201
|
pulumi.set(__self__, "end_date_relative", end_date_relative)
|
|
220
202
|
if key_id is not None:
|
|
@@ -226,36 +208,21 @@ class _ApplicationCertificateState:
|
|
|
226
208
|
if value is not None:
|
|
227
209
|
pulumi.set(__self__, "value", value)
|
|
228
210
|
|
|
229
|
-
@property
|
|
211
|
+
@_builtins.property
|
|
230
212
|
@pulumi.getter(name="applicationId")
|
|
231
|
-
def application_id(self) -> Optional[pulumi.Input[str]]:
|
|
213
|
+
def application_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
232
214
|
"""
|
|
233
215
|
The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
234
216
|
"""
|
|
235
217
|
return pulumi.get(self, "application_id")
|
|
236
218
|
|
|
237
219
|
@application_id.setter
|
|
238
|
-
def application_id(self, value: Optional[pulumi.Input[str]]):
|
|
220
|
+
def application_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
239
221
|
pulumi.set(self, "application_id", value)
|
|
240
222
|
|
|
241
|
-
@property
|
|
242
|
-
@pulumi.getter(name="applicationObjectId")
|
|
243
|
-
def application_object_id(self) -> Optional[pulumi.Input[str]]:
|
|
244
|
-
"""
|
|
245
|
-
The object ID of the application for which this certificate should be created
|
|
246
|
-
"""
|
|
247
|
-
warnings.warn("""The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""", DeprecationWarning)
|
|
248
|
-
pulumi.log.warn("""application_object_id is deprecated: The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""")
|
|
249
|
-
|
|
250
|
-
return pulumi.get(self, "application_object_id")
|
|
251
|
-
|
|
252
|
-
@application_object_id.setter
|
|
253
|
-
def application_object_id(self, value: Optional[pulumi.Input[str]]):
|
|
254
|
-
pulumi.set(self, "application_object_id", value)
|
|
255
|
-
|
|
256
|
-
@property
|
|
223
|
+
@_builtins.property
|
|
257
224
|
@pulumi.getter
|
|
258
|
-
def encoding(self) -> Optional[pulumi.Input[str]]:
|
|
225
|
+
def encoding(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
259
226
|
"""
|
|
260
227
|
Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
261
228
|
|
|
@@ -264,24 +231,25 @@ class _ApplicationCertificateState:
|
|
|
264
231
|
return pulumi.get(self, "encoding")
|
|
265
232
|
|
|
266
233
|
@encoding.setter
|
|
267
|
-
def encoding(self, value: Optional[pulumi.Input[str]]):
|
|
234
|
+
def encoding(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
268
235
|
pulumi.set(self, "encoding", value)
|
|
269
236
|
|
|
270
|
-
@property
|
|
237
|
+
@_builtins.property
|
|
271
238
|
@pulumi.getter(name="endDate")
|
|
272
|
-
def end_date(self) -> Optional[pulumi.Input[str]]:
|
|
239
|
+
def end_date(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
273
240
|
"""
|
|
274
241
|
The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
275
242
|
"""
|
|
276
243
|
return pulumi.get(self, "end_date")
|
|
277
244
|
|
|
278
245
|
@end_date.setter
|
|
279
|
-
def end_date(self, value: Optional[pulumi.Input[str]]):
|
|
246
|
+
def end_date(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
280
247
|
pulumi.set(self, "end_date", value)
|
|
281
248
|
|
|
282
|
-
@property
|
|
249
|
+
@_builtins.property
|
|
283
250
|
@pulumi.getter(name="endDateRelative")
|
|
284
|
-
|
|
251
|
+
@_utilities.deprecated("""The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""")
|
|
252
|
+
def end_date_relative(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
285
253
|
"""
|
|
286
254
|
A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
287
255
|
|
|
@@ -290,99 +258,190 @@ class _ApplicationCertificateState:
|
|
|
290
258
|
return pulumi.get(self, "end_date_relative")
|
|
291
259
|
|
|
292
260
|
@end_date_relative.setter
|
|
293
|
-
def end_date_relative(self, value: Optional[pulumi.Input[str]]):
|
|
261
|
+
def end_date_relative(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
294
262
|
pulumi.set(self, "end_date_relative", value)
|
|
295
263
|
|
|
296
|
-
@property
|
|
264
|
+
@_builtins.property
|
|
297
265
|
@pulumi.getter(name="keyId")
|
|
298
|
-
def key_id(self) -> Optional[pulumi.Input[str]]:
|
|
266
|
+
def key_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
299
267
|
"""
|
|
300
268
|
A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
301
269
|
"""
|
|
302
270
|
return pulumi.get(self, "key_id")
|
|
303
271
|
|
|
304
272
|
@key_id.setter
|
|
305
|
-
def key_id(self, value: Optional[pulumi.Input[str]]):
|
|
273
|
+
def key_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
306
274
|
pulumi.set(self, "key_id", value)
|
|
307
275
|
|
|
308
|
-
@property
|
|
276
|
+
@_builtins.property
|
|
309
277
|
@pulumi.getter(name="startDate")
|
|
310
|
-
def start_date(self) -> Optional[pulumi.Input[str]]:
|
|
278
|
+
def start_date(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
311
279
|
"""
|
|
312
280
|
The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
313
281
|
"""
|
|
314
282
|
return pulumi.get(self, "start_date")
|
|
315
283
|
|
|
316
284
|
@start_date.setter
|
|
317
|
-
def start_date(self, value: Optional[pulumi.Input[str]]):
|
|
285
|
+
def start_date(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
318
286
|
pulumi.set(self, "start_date", value)
|
|
319
287
|
|
|
320
|
-
@property
|
|
288
|
+
@_builtins.property
|
|
321
289
|
@pulumi.getter
|
|
322
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
290
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
323
291
|
"""
|
|
324
292
|
The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
325
293
|
"""
|
|
326
294
|
return pulumi.get(self, "type")
|
|
327
295
|
|
|
328
296
|
@type.setter
|
|
329
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
297
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
330
298
|
pulumi.set(self, "type", value)
|
|
331
299
|
|
|
332
|
-
@property
|
|
300
|
+
@_builtins.property
|
|
333
301
|
@pulumi.getter
|
|
334
|
-
def value(self) -> Optional[pulumi.Input[str]]:
|
|
302
|
+
def value(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
335
303
|
"""
|
|
336
304
|
The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
337
305
|
"""
|
|
338
306
|
return pulumi.get(self, "value")
|
|
339
307
|
|
|
340
308
|
@value.setter
|
|
341
|
-
def value(self, value: Optional[pulumi.Input[str]]):
|
|
309
|
+
def value(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
342
310
|
pulumi.set(self, "value", value)
|
|
343
311
|
|
|
344
312
|
|
|
313
|
+
@pulumi.type_token("azuread:index/applicationCertificate:ApplicationCertificate")
|
|
345
314
|
class ApplicationCertificate(pulumi.CustomResource):
|
|
346
315
|
@overload
|
|
347
316
|
def __init__(__self__,
|
|
348
317
|
resource_name: str,
|
|
349
318
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
350
|
-
application_id: Optional[pulumi.Input[str]] = None,
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
value: Optional[pulumi.Input[str]] = None,
|
|
319
|
+
application_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
320
|
+
encoding: Optional[pulumi.Input[_builtins.str]] = None,
|
|
321
|
+
end_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
322
|
+
end_date_relative: Optional[pulumi.Input[_builtins.str]] = None,
|
|
323
|
+
key_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
324
|
+
start_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
325
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
326
|
+
value: Optional[pulumi.Input[_builtins.str]] = None,
|
|
359
327
|
__props__=None):
|
|
360
328
|
"""
|
|
329
|
+
## Example Usage
|
|
330
|
+
|
|
331
|
+
*Using a PEM certificate*
|
|
332
|
+
|
|
333
|
+
```python
|
|
334
|
+
import pulumi
|
|
335
|
+
import pulumi_azuread as azuread
|
|
336
|
+
import pulumi_std as std
|
|
337
|
+
|
|
338
|
+
example = azuread.ApplicationRegistration("example", display_name="example")
|
|
339
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
340
|
+
application_id=example.id,
|
|
341
|
+
type="AsymmetricX509Cert",
|
|
342
|
+
value=std.file(input="cert.pem").result,
|
|
343
|
+
end_date="2021-05-01T01:02:03Z")
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
*Using a DER certificate*
|
|
347
|
+
|
|
348
|
+
```python
|
|
349
|
+
import pulumi
|
|
350
|
+
import pulumi_azuread as azuread
|
|
351
|
+
import pulumi_std as std
|
|
352
|
+
|
|
353
|
+
example = azuread.ApplicationRegistration("example", display_name="example")
|
|
354
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
355
|
+
application_id=example.id,
|
|
356
|
+
type="AsymmetricX509Cert",
|
|
357
|
+
encoding="base64",
|
|
358
|
+
value=std.base64encode(input=std.file(input="cert.der").result).result,
|
|
359
|
+
end_date="2021-05-01T01:02:03Z")
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Using a certificate from Azure Key Vault
|
|
363
|
+
|
|
364
|
+
```python
|
|
365
|
+
import pulumi
|
|
366
|
+
import pulumi_azuread as azuread
|
|
367
|
+
import pulumi_azurerm as azurerm
|
|
368
|
+
|
|
369
|
+
example_application = azuread.Application("example", display_name="example")
|
|
370
|
+
example = azurerm.index.KeyVaultCertificate("example",
|
|
371
|
+
name=generated-cert,
|
|
372
|
+
key_vault_id=example_azurerm_key_vault.id,
|
|
373
|
+
certificate_policy=[{
|
|
374
|
+
issuerParameters: [{
|
|
375
|
+
name: Self,
|
|
376
|
+
}],
|
|
377
|
+
keyProperties: [{
|
|
378
|
+
exportable: True,
|
|
379
|
+
keySize: 2048,
|
|
380
|
+
keyType: RSA,
|
|
381
|
+
reuseKey: True,
|
|
382
|
+
}],
|
|
383
|
+
lifetimeAction: [{
|
|
384
|
+
action: [{
|
|
385
|
+
actionType: AutoRenew,
|
|
386
|
+
}],
|
|
387
|
+
trigger: [{
|
|
388
|
+
daysBeforeExpiry: 30,
|
|
389
|
+
}],
|
|
390
|
+
}],
|
|
391
|
+
secretProperties: [{
|
|
392
|
+
contentType: application/x-pkcs12,
|
|
393
|
+
}],
|
|
394
|
+
x509CertificateProperties: [{
|
|
395
|
+
extendedKeyUsage: [1.3.6.1.5.5.7.3.2],
|
|
396
|
+
keyUsage: [
|
|
397
|
+
dataEncipherment,
|
|
398
|
+
digitalSignature,
|
|
399
|
+
keyCertSign,
|
|
400
|
+
keyEncipherment,
|
|
401
|
+
],
|
|
402
|
+
subjectAlternativeNames: [{
|
|
403
|
+
dnsNames: [
|
|
404
|
+
internal.contoso.com,
|
|
405
|
+
domain.hello.world,
|
|
406
|
+
],
|
|
407
|
+
}],
|
|
408
|
+
subject: fCN={example_application.name},
|
|
409
|
+
validityInMonths: 12,
|
|
410
|
+
}],
|
|
411
|
+
}])
|
|
412
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
413
|
+
application_id=example_application.id,
|
|
414
|
+
type="AsymmetricX509Cert",
|
|
415
|
+
encoding="hex",
|
|
416
|
+
value=example["certificateData"],
|
|
417
|
+
end_date=example["certificateAttribute"][0]["expires"],
|
|
418
|
+
start_date=example["certificateAttribute"][0]["notBefore"])
|
|
419
|
+
```
|
|
420
|
+
|
|
361
421
|
## Import
|
|
362
422
|
|
|
363
423
|
Certificates can be imported using the object ID of the associated application and the key ID of the certificate credential, e.g.
|
|
364
424
|
|
|
365
425
|
```sh
|
|
366
|
-
|
|
426
|
+
$ pulumi import azuread:index/applicationCertificate:ApplicationCertificate example 00000000-0000-0000-0000-000000000000/certificate/11111111-1111-1111-1111-111111111111
|
|
367
427
|
```
|
|
368
428
|
|
|
369
|
-
|
|
429
|
+
-> This ID format is unique to Terraform and is composed of the application's object ID, the string "certificate" and the certificate's key ID in the format `{ObjectId}/certificate/{CertificateKeyId}`.
|
|
370
430
|
|
|
371
431
|
:param str resource_name: The name of the resource.
|
|
372
432
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
373
|
-
:param pulumi.Input[str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
374
|
-
:param pulumi.Input[str]
|
|
375
|
-
:param pulumi.Input[str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
433
|
+
:param pulumi.Input[_builtins.str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
434
|
+
:param pulumi.Input[_builtins.str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
376
435
|
|
|
377
436
|
> **Tip for Azure Key Vault** The `hex` encoding option is useful for consuming certificate data from the azurerm_key_vault_certificate resource.
|
|
378
|
-
:param pulumi.Input[str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
379
|
-
:param pulumi.Input[str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
437
|
+
:param pulumi.Input[_builtins.str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
438
|
+
:param pulumi.Input[_builtins.str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
380
439
|
|
|
381
440
|
> One of `end_date` or `end_date_relative` must be specified. The maximum allowed duration is determined by Azure AD and is typically around 2 years from the creation date.
|
|
382
|
-
:param pulumi.Input[str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
383
|
-
:param pulumi.Input[str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
384
|
-
:param pulumi.Input[str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
385
|
-
:param pulumi.Input[str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
441
|
+
:param pulumi.Input[_builtins.str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
442
|
+
:param pulumi.Input[_builtins.str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
443
|
+
:param pulumi.Input[_builtins.str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
444
|
+
:param pulumi.Input[_builtins.str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
386
445
|
"""
|
|
387
446
|
...
|
|
388
447
|
@overload
|
|
@@ -391,15 +450,107 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
391
450
|
args: ApplicationCertificateArgs,
|
|
392
451
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
393
452
|
"""
|
|
453
|
+
## Example Usage
|
|
454
|
+
|
|
455
|
+
*Using a PEM certificate*
|
|
456
|
+
|
|
457
|
+
```python
|
|
458
|
+
import pulumi
|
|
459
|
+
import pulumi_azuread as azuread
|
|
460
|
+
import pulumi_std as std
|
|
461
|
+
|
|
462
|
+
example = azuread.ApplicationRegistration("example", display_name="example")
|
|
463
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
464
|
+
application_id=example.id,
|
|
465
|
+
type="AsymmetricX509Cert",
|
|
466
|
+
value=std.file(input="cert.pem").result,
|
|
467
|
+
end_date="2021-05-01T01:02:03Z")
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
*Using a DER certificate*
|
|
471
|
+
|
|
472
|
+
```python
|
|
473
|
+
import pulumi
|
|
474
|
+
import pulumi_azuread as azuread
|
|
475
|
+
import pulumi_std as std
|
|
476
|
+
|
|
477
|
+
example = azuread.ApplicationRegistration("example", display_name="example")
|
|
478
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
479
|
+
application_id=example.id,
|
|
480
|
+
type="AsymmetricX509Cert",
|
|
481
|
+
encoding="base64",
|
|
482
|
+
value=std.base64encode(input=std.file(input="cert.der").result).result,
|
|
483
|
+
end_date="2021-05-01T01:02:03Z")
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Using a certificate from Azure Key Vault
|
|
487
|
+
|
|
488
|
+
```python
|
|
489
|
+
import pulumi
|
|
490
|
+
import pulumi_azuread as azuread
|
|
491
|
+
import pulumi_azurerm as azurerm
|
|
492
|
+
|
|
493
|
+
example_application = azuread.Application("example", display_name="example")
|
|
494
|
+
example = azurerm.index.KeyVaultCertificate("example",
|
|
495
|
+
name=generated-cert,
|
|
496
|
+
key_vault_id=example_azurerm_key_vault.id,
|
|
497
|
+
certificate_policy=[{
|
|
498
|
+
issuerParameters: [{
|
|
499
|
+
name: Self,
|
|
500
|
+
}],
|
|
501
|
+
keyProperties: [{
|
|
502
|
+
exportable: True,
|
|
503
|
+
keySize: 2048,
|
|
504
|
+
keyType: RSA,
|
|
505
|
+
reuseKey: True,
|
|
506
|
+
}],
|
|
507
|
+
lifetimeAction: [{
|
|
508
|
+
action: [{
|
|
509
|
+
actionType: AutoRenew,
|
|
510
|
+
}],
|
|
511
|
+
trigger: [{
|
|
512
|
+
daysBeforeExpiry: 30,
|
|
513
|
+
}],
|
|
514
|
+
}],
|
|
515
|
+
secretProperties: [{
|
|
516
|
+
contentType: application/x-pkcs12,
|
|
517
|
+
}],
|
|
518
|
+
x509CertificateProperties: [{
|
|
519
|
+
extendedKeyUsage: [1.3.6.1.5.5.7.3.2],
|
|
520
|
+
keyUsage: [
|
|
521
|
+
dataEncipherment,
|
|
522
|
+
digitalSignature,
|
|
523
|
+
keyCertSign,
|
|
524
|
+
keyEncipherment,
|
|
525
|
+
],
|
|
526
|
+
subjectAlternativeNames: [{
|
|
527
|
+
dnsNames: [
|
|
528
|
+
internal.contoso.com,
|
|
529
|
+
domain.hello.world,
|
|
530
|
+
],
|
|
531
|
+
}],
|
|
532
|
+
subject: fCN={example_application.name},
|
|
533
|
+
validityInMonths: 12,
|
|
534
|
+
}],
|
|
535
|
+
}])
|
|
536
|
+
example_application_certificate = azuread.ApplicationCertificate("example",
|
|
537
|
+
application_id=example_application.id,
|
|
538
|
+
type="AsymmetricX509Cert",
|
|
539
|
+
encoding="hex",
|
|
540
|
+
value=example["certificateData"],
|
|
541
|
+
end_date=example["certificateAttribute"][0]["expires"],
|
|
542
|
+
start_date=example["certificateAttribute"][0]["notBefore"])
|
|
543
|
+
```
|
|
544
|
+
|
|
394
545
|
## Import
|
|
395
546
|
|
|
396
547
|
Certificates can be imported using the object ID of the associated application and the key ID of the certificate credential, e.g.
|
|
397
548
|
|
|
398
549
|
```sh
|
|
399
|
-
|
|
550
|
+
$ pulumi import azuread:index/applicationCertificate:ApplicationCertificate example 00000000-0000-0000-0000-000000000000/certificate/11111111-1111-1111-1111-111111111111
|
|
400
551
|
```
|
|
401
552
|
|
|
402
|
-
|
|
553
|
+
-> This ID format is unique to Terraform and is composed of the application's object ID, the string "certificate" and the certificate's key ID in the format `{ObjectId}/certificate/{CertificateKeyId}`.
|
|
403
554
|
|
|
404
555
|
:param str resource_name: The name of the resource.
|
|
405
556
|
:param ApplicationCertificateArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -416,15 +567,14 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
416
567
|
def _internal_init(__self__,
|
|
417
568
|
resource_name: str,
|
|
418
569
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
419
|
-
application_id: Optional[pulumi.Input[str]] = None,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
value: Optional[pulumi.Input[str]] = None,
|
|
570
|
+
application_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
571
|
+
encoding: Optional[pulumi.Input[_builtins.str]] = None,
|
|
572
|
+
end_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
573
|
+
end_date_relative: Optional[pulumi.Input[_builtins.str]] = None,
|
|
574
|
+
key_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
575
|
+
start_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
576
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
577
|
+
value: Optional[pulumi.Input[_builtins.str]] = None,
|
|
428
578
|
__props__=None):
|
|
429
579
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
430
580
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -434,8 +584,9 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
434
584
|
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
435
585
|
__props__ = ApplicationCertificateArgs.__new__(ApplicationCertificateArgs)
|
|
436
586
|
|
|
587
|
+
if application_id is None and not opts.urn:
|
|
588
|
+
raise TypeError("Missing required property 'application_id'")
|
|
437
589
|
__props__.__dict__["application_id"] = application_id
|
|
438
|
-
__props__.__dict__["application_object_id"] = application_object_id
|
|
439
590
|
__props__.__dict__["encoding"] = encoding
|
|
440
591
|
__props__.__dict__["end_date"] = end_date
|
|
441
592
|
__props__.__dict__["end_date_relative"] = end_date_relative
|
|
@@ -457,15 +608,14 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
457
608
|
def get(resource_name: str,
|
|
458
609
|
id: pulumi.Input[str],
|
|
459
610
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
460
|
-
application_id: Optional[pulumi.Input[str]] = None,
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
value: Optional[pulumi.Input[str]] = None) -> 'ApplicationCertificate':
|
|
611
|
+
application_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
612
|
+
encoding: Optional[pulumi.Input[_builtins.str]] = None,
|
|
613
|
+
end_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
614
|
+
end_date_relative: Optional[pulumi.Input[_builtins.str]] = None,
|
|
615
|
+
key_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
616
|
+
start_date: Optional[pulumi.Input[_builtins.str]] = None,
|
|
617
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
618
|
+
value: Optional[pulumi.Input[_builtins.str]] = None) -> 'ApplicationCertificate':
|
|
469
619
|
"""
|
|
470
620
|
Get an existing ApplicationCertificate resource's state with the given name, id, and optional extra
|
|
471
621
|
properties used to qualify the lookup.
|
|
@@ -473,26 +623,24 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
473
623
|
:param str resource_name: The unique name of the resulting resource.
|
|
474
624
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
475
625
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
476
|
-
:param pulumi.Input[str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
477
|
-
:param pulumi.Input[str]
|
|
478
|
-
:param pulumi.Input[str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
626
|
+
:param pulumi.Input[_builtins.str] application_id: The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
627
|
+
:param pulumi.Input[_builtins.str] encoding: Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
479
628
|
|
|
480
629
|
> **Tip for Azure Key Vault** The `hex` encoding option is useful for consuming certificate data from the azurerm_key_vault_certificate resource.
|
|
481
|
-
:param pulumi.Input[str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
482
|
-
:param pulumi.Input[str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
630
|
+
:param pulumi.Input[_builtins.str] end_date: The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
631
|
+
:param pulumi.Input[_builtins.str] end_date_relative: A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
483
632
|
|
|
484
633
|
> One of `end_date` or `end_date_relative` must be specified. The maximum allowed duration is determined by Azure AD and is typically around 2 years from the creation date.
|
|
485
|
-
:param pulumi.Input[str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
486
|
-
:param pulumi.Input[str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
487
|
-
:param pulumi.Input[str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
488
|
-
:param pulumi.Input[str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
634
|
+
:param pulumi.Input[_builtins.str] key_id: A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
635
|
+
:param pulumi.Input[_builtins.str] start_date: The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
636
|
+
:param pulumi.Input[_builtins.str] type: The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
637
|
+
:param pulumi.Input[_builtins.str] value: The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
489
638
|
"""
|
|
490
639
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
491
640
|
|
|
492
641
|
__props__ = _ApplicationCertificateState.__new__(_ApplicationCertificateState)
|
|
493
642
|
|
|
494
643
|
__props__.__dict__["application_id"] = application_id
|
|
495
|
-
__props__.__dict__["application_object_id"] = application_object_id
|
|
496
644
|
__props__.__dict__["encoding"] = encoding
|
|
497
645
|
__props__.__dict__["end_date"] = end_date
|
|
498
646
|
__props__.__dict__["end_date_relative"] = end_date_relative
|
|
@@ -502,28 +650,17 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
502
650
|
__props__.__dict__["value"] = value
|
|
503
651
|
return ApplicationCertificate(resource_name, opts=opts, __props__=__props__)
|
|
504
652
|
|
|
505
|
-
@property
|
|
653
|
+
@_builtins.property
|
|
506
654
|
@pulumi.getter(name="applicationId")
|
|
507
|
-
def application_id(self) -> pulumi.Output[str]:
|
|
655
|
+
def application_id(self) -> pulumi.Output[_builtins.str]:
|
|
508
656
|
"""
|
|
509
657
|
The resource ID of the application for which this certificate should be created. Changing this field forces a new resource to be created.
|
|
510
658
|
"""
|
|
511
659
|
return pulumi.get(self, "application_id")
|
|
512
660
|
|
|
513
|
-
@property
|
|
514
|
-
@pulumi.getter(name="applicationObjectId")
|
|
515
|
-
def application_object_id(self) -> pulumi.Output[str]:
|
|
516
|
-
"""
|
|
517
|
-
The object ID of the application for which this certificate should be created
|
|
518
|
-
"""
|
|
519
|
-
warnings.warn("""The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""", DeprecationWarning)
|
|
520
|
-
pulumi.log.warn("""application_object_id is deprecated: The `application_object_id` property has been replaced with the `application_id` property and will be removed in version 3.0 of the AzureAD provider""")
|
|
521
|
-
|
|
522
|
-
return pulumi.get(self, "application_object_id")
|
|
523
|
-
|
|
524
|
-
@property
|
|
661
|
+
@_builtins.property
|
|
525
662
|
@pulumi.getter
|
|
526
|
-
def encoding(self) -> pulumi.Output[Optional[str]]:
|
|
663
|
+
def encoding(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
527
664
|
"""
|
|
528
665
|
Specifies the encoding used for the supplied certificate data. Must be one of `pem`, `base64` or `hex`. Defaults to `pem`.
|
|
529
666
|
|
|
@@ -531,17 +668,18 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
531
668
|
"""
|
|
532
669
|
return pulumi.get(self, "encoding")
|
|
533
670
|
|
|
534
|
-
@property
|
|
671
|
+
@_builtins.property
|
|
535
672
|
@pulumi.getter(name="endDate")
|
|
536
|
-
def end_date(self) -> pulumi.Output[str]:
|
|
673
|
+
def end_date(self) -> pulumi.Output[_builtins.str]:
|
|
537
674
|
"""
|
|
538
675
|
The end date until which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If omitted, the API will decide a suitable expiry date, which is typically around 2 years from the start date. Changing this field forces a new resource to be created.
|
|
539
676
|
"""
|
|
540
677
|
return pulumi.get(self, "end_date")
|
|
541
678
|
|
|
542
|
-
@property
|
|
679
|
+
@_builtins.property
|
|
543
680
|
@pulumi.getter(name="endDateRelative")
|
|
544
|
-
|
|
681
|
+
@_utilities.deprecated("""The `end_date_relative` property is deprecated and will be removed in a future version of the AzureAD provider. Please instead use the Terraform `timeadd()` function to calculate a value for the `end_date` property.""")
|
|
682
|
+
def end_date_relative(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
545
683
|
"""
|
|
546
684
|
A relative duration for which the certificate is valid until, for example `240h` (10 days) or `2400h30m`. Changing this field forces a new resource to be created.
|
|
547
685
|
|
|
@@ -549,33 +687,33 @@ class ApplicationCertificate(pulumi.CustomResource):
|
|
|
549
687
|
"""
|
|
550
688
|
return pulumi.get(self, "end_date_relative")
|
|
551
689
|
|
|
552
|
-
@property
|
|
690
|
+
@_builtins.property
|
|
553
691
|
@pulumi.getter(name="keyId")
|
|
554
|
-
def key_id(self) -> pulumi.Output[str]:
|
|
692
|
+
def key_id(self) -> pulumi.Output[_builtins.str]:
|
|
555
693
|
"""
|
|
556
694
|
A UUID used to uniquely identify this certificate. If omitted, a random UUID will be automatically generated. Changing this field forces a new resource to be created.
|
|
557
695
|
"""
|
|
558
696
|
return pulumi.get(self, "key_id")
|
|
559
697
|
|
|
560
|
-
@property
|
|
698
|
+
@_builtins.property
|
|
561
699
|
@pulumi.getter(name="startDate")
|
|
562
|
-
def start_date(self) -> pulumi.Output[str]:
|
|
700
|
+
def start_date(self) -> pulumi.Output[_builtins.str]:
|
|
563
701
|
"""
|
|
564
702
|
The start date from which the certificate is valid, formatted as an RFC3339 date string (e.g. `2018-01-01T01:02:03Z`). If this isn't specified, the value is determined by Azure Active Directory and is usually the start date of the certificate for asymmetric keys, or the current timestamp for symmetric keys. Changing this field forces a new resource to be created.
|
|
565
703
|
"""
|
|
566
704
|
return pulumi.get(self, "start_date")
|
|
567
705
|
|
|
568
|
-
@property
|
|
706
|
+
@_builtins.property
|
|
569
707
|
@pulumi.getter
|
|
570
|
-
def type(self) -> pulumi.Output[Optional[str]]:
|
|
708
|
+
def type(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
571
709
|
"""
|
|
572
710
|
The type of key/certificate. Must be one of `AsymmetricX509Cert` or `Symmetric`. Changing this fields forces a new resource to be created.
|
|
573
711
|
"""
|
|
574
712
|
return pulumi.get(self, "type")
|
|
575
713
|
|
|
576
|
-
@property
|
|
714
|
+
@_builtins.property
|
|
577
715
|
@pulumi.getter
|
|
578
|
-
def value(self) -> pulumi.Output[str]:
|
|
716
|
+
def value(self) -> pulumi.Output[_builtins.str]:
|
|
579
717
|
"""
|
|
580
718
|
The certificate data, which can be PEM encoded, base64 encoded DER or hexadecimal encoded DER. See also the `encoding` argument.
|
|
581
719
|
"""
|