pulumi-newrelic 5.53.0a1758684614__py3-none-any.whl → 5.54.0__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.
- pulumi_newrelic/__init__.py +8 -0
- pulumi_newrelic/_inputs.py +45 -45
- pulumi_newrelic/cloud/__init__.py +1 -0
- pulumi_newrelic/cloud/oci_link_account.py +980 -0
- pulumi_newrelic/outputs.py +30 -30
- pulumi_newrelic/pulumi-plugin.json +1 -1
- {pulumi_newrelic-5.53.0a1758684614.dist-info → pulumi_newrelic-5.54.0.dist-info}/METADATA +1 -1
- {pulumi_newrelic-5.53.0a1758684614.dist-info → pulumi_newrelic-5.54.0.dist-info}/RECORD +10 -9
- {pulumi_newrelic-5.53.0a1758684614.dist-info → pulumi_newrelic-5.54.0.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.53.0a1758684614.dist-info → pulumi_newrelic-5.54.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,980 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
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__ = ['OciLinkAccountArgs', 'OciLinkAccount']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class OciLinkAccountArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
compartment_ocid: pulumi.Input[_builtins.str],
|
|
23
|
+
oci_client_id: pulumi.Input[_builtins.str],
|
|
24
|
+
oci_client_secret: pulumi.Input[_builtins.str],
|
|
25
|
+
oci_domain_url: pulumi.Input[_builtins.str],
|
|
26
|
+
oci_home_region: pulumi.Input[_builtins.str],
|
|
27
|
+
oci_svc_user_name: pulumi.Input[_builtins.str],
|
|
28
|
+
tenant_id: pulumi.Input[_builtins.str],
|
|
29
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
30
|
+
ingest_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
31
|
+
instrumentation_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
32
|
+
logging_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
33
|
+
metric_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
34
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
35
|
+
oci_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
36
|
+
user_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None):
|
|
37
|
+
"""
|
|
38
|
+
The set of arguments for constructing a OciLinkAccount resource.
|
|
39
|
+
:param pulumi.Input[_builtins.str] compartment_ocid: OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
40
|
+
:param pulumi.Input[_builtins.str] oci_client_id: OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
41
|
+
:param pulumi.Input[_builtins.str] oci_client_secret: OAuth2 client secret. Not displayed in plans or state outputs.
|
|
42
|
+
:param pulumi.Input[_builtins.str] oci_domain_url: Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
43
|
+
:param pulumi.Input[_builtins.str] oci_home_region: Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
44
|
+
:param pulumi.Input[_builtins.str] oci_svc_user_name: Service user name associated with the WIF configuration.
|
|
45
|
+
:param pulumi.Input[_builtins.str] tenant_id: OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
46
|
+
:param pulumi.Input[_builtins.str] account_id: New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
47
|
+
:param pulumi.Input[_builtins.str] ingest_vault_ocid: Vault secret OCID containing an ingest secret.
|
|
48
|
+
:param pulumi.Input[_builtins.str] instrumentation_type: Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
49
|
+
:param pulumi.Input[_builtins.str] logging_stack_ocid: The Logging stack identifier for the OCI account.
|
|
50
|
+
:param pulumi.Input[_builtins.str] metric_stack_ocid: Metric stack OCID (ignored on create, applied on update).
|
|
51
|
+
:param pulumi.Input[_builtins.str] name: Display name for the linked account.
|
|
52
|
+
:param pulumi.Input[_builtins.str] oci_region: OCI region for the linkage (ignored on create, applied on update).
|
|
53
|
+
:param pulumi.Input[_builtins.str] user_vault_ocid: Vault secret OCID containing a user or auxiliary secret.
|
|
54
|
+
"""
|
|
55
|
+
pulumi.set(__self__, "compartment_ocid", compartment_ocid)
|
|
56
|
+
pulumi.set(__self__, "oci_client_id", oci_client_id)
|
|
57
|
+
pulumi.set(__self__, "oci_client_secret", oci_client_secret)
|
|
58
|
+
pulumi.set(__self__, "oci_domain_url", oci_domain_url)
|
|
59
|
+
pulumi.set(__self__, "oci_home_region", oci_home_region)
|
|
60
|
+
pulumi.set(__self__, "oci_svc_user_name", oci_svc_user_name)
|
|
61
|
+
pulumi.set(__self__, "tenant_id", tenant_id)
|
|
62
|
+
if account_id is not None:
|
|
63
|
+
pulumi.set(__self__, "account_id", account_id)
|
|
64
|
+
if ingest_vault_ocid is not None:
|
|
65
|
+
pulumi.set(__self__, "ingest_vault_ocid", ingest_vault_ocid)
|
|
66
|
+
if instrumentation_type is not None:
|
|
67
|
+
pulumi.set(__self__, "instrumentation_type", instrumentation_type)
|
|
68
|
+
if logging_stack_ocid is not None:
|
|
69
|
+
pulumi.set(__self__, "logging_stack_ocid", logging_stack_ocid)
|
|
70
|
+
if metric_stack_ocid is not None:
|
|
71
|
+
pulumi.set(__self__, "metric_stack_ocid", metric_stack_ocid)
|
|
72
|
+
if name is not None:
|
|
73
|
+
pulumi.set(__self__, "name", name)
|
|
74
|
+
if oci_region is not None:
|
|
75
|
+
pulumi.set(__self__, "oci_region", oci_region)
|
|
76
|
+
if user_vault_ocid is not None:
|
|
77
|
+
pulumi.set(__self__, "user_vault_ocid", user_vault_ocid)
|
|
78
|
+
|
|
79
|
+
@_builtins.property
|
|
80
|
+
@pulumi.getter(name="compartmentOcid")
|
|
81
|
+
def compartment_ocid(self) -> pulumi.Input[_builtins.str]:
|
|
82
|
+
"""
|
|
83
|
+
OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
84
|
+
"""
|
|
85
|
+
return pulumi.get(self, "compartment_ocid")
|
|
86
|
+
|
|
87
|
+
@compartment_ocid.setter
|
|
88
|
+
def compartment_ocid(self, value: pulumi.Input[_builtins.str]):
|
|
89
|
+
pulumi.set(self, "compartment_ocid", value)
|
|
90
|
+
|
|
91
|
+
@_builtins.property
|
|
92
|
+
@pulumi.getter(name="ociClientId")
|
|
93
|
+
def oci_client_id(self) -> pulumi.Input[_builtins.str]:
|
|
94
|
+
"""
|
|
95
|
+
OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
96
|
+
"""
|
|
97
|
+
return pulumi.get(self, "oci_client_id")
|
|
98
|
+
|
|
99
|
+
@oci_client_id.setter
|
|
100
|
+
def oci_client_id(self, value: pulumi.Input[_builtins.str]):
|
|
101
|
+
pulumi.set(self, "oci_client_id", value)
|
|
102
|
+
|
|
103
|
+
@_builtins.property
|
|
104
|
+
@pulumi.getter(name="ociClientSecret")
|
|
105
|
+
def oci_client_secret(self) -> pulumi.Input[_builtins.str]:
|
|
106
|
+
"""
|
|
107
|
+
OAuth2 client secret. Not displayed in plans or state outputs.
|
|
108
|
+
"""
|
|
109
|
+
return pulumi.get(self, "oci_client_secret")
|
|
110
|
+
|
|
111
|
+
@oci_client_secret.setter
|
|
112
|
+
def oci_client_secret(self, value: pulumi.Input[_builtins.str]):
|
|
113
|
+
pulumi.set(self, "oci_client_secret", value)
|
|
114
|
+
|
|
115
|
+
@_builtins.property
|
|
116
|
+
@pulumi.getter(name="ociDomainUrl")
|
|
117
|
+
def oci_domain_url(self) -> pulumi.Input[_builtins.str]:
|
|
118
|
+
"""
|
|
119
|
+
Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
120
|
+
"""
|
|
121
|
+
return pulumi.get(self, "oci_domain_url")
|
|
122
|
+
|
|
123
|
+
@oci_domain_url.setter
|
|
124
|
+
def oci_domain_url(self, value: pulumi.Input[_builtins.str]):
|
|
125
|
+
pulumi.set(self, "oci_domain_url", value)
|
|
126
|
+
|
|
127
|
+
@_builtins.property
|
|
128
|
+
@pulumi.getter(name="ociHomeRegion")
|
|
129
|
+
def oci_home_region(self) -> pulumi.Input[_builtins.str]:
|
|
130
|
+
"""
|
|
131
|
+
Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
132
|
+
"""
|
|
133
|
+
return pulumi.get(self, "oci_home_region")
|
|
134
|
+
|
|
135
|
+
@oci_home_region.setter
|
|
136
|
+
def oci_home_region(self, value: pulumi.Input[_builtins.str]):
|
|
137
|
+
pulumi.set(self, "oci_home_region", value)
|
|
138
|
+
|
|
139
|
+
@_builtins.property
|
|
140
|
+
@pulumi.getter(name="ociSvcUserName")
|
|
141
|
+
def oci_svc_user_name(self) -> pulumi.Input[_builtins.str]:
|
|
142
|
+
"""
|
|
143
|
+
Service user name associated with the WIF configuration.
|
|
144
|
+
"""
|
|
145
|
+
return pulumi.get(self, "oci_svc_user_name")
|
|
146
|
+
|
|
147
|
+
@oci_svc_user_name.setter
|
|
148
|
+
def oci_svc_user_name(self, value: pulumi.Input[_builtins.str]):
|
|
149
|
+
pulumi.set(self, "oci_svc_user_name", value)
|
|
150
|
+
|
|
151
|
+
@_builtins.property
|
|
152
|
+
@pulumi.getter(name="tenantId")
|
|
153
|
+
def tenant_id(self) -> pulumi.Input[_builtins.str]:
|
|
154
|
+
"""
|
|
155
|
+
OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
156
|
+
"""
|
|
157
|
+
return pulumi.get(self, "tenant_id")
|
|
158
|
+
|
|
159
|
+
@tenant_id.setter
|
|
160
|
+
def tenant_id(self, value: pulumi.Input[_builtins.str]):
|
|
161
|
+
pulumi.set(self, "tenant_id", value)
|
|
162
|
+
|
|
163
|
+
@_builtins.property
|
|
164
|
+
@pulumi.getter(name="accountId")
|
|
165
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
166
|
+
"""
|
|
167
|
+
New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
168
|
+
"""
|
|
169
|
+
return pulumi.get(self, "account_id")
|
|
170
|
+
|
|
171
|
+
@account_id.setter
|
|
172
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
173
|
+
pulumi.set(self, "account_id", value)
|
|
174
|
+
|
|
175
|
+
@_builtins.property
|
|
176
|
+
@pulumi.getter(name="ingestVaultOcid")
|
|
177
|
+
def ingest_vault_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
178
|
+
"""
|
|
179
|
+
Vault secret OCID containing an ingest secret.
|
|
180
|
+
"""
|
|
181
|
+
return pulumi.get(self, "ingest_vault_ocid")
|
|
182
|
+
|
|
183
|
+
@ingest_vault_ocid.setter
|
|
184
|
+
def ingest_vault_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
185
|
+
pulumi.set(self, "ingest_vault_ocid", value)
|
|
186
|
+
|
|
187
|
+
@_builtins.property
|
|
188
|
+
@pulumi.getter(name="instrumentationType")
|
|
189
|
+
def instrumentation_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
190
|
+
"""
|
|
191
|
+
Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
192
|
+
"""
|
|
193
|
+
return pulumi.get(self, "instrumentation_type")
|
|
194
|
+
|
|
195
|
+
@instrumentation_type.setter
|
|
196
|
+
def instrumentation_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
197
|
+
pulumi.set(self, "instrumentation_type", value)
|
|
198
|
+
|
|
199
|
+
@_builtins.property
|
|
200
|
+
@pulumi.getter(name="loggingStackOcid")
|
|
201
|
+
def logging_stack_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
202
|
+
"""
|
|
203
|
+
The Logging stack identifier for the OCI account.
|
|
204
|
+
"""
|
|
205
|
+
return pulumi.get(self, "logging_stack_ocid")
|
|
206
|
+
|
|
207
|
+
@logging_stack_ocid.setter
|
|
208
|
+
def logging_stack_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
209
|
+
pulumi.set(self, "logging_stack_ocid", value)
|
|
210
|
+
|
|
211
|
+
@_builtins.property
|
|
212
|
+
@pulumi.getter(name="metricStackOcid")
|
|
213
|
+
def metric_stack_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
214
|
+
"""
|
|
215
|
+
Metric stack OCID (ignored on create, applied on update).
|
|
216
|
+
"""
|
|
217
|
+
return pulumi.get(self, "metric_stack_ocid")
|
|
218
|
+
|
|
219
|
+
@metric_stack_ocid.setter
|
|
220
|
+
def metric_stack_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
221
|
+
pulumi.set(self, "metric_stack_ocid", value)
|
|
222
|
+
|
|
223
|
+
@_builtins.property
|
|
224
|
+
@pulumi.getter
|
|
225
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
226
|
+
"""
|
|
227
|
+
Display name for the linked account.
|
|
228
|
+
"""
|
|
229
|
+
return pulumi.get(self, "name")
|
|
230
|
+
|
|
231
|
+
@name.setter
|
|
232
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
233
|
+
pulumi.set(self, "name", value)
|
|
234
|
+
|
|
235
|
+
@_builtins.property
|
|
236
|
+
@pulumi.getter(name="ociRegion")
|
|
237
|
+
def oci_region(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
238
|
+
"""
|
|
239
|
+
OCI region for the linkage (ignored on create, applied on update).
|
|
240
|
+
"""
|
|
241
|
+
return pulumi.get(self, "oci_region")
|
|
242
|
+
|
|
243
|
+
@oci_region.setter
|
|
244
|
+
def oci_region(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
245
|
+
pulumi.set(self, "oci_region", value)
|
|
246
|
+
|
|
247
|
+
@_builtins.property
|
|
248
|
+
@pulumi.getter(name="userVaultOcid")
|
|
249
|
+
def user_vault_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
250
|
+
"""
|
|
251
|
+
Vault secret OCID containing a user or auxiliary secret.
|
|
252
|
+
"""
|
|
253
|
+
return pulumi.get(self, "user_vault_ocid")
|
|
254
|
+
|
|
255
|
+
@user_vault_ocid.setter
|
|
256
|
+
def user_vault_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
257
|
+
pulumi.set(self, "user_vault_ocid", value)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
@pulumi.input_type
|
|
261
|
+
class _OciLinkAccountState:
|
|
262
|
+
def __init__(__self__, *,
|
|
263
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
264
|
+
compartment_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
265
|
+
ingest_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
266
|
+
instrumentation_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
267
|
+
logging_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
268
|
+
metric_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
269
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
270
|
+
oci_client_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
271
|
+
oci_client_secret: Optional[pulumi.Input[_builtins.str]] = None,
|
|
272
|
+
oci_domain_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
273
|
+
oci_home_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
274
|
+
oci_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
275
|
+
oci_svc_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
276
|
+
tenant_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
277
|
+
user_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None):
|
|
278
|
+
"""
|
|
279
|
+
Input properties used for looking up and filtering OciLinkAccount resources.
|
|
280
|
+
:param pulumi.Input[_builtins.str] account_id: New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
281
|
+
:param pulumi.Input[_builtins.str] compartment_ocid: OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
282
|
+
:param pulumi.Input[_builtins.str] ingest_vault_ocid: Vault secret OCID containing an ingest secret.
|
|
283
|
+
:param pulumi.Input[_builtins.str] instrumentation_type: Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
284
|
+
:param pulumi.Input[_builtins.str] logging_stack_ocid: The Logging stack identifier for the OCI account.
|
|
285
|
+
:param pulumi.Input[_builtins.str] metric_stack_ocid: Metric stack OCID (ignored on create, applied on update).
|
|
286
|
+
:param pulumi.Input[_builtins.str] name: Display name for the linked account.
|
|
287
|
+
:param pulumi.Input[_builtins.str] oci_client_id: OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
288
|
+
:param pulumi.Input[_builtins.str] oci_client_secret: OAuth2 client secret. Not displayed in plans or state outputs.
|
|
289
|
+
:param pulumi.Input[_builtins.str] oci_domain_url: Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
290
|
+
:param pulumi.Input[_builtins.str] oci_home_region: Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
291
|
+
:param pulumi.Input[_builtins.str] oci_region: OCI region for the linkage (ignored on create, applied on update).
|
|
292
|
+
:param pulumi.Input[_builtins.str] oci_svc_user_name: Service user name associated with the WIF configuration.
|
|
293
|
+
:param pulumi.Input[_builtins.str] tenant_id: OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
294
|
+
:param pulumi.Input[_builtins.str] user_vault_ocid: Vault secret OCID containing a user or auxiliary secret.
|
|
295
|
+
"""
|
|
296
|
+
if account_id is not None:
|
|
297
|
+
pulumi.set(__self__, "account_id", account_id)
|
|
298
|
+
if compartment_ocid is not None:
|
|
299
|
+
pulumi.set(__self__, "compartment_ocid", compartment_ocid)
|
|
300
|
+
if ingest_vault_ocid is not None:
|
|
301
|
+
pulumi.set(__self__, "ingest_vault_ocid", ingest_vault_ocid)
|
|
302
|
+
if instrumentation_type is not None:
|
|
303
|
+
pulumi.set(__self__, "instrumentation_type", instrumentation_type)
|
|
304
|
+
if logging_stack_ocid is not None:
|
|
305
|
+
pulumi.set(__self__, "logging_stack_ocid", logging_stack_ocid)
|
|
306
|
+
if metric_stack_ocid is not None:
|
|
307
|
+
pulumi.set(__self__, "metric_stack_ocid", metric_stack_ocid)
|
|
308
|
+
if name is not None:
|
|
309
|
+
pulumi.set(__self__, "name", name)
|
|
310
|
+
if oci_client_id is not None:
|
|
311
|
+
pulumi.set(__self__, "oci_client_id", oci_client_id)
|
|
312
|
+
if oci_client_secret is not None:
|
|
313
|
+
pulumi.set(__self__, "oci_client_secret", oci_client_secret)
|
|
314
|
+
if oci_domain_url is not None:
|
|
315
|
+
pulumi.set(__self__, "oci_domain_url", oci_domain_url)
|
|
316
|
+
if oci_home_region is not None:
|
|
317
|
+
pulumi.set(__self__, "oci_home_region", oci_home_region)
|
|
318
|
+
if oci_region is not None:
|
|
319
|
+
pulumi.set(__self__, "oci_region", oci_region)
|
|
320
|
+
if oci_svc_user_name is not None:
|
|
321
|
+
pulumi.set(__self__, "oci_svc_user_name", oci_svc_user_name)
|
|
322
|
+
if tenant_id is not None:
|
|
323
|
+
pulumi.set(__self__, "tenant_id", tenant_id)
|
|
324
|
+
if user_vault_ocid is not None:
|
|
325
|
+
pulumi.set(__self__, "user_vault_ocid", user_vault_ocid)
|
|
326
|
+
|
|
327
|
+
@_builtins.property
|
|
328
|
+
@pulumi.getter(name="accountId")
|
|
329
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
330
|
+
"""
|
|
331
|
+
New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
332
|
+
"""
|
|
333
|
+
return pulumi.get(self, "account_id")
|
|
334
|
+
|
|
335
|
+
@account_id.setter
|
|
336
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
337
|
+
pulumi.set(self, "account_id", value)
|
|
338
|
+
|
|
339
|
+
@_builtins.property
|
|
340
|
+
@pulumi.getter(name="compartmentOcid")
|
|
341
|
+
def compartment_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
342
|
+
"""
|
|
343
|
+
OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
344
|
+
"""
|
|
345
|
+
return pulumi.get(self, "compartment_ocid")
|
|
346
|
+
|
|
347
|
+
@compartment_ocid.setter
|
|
348
|
+
def compartment_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
349
|
+
pulumi.set(self, "compartment_ocid", value)
|
|
350
|
+
|
|
351
|
+
@_builtins.property
|
|
352
|
+
@pulumi.getter(name="ingestVaultOcid")
|
|
353
|
+
def ingest_vault_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
354
|
+
"""
|
|
355
|
+
Vault secret OCID containing an ingest secret.
|
|
356
|
+
"""
|
|
357
|
+
return pulumi.get(self, "ingest_vault_ocid")
|
|
358
|
+
|
|
359
|
+
@ingest_vault_ocid.setter
|
|
360
|
+
def ingest_vault_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
361
|
+
pulumi.set(self, "ingest_vault_ocid", value)
|
|
362
|
+
|
|
363
|
+
@_builtins.property
|
|
364
|
+
@pulumi.getter(name="instrumentationType")
|
|
365
|
+
def instrumentation_type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
366
|
+
"""
|
|
367
|
+
Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
368
|
+
"""
|
|
369
|
+
return pulumi.get(self, "instrumentation_type")
|
|
370
|
+
|
|
371
|
+
@instrumentation_type.setter
|
|
372
|
+
def instrumentation_type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
373
|
+
pulumi.set(self, "instrumentation_type", value)
|
|
374
|
+
|
|
375
|
+
@_builtins.property
|
|
376
|
+
@pulumi.getter(name="loggingStackOcid")
|
|
377
|
+
def logging_stack_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
378
|
+
"""
|
|
379
|
+
The Logging stack identifier for the OCI account.
|
|
380
|
+
"""
|
|
381
|
+
return pulumi.get(self, "logging_stack_ocid")
|
|
382
|
+
|
|
383
|
+
@logging_stack_ocid.setter
|
|
384
|
+
def logging_stack_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
385
|
+
pulumi.set(self, "logging_stack_ocid", value)
|
|
386
|
+
|
|
387
|
+
@_builtins.property
|
|
388
|
+
@pulumi.getter(name="metricStackOcid")
|
|
389
|
+
def metric_stack_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
390
|
+
"""
|
|
391
|
+
Metric stack OCID (ignored on create, applied on update).
|
|
392
|
+
"""
|
|
393
|
+
return pulumi.get(self, "metric_stack_ocid")
|
|
394
|
+
|
|
395
|
+
@metric_stack_ocid.setter
|
|
396
|
+
def metric_stack_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
397
|
+
pulumi.set(self, "metric_stack_ocid", value)
|
|
398
|
+
|
|
399
|
+
@_builtins.property
|
|
400
|
+
@pulumi.getter
|
|
401
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
402
|
+
"""
|
|
403
|
+
Display name for the linked account.
|
|
404
|
+
"""
|
|
405
|
+
return pulumi.get(self, "name")
|
|
406
|
+
|
|
407
|
+
@name.setter
|
|
408
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
409
|
+
pulumi.set(self, "name", value)
|
|
410
|
+
|
|
411
|
+
@_builtins.property
|
|
412
|
+
@pulumi.getter(name="ociClientId")
|
|
413
|
+
def oci_client_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
414
|
+
"""
|
|
415
|
+
OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
416
|
+
"""
|
|
417
|
+
return pulumi.get(self, "oci_client_id")
|
|
418
|
+
|
|
419
|
+
@oci_client_id.setter
|
|
420
|
+
def oci_client_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
421
|
+
pulumi.set(self, "oci_client_id", value)
|
|
422
|
+
|
|
423
|
+
@_builtins.property
|
|
424
|
+
@pulumi.getter(name="ociClientSecret")
|
|
425
|
+
def oci_client_secret(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
426
|
+
"""
|
|
427
|
+
OAuth2 client secret. Not displayed in plans or state outputs.
|
|
428
|
+
"""
|
|
429
|
+
return pulumi.get(self, "oci_client_secret")
|
|
430
|
+
|
|
431
|
+
@oci_client_secret.setter
|
|
432
|
+
def oci_client_secret(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
433
|
+
pulumi.set(self, "oci_client_secret", value)
|
|
434
|
+
|
|
435
|
+
@_builtins.property
|
|
436
|
+
@pulumi.getter(name="ociDomainUrl")
|
|
437
|
+
def oci_domain_url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
438
|
+
"""
|
|
439
|
+
Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
440
|
+
"""
|
|
441
|
+
return pulumi.get(self, "oci_domain_url")
|
|
442
|
+
|
|
443
|
+
@oci_domain_url.setter
|
|
444
|
+
def oci_domain_url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
445
|
+
pulumi.set(self, "oci_domain_url", value)
|
|
446
|
+
|
|
447
|
+
@_builtins.property
|
|
448
|
+
@pulumi.getter(name="ociHomeRegion")
|
|
449
|
+
def oci_home_region(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
450
|
+
"""
|
|
451
|
+
Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
452
|
+
"""
|
|
453
|
+
return pulumi.get(self, "oci_home_region")
|
|
454
|
+
|
|
455
|
+
@oci_home_region.setter
|
|
456
|
+
def oci_home_region(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
457
|
+
pulumi.set(self, "oci_home_region", value)
|
|
458
|
+
|
|
459
|
+
@_builtins.property
|
|
460
|
+
@pulumi.getter(name="ociRegion")
|
|
461
|
+
def oci_region(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
462
|
+
"""
|
|
463
|
+
OCI region for the linkage (ignored on create, applied on update).
|
|
464
|
+
"""
|
|
465
|
+
return pulumi.get(self, "oci_region")
|
|
466
|
+
|
|
467
|
+
@oci_region.setter
|
|
468
|
+
def oci_region(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
469
|
+
pulumi.set(self, "oci_region", value)
|
|
470
|
+
|
|
471
|
+
@_builtins.property
|
|
472
|
+
@pulumi.getter(name="ociSvcUserName")
|
|
473
|
+
def oci_svc_user_name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
474
|
+
"""
|
|
475
|
+
Service user name associated with the WIF configuration.
|
|
476
|
+
"""
|
|
477
|
+
return pulumi.get(self, "oci_svc_user_name")
|
|
478
|
+
|
|
479
|
+
@oci_svc_user_name.setter
|
|
480
|
+
def oci_svc_user_name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
481
|
+
pulumi.set(self, "oci_svc_user_name", value)
|
|
482
|
+
|
|
483
|
+
@_builtins.property
|
|
484
|
+
@pulumi.getter(name="tenantId")
|
|
485
|
+
def tenant_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
486
|
+
"""
|
|
487
|
+
OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
488
|
+
"""
|
|
489
|
+
return pulumi.get(self, "tenant_id")
|
|
490
|
+
|
|
491
|
+
@tenant_id.setter
|
|
492
|
+
def tenant_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
493
|
+
pulumi.set(self, "tenant_id", value)
|
|
494
|
+
|
|
495
|
+
@_builtins.property
|
|
496
|
+
@pulumi.getter(name="userVaultOcid")
|
|
497
|
+
def user_vault_ocid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
498
|
+
"""
|
|
499
|
+
Vault secret OCID containing a user or auxiliary secret.
|
|
500
|
+
"""
|
|
501
|
+
return pulumi.get(self, "user_vault_ocid")
|
|
502
|
+
|
|
503
|
+
@user_vault_ocid.setter
|
|
504
|
+
def user_vault_ocid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
505
|
+
pulumi.set(self, "user_vault_ocid", value)
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
@pulumi.type_token("newrelic:cloud/ociLinkAccount:OciLinkAccount")
|
|
509
|
+
class OciLinkAccount(pulumi.CustomResource):
|
|
510
|
+
@overload
|
|
511
|
+
def __init__(__self__,
|
|
512
|
+
resource_name: str,
|
|
513
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
514
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
515
|
+
compartment_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
516
|
+
ingest_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
517
|
+
instrumentation_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
518
|
+
logging_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
519
|
+
metric_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
520
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
521
|
+
oci_client_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
522
|
+
oci_client_secret: Optional[pulumi.Input[_builtins.str]] = None,
|
|
523
|
+
oci_domain_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
524
|
+
oci_home_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
525
|
+
oci_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
526
|
+
oci_svc_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
527
|
+
tenant_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
528
|
+
user_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
529
|
+
__props__=None):
|
|
530
|
+
"""
|
|
531
|
+
Use this resource to link an Oracle Cloud Infrastructure (OCI) account to New Relic.
|
|
532
|
+
|
|
533
|
+
This setup is used to create a provider account with OCI credentials, establishing a relationship between Oracle and New Relic. Additionally, as part of this integration, we store WIF (Workload Identity Federation) credentials which are further used for fetching data and validations, and vault OCIDs corresponding to the vault resource where the New Relic ingest and user keys are stored in the OCI console.
|
|
534
|
+
|
|
535
|
+
## Prerequisites
|
|
536
|
+
|
|
537
|
+
For the `cloud.OciLinkAccount` resource to work properly, you need an OCI tenancy with IAM permissions to create and manage the identity artifacts (client/application, secrets, compartments, and service user) referenced below. OCI provides enterprise-grade cloud services across multiple global regions.
|
|
538
|
+
|
|
539
|
+
> NOTE: Before using this resource, ensure the New Relic provider is configured with valid credentials.\\
|
|
540
|
+
See Getting Started: New Relic provider guide
|
|
541
|
+
|
|
542
|
+
If you encounter issues or bugs, please open an issue in the GitHub repository.
|
|
543
|
+
|
|
544
|
+
### Workload Identity Federation (WIF) Attributes
|
|
545
|
+
|
|
546
|
+
The following arguments rely on an OCI Identity Domain OAuth2 client set up for workload identity federation (identity propagation): `oci_client_id`, `oci_client_secret`, `oci_domain_url`, and `oci_svc_user_name`.
|
|
547
|
+
|
|
548
|
+
To create and retrieve these values, follow Oracle's guidance for configuring identity propagation / JWT token exchange:
|
|
549
|
+
|
|
550
|
+
[Oracle documentation: Create an identity propagation trust (JWT token exchange)](https://docs.oracle.com/en-us/iaas/Content/Identity/api-getstarted/json_web_token_exchange.htm#jwt_token_exchange__create-identity-propagation-trust)
|
|
551
|
+
|
|
552
|
+
WIF configuration steps:
|
|
553
|
+
1. Create (or identify) an Identity Domain and register an OAuth2 confidential application (client) to represent New Relic ingestion.
|
|
554
|
+
2. Generate / record the client ID (`oci_client_id`) and client secret (`oci_client_secret`). Store the secret securely (e.g., in OCI Vault; reference its OCID via `ingest_vault_ocid` / `user_vault_ocid` if desired).
|
|
555
|
+
3. Use the Identity Domain base URL as `oci_domain_url` (format: `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
556
|
+
4. Provide / map a service user (or principal) used for workload identity federation as `oci_svc_user_name`.
|
|
557
|
+
5. Ensure the client has the required scopes and the tenancy policies allow the token exchange.
|
|
558
|
+
|
|
559
|
+
> TIP: Rotating the OAuth2 client secret only requires updating `oci_client_secret`; it does not force resource replacement.
|
|
560
|
+
|
|
561
|
+
## Example Usage
|
|
562
|
+
|
|
563
|
+
Minimal example (required arguments for creation):
|
|
564
|
+
|
|
565
|
+
```python
|
|
566
|
+
import pulumi
|
|
567
|
+
import pulumi_newrelic as newrelic
|
|
568
|
+
|
|
569
|
+
example = newrelic.cloud.OciLinkAccount("example",
|
|
570
|
+
account_id="1234567",
|
|
571
|
+
tenant_id="ocid1.tenancy.oc1..aaaaaaaaexample",
|
|
572
|
+
name="my-oci-link",
|
|
573
|
+
compartment_ocid="ocid1.compartment.oc1..bbbbbbbbexample",
|
|
574
|
+
oci_client_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
575
|
+
oci_client_secret=oci_client_secret,
|
|
576
|
+
oci_domain_url="https://idcs-1234567890abcdef.identity.oraclecloud.com",
|
|
577
|
+
oci_home_region="us-ashburn-1",
|
|
578
|
+
oci_svc_user_name="svc-newrelic-collector")
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
Example including optional secret references and update-only fields:
|
|
582
|
+
|
|
583
|
+
```python
|
|
584
|
+
import pulumi
|
|
585
|
+
import pulumi_newrelic as newrelic
|
|
586
|
+
|
|
587
|
+
full = newrelic.cloud.OciLinkAccount("full",
|
|
588
|
+
name="my-oci-link-full",
|
|
589
|
+
tenant_id="ocid1.tenancy.oc1..aaaaaaaaexample",
|
|
590
|
+
compartment_ocid="ocid1.compartment.oc1..bbbbbbbbexample",
|
|
591
|
+
oci_client_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
592
|
+
oci_client_secret=oci_client_secret,
|
|
593
|
+
oci_domain_url="https://idcs-1234567890abcdef.identity.oraclecloud.com",
|
|
594
|
+
oci_home_region="us-ashburn-1",
|
|
595
|
+
oci_svc_user_name="svc-newrelic-collector",
|
|
596
|
+
ingest_vault_ocid="ocid1.vaultsecret.oc1..ccccccccexample",
|
|
597
|
+
user_vault_ocid="ocid1.vaultsecret.oc1..ddddddddexample",
|
|
598
|
+
instrumentation_type="METRICS,LOGS",
|
|
599
|
+
oci_region="us-phoenix-1",
|
|
600
|
+
metric_stack_ocid="ocid1.stack.oc1..eeeeeeeeexample",
|
|
601
|
+
logging_stack_ocid="ocid1.stack.oc1..ffffffloggingstack")
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
## Import
|
|
605
|
+
|
|
606
|
+
Linked OCI accounts can be imported using the `id`, e.g.
|
|
607
|
+
|
|
608
|
+
bash
|
|
609
|
+
|
|
610
|
+
```sh
|
|
611
|
+
$ pulumi import newrelic:cloud/ociLinkAccount:OciLinkAccount foo <id>
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
:param str resource_name: The name of the resource.
|
|
615
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
616
|
+
:param pulumi.Input[_builtins.str] account_id: New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
617
|
+
:param pulumi.Input[_builtins.str] compartment_ocid: OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
618
|
+
:param pulumi.Input[_builtins.str] ingest_vault_ocid: Vault secret OCID containing an ingest secret.
|
|
619
|
+
:param pulumi.Input[_builtins.str] instrumentation_type: Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
620
|
+
:param pulumi.Input[_builtins.str] logging_stack_ocid: The Logging stack identifier for the OCI account.
|
|
621
|
+
:param pulumi.Input[_builtins.str] metric_stack_ocid: Metric stack OCID (ignored on create, applied on update).
|
|
622
|
+
:param pulumi.Input[_builtins.str] name: Display name for the linked account.
|
|
623
|
+
:param pulumi.Input[_builtins.str] oci_client_id: OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
624
|
+
:param pulumi.Input[_builtins.str] oci_client_secret: OAuth2 client secret. Not displayed in plans or state outputs.
|
|
625
|
+
:param pulumi.Input[_builtins.str] oci_domain_url: Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
626
|
+
:param pulumi.Input[_builtins.str] oci_home_region: Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
627
|
+
:param pulumi.Input[_builtins.str] oci_region: OCI region for the linkage (ignored on create, applied on update).
|
|
628
|
+
:param pulumi.Input[_builtins.str] oci_svc_user_name: Service user name associated with the WIF configuration.
|
|
629
|
+
:param pulumi.Input[_builtins.str] tenant_id: OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
630
|
+
:param pulumi.Input[_builtins.str] user_vault_ocid: Vault secret OCID containing a user or auxiliary secret.
|
|
631
|
+
"""
|
|
632
|
+
...
|
|
633
|
+
@overload
|
|
634
|
+
def __init__(__self__,
|
|
635
|
+
resource_name: str,
|
|
636
|
+
args: OciLinkAccountArgs,
|
|
637
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
638
|
+
"""
|
|
639
|
+
Use this resource to link an Oracle Cloud Infrastructure (OCI) account to New Relic.
|
|
640
|
+
|
|
641
|
+
This setup is used to create a provider account with OCI credentials, establishing a relationship between Oracle and New Relic. Additionally, as part of this integration, we store WIF (Workload Identity Federation) credentials which are further used for fetching data and validations, and vault OCIDs corresponding to the vault resource where the New Relic ingest and user keys are stored in the OCI console.
|
|
642
|
+
|
|
643
|
+
## Prerequisites
|
|
644
|
+
|
|
645
|
+
For the `cloud.OciLinkAccount` resource to work properly, you need an OCI tenancy with IAM permissions to create and manage the identity artifacts (client/application, secrets, compartments, and service user) referenced below. OCI provides enterprise-grade cloud services across multiple global regions.
|
|
646
|
+
|
|
647
|
+
> NOTE: Before using this resource, ensure the New Relic provider is configured with valid credentials.\\
|
|
648
|
+
See Getting Started: New Relic provider guide
|
|
649
|
+
|
|
650
|
+
If you encounter issues or bugs, please open an issue in the GitHub repository.
|
|
651
|
+
|
|
652
|
+
### Workload Identity Federation (WIF) Attributes
|
|
653
|
+
|
|
654
|
+
The following arguments rely on an OCI Identity Domain OAuth2 client set up for workload identity federation (identity propagation): `oci_client_id`, `oci_client_secret`, `oci_domain_url`, and `oci_svc_user_name`.
|
|
655
|
+
|
|
656
|
+
To create and retrieve these values, follow Oracle's guidance for configuring identity propagation / JWT token exchange:
|
|
657
|
+
|
|
658
|
+
[Oracle documentation: Create an identity propagation trust (JWT token exchange)](https://docs.oracle.com/en-us/iaas/Content/Identity/api-getstarted/json_web_token_exchange.htm#jwt_token_exchange__create-identity-propagation-trust)
|
|
659
|
+
|
|
660
|
+
WIF configuration steps:
|
|
661
|
+
1. Create (or identify) an Identity Domain and register an OAuth2 confidential application (client) to represent New Relic ingestion.
|
|
662
|
+
2. Generate / record the client ID (`oci_client_id`) and client secret (`oci_client_secret`). Store the secret securely (e.g., in OCI Vault; reference its OCID via `ingest_vault_ocid` / `user_vault_ocid` if desired).
|
|
663
|
+
3. Use the Identity Domain base URL as `oci_domain_url` (format: `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
664
|
+
4. Provide / map a service user (or principal) used for workload identity federation as `oci_svc_user_name`.
|
|
665
|
+
5. Ensure the client has the required scopes and the tenancy policies allow the token exchange.
|
|
666
|
+
|
|
667
|
+
> TIP: Rotating the OAuth2 client secret only requires updating `oci_client_secret`; it does not force resource replacement.
|
|
668
|
+
|
|
669
|
+
## Example Usage
|
|
670
|
+
|
|
671
|
+
Minimal example (required arguments for creation):
|
|
672
|
+
|
|
673
|
+
```python
|
|
674
|
+
import pulumi
|
|
675
|
+
import pulumi_newrelic as newrelic
|
|
676
|
+
|
|
677
|
+
example = newrelic.cloud.OciLinkAccount("example",
|
|
678
|
+
account_id="1234567",
|
|
679
|
+
tenant_id="ocid1.tenancy.oc1..aaaaaaaaexample",
|
|
680
|
+
name="my-oci-link",
|
|
681
|
+
compartment_ocid="ocid1.compartment.oc1..bbbbbbbbexample",
|
|
682
|
+
oci_client_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
683
|
+
oci_client_secret=oci_client_secret,
|
|
684
|
+
oci_domain_url="https://idcs-1234567890abcdef.identity.oraclecloud.com",
|
|
685
|
+
oci_home_region="us-ashburn-1",
|
|
686
|
+
oci_svc_user_name="svc-newrelic-collector")
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
Example including optional secret references and update-only fields:
|
|
690
|
+
|
|
691
|
+
```python
|
|
692
|
+
import pulumi
|
|
693
|
+
import pulumi_newrelic as newrelic
|
|
694
|
+
|
|
695
|
+
full = newrelic.cloud.OciLinkAccount("full",
|
|
696
|
+
name="my-oci-link-full",
|
|
697
|
+
tenant_id="ocid1.tenancy.oc1..aaaaaaaaexample",
|
|
698
|
+
compartment_ocid="ocid1.compartment.oc1..bbbbbbbbexample",
|
|
699
|
+
oci_client_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
700
|
+
oci_client_secret=oci_client_secret,
|
|
701
|
+
oci_domain_url="https://idcs-1234567890abcdef.identity.oraclecloud.com",
|
|
702
|
+
oci_home_region="us-ashburn-1",
|
|
703
|
+
oci_svc_user_name="svc-newrelic-collector",
|
|
704
|
+
ingest_vault_ocid="ocid1.vaultsecret.oc1..ccccccccexample",
|
|
705
|
+
user_vault_ocid="ocid1.vaultsecret.oc1..ddddddddexample",
|
|
706
|
+
instrumentation_type="METRICS,LOGS",
|
|
707
|
+
oci_region="us-phoenix-1",
|
|
708
|
+
metric_stack_ocid="ocid1.stack.oc1..eeeeeeeeexample",
|
|
709
|
+
logging_stack_ocid="ocid1.stack.oc1..ffffffloggingstack")
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
## Import
|
|
713
|
+
|
|
714
|
+
Linked OCI accounts can be imported using the `id`, e.g.
|
|
715
|
+
|
|
716
|
+
bash
|
|
717
|
+
|
|
718
|
+
```sh
|
|
719
|
+
$ pulumi import newrelic:cloud/ociLinkAccount:OciLinkAccount foo <id>
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
:param str resource_name: The name of the resource.
|
|
723
|
+
:param OciLinkAccountArgs args: The arguments to use to populate this resource's properties.
|
|
724
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
725
|
+
"""
|
|
726
|
+
...
|
|
727
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
728
|
+
resource_args, opts = _utilities.get_resource_args_opts(OciLinkAccountArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
729
|
+
if resource_args is not None:
|
|
730
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
731
|
+
else:
|
|
732
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
733
|
+
|
|
734
|
+
def _internal_init(__self__,
|
|
735
|
+
resource_name: str,
|
|
736
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
737
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
738
|
+
compartment_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
739
|
+
ingest_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
740
|
+
instrumentation_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
741
|
+
logging_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
742
|
+
metric_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
743
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
744
|
+
oci_client_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
745
|
+
oci_client_secret: Optional[pulumi.Input[_builtins.str]] = None,
|
|
746
|
+
oci_domain_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
747
|
+
oci_home_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
748
|
+
oci_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
749
|
+
oci_svc_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
750
|
+
tenant_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
751
|
+
user_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
752
|
+
__props__=None):
|
|
753
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
754
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
755
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
756
|
+
if opts.id is None:
|
|
757
|
+
if __props__ is not None:
|
|
758
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
759
|
+
__props__ = OciLinkAccountArgs.__new__(OciLinkAccountArgs)
|
|
760
|
+
|
|
761
|
+
__props__.__dict__["account_id"] = account_id
|
|
762
|
+
if compartment_ocid is None and not opts.urn:
|
|
763
|
+
raise TypeError("Missing required property 'compartment_ocid'")
|
|
764
|
+
__props__.__dict__["compartment_ocid"] = compartment_ocid
|
|
765
|
+
__props__.__dict__["ingest_vault_ocid"] = ingest_vault_ocid
|
|
766
|
+
__props__.__dict__["instrumentation_type"] = instrumentation_type
|
|
767
|
+
__props__.__dict__["logging_stack_ocid"] = logging_stack_ocid
|
|
768
|
+
__props__.__dict__["metric_stack_ocid"] = metric_stack_ocid
|
|
769
|
+
__props__.__dict__["name"] = name
|
|
770
|
+
if oci_client_id is None and not opts.urn:
|
|
771
|
+
raise TypeError("Missing required property 'oci_client_id'")
|
|
772
|
+
__props__.__dict__["oci_client_id"] = oci_client_id
|
|
773
|
+
if oci_client_secret is None and not opts.urn:
|
|
774
|
+
raise TypeError("Missing required property 'oci_client_secret'")
|
|
775
|
+
__props__.__dict__["oci_client_secret"] = None if oci_client_secret is None else pulumi.Output.secret(oci_client_secret)
|
|
776
|
+
if oci_domain_url is None and not opts.urn:
|
|
777
|
+
raise TypeError("Missing required property 'oci_domain_url'")
|
|
778
|
+
__props__.__dict__["oci_domain_url"] = oci_domain_url
|
|
779
|
+
if oci_home_region is None and not opts.urn:
|
|
780
|
+
raise TypeError("Missing required property 'oci_home_region'")
|
|
781
|
+
__props__.__dict__["oci_home_region"] = oci_home_region
|
|
782
|
+
__props__.__dict__["oci_region"] = oci_region
|
|
783
|
+
if oci_svc_user_name is None and not opts.urn:
|
|
784
|
+
raise TypeError("Missing required property 'oci_svc_user_name'")
|
|
785
|
+
__props__.__dict__["oci_svc_user_name"] = oci_svc_user_name
|
|
786
|
+
if tenant_id is None and not opts.urn:
|
|
787
|
+
raise TypeError("Missing required property 'tenant_id'")
|
|
788
|
+
__props__.__dict__["tenant_id"] = tenant_id
|
|
789
|
+
__props__.__dict__["user_vault_ocid"] = user_vault_ocid
|
|
790
|
+
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["ociClientSecret"])
|
|
791
|
+
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
|
792
|
+
super(OciLinkAccount, __self__).__init__(
|
|
793
|
+
'newrelic:cloud/ociLinkAccount:OciLinkAccount',
|
|
794
|
+
resource_name,
|
|
795
|
+
__props__,
|
|
796
|
+
opts)
|
|
797
|
+
|
|
798
|
+
@staticmethod
|
|
799
|
+
def get(resource_name: str,
|
|
800
|
+
id: pulumi.Input[str],
|
|
801
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
802
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
803
|
+
compartment_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
804
|
+
ingest_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
805
|
+
instrumentation_type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
806
|
+
logging_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
807
|
+
metric_stack_ocid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
808
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
809
|
+
oci_client_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
810
|
+
oci_client_secret: Optional[pulumi.Input[_builtins.str]] = None,
|
|
811
|
+
oci_domain_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
812
|
+
oci_home_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
813
|
+
oci_region: Optional[pulumi.Input[_builtins.str]] = None,
|
|
814
|
+
oci_svc_user_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
815
|
+
tenant_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
816
|
+
user_vault_ocid: Optional[pulumi.Input[_builtins.str]] = None) -> 'OciLinkAccount':
|
|
817
|
+
"""
|
|
818
|
+
Get an existing OciLinkAccount resource's state with the given name, id, and optional extra
|
|
819
|
+
properties used to qualify the lookup.
|
|
820
|
+
|
|
821
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
822
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
823
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
824
|
+
:param pulumi.Input[_builtins.str] account_id: New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
825
|
+
:param pulumi.Input[_builtins.str] compartment_ocid: OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
826
|
+
:param pulumi.Input[_builtins.str] ingest_vault_ocid: Vault secret OCID containing an ingest secret.
|
|
827
|
+
:param pulumi.Input[_builtins.str] instrumentation_type: Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
828
|
+
:param pulumi.Input[_builtins.str] logging_stack_ocid: The Logging stack identifier for the OCI account.
|
|
829
|
+
:param pulumi.Input[_builtins.str] metric_stack_ocid: Metric stack OCID (ignored on create, applied on update).
|
|
830
|
+
:param pulumi.Input[_builtins.str] name: Display name for the linked account.
|
|
831
|
+
:param pulumi.Input[_builtins.str] oci_client_id: OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
832
|
+
:param pulumi.Input[_builtins.str] oci_client_secret: OAuth2 client secret. Not displayed in plans or state outputs.
|
|
833
|
+
:param pulumi.Input[_builtins.str] oci_domain_url: Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
834
|
+
:param pulumi.Input[_builtins.str] oci_home_region: Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
835
|
+
:param pulumi.Input[_builtins.str] oci_region: OCI region for the linkage (ignored on create, applied on update).
|
|
836
|
+
:param pulumi.Input[_builtins.str] oci_svc_user_name: Service user name associated with the WIF configuration.
|
|
837
|
+
:param pulumi.Input[_builtins.str] tenant_id: OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
838
|
+
:param pulumi.Input[_builtins.str] user_vault_ocid: Vault secret OCID containing a user or auxiliary secret.
|
|
839
|
+
"""
|
|
840
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
841
|
+
|
|
842
|
+
__props__ = _OciLinkAccountState.__new__(_OciLinkAccountState)
|
|
843
|
+
|
|
844
|
+
__props__.__dict__["account_id"] = account_id
|
|
845
|
+
__props__.__dict__["compartment_ocid"] = compartment_ocid
|
|
846
|
+
__props__.__dict__["ingest_vault_ocid"] = ingest_vault_ocid
|
|
847
|
+
__props__.__dict__["instrumentation_type"] = instrumentation_type
|
|
848
|
+
__props__.__dict__["logging_stack_ocid"] = logging_stack_ocid
|
|
849
|
+
__props__.__dict__["metric_stack_ocid"] = metric_stack_ocid
|
|
850
|
+
__props__.__dict__["name"] = name
|
|
851
|
+
__props__.__dict__["oci_client_id"] = oci_client_id
|
|
852
|
+
__props__.__dict__["oci_client_secret"] = oci_client_secret
|
|
853
|
+
__props__.__dict__["oci_domain_url"] = oci_domain_url
|
|
854
|
+
__props__.__dict__["oci_home_region"] = oci_home_region
|
|
855
|
+
__props__.__dict__["oci_region"] = oci_region
|
|
856
|
+
__props__.__dict__["oci_svc_user_name"] = oci_svc_user_name
|
|
857
|
+
__props__.__dict__["tenant_id"] = tenant_id
|
|
858
|
+
__props__.__dict__["user_vault_ocid"] = user_vault_ocid
|
|
859
|
+
return OciLinkAccount(resource_name, opts=opts, __props__=__props__)
|
|
860
|
+
|
|
861
|
+
@_builtins.property
|
|
862
|
+
@pulumi.getter(name="accountId")
|
|
863
|
+
def account_id(self) -> pulumi.Output[_builtins.str]:
|
|
864
|
+
"""
|
|
865
|
+
New Relic account to operate on. Overrides the provider-level `account_id`. If omitted, use the provider default or `NEW_RELIC_ACCOUNT_ID`.
|
|
866
|
+
"""
|
|
867
|
+
return pulumi.get(self, "account_id")
|
|
868
|
+
|
|
869
|
+
@_builtins.property
|
|
870
|
+
@pulumi.getter(name="compartmentOcid")
|
|
871
|
+
def compartment_ocid(self) -> pulumi.Output[_builtins.str]:
|
|
872
|
+
"""
|
|
873
|
+
OCI compartment OCID representing (or containing) the monitored resources/newrelic compartment.
|
|
874
|
+
"""
|
|
875
|
+
return pulumi.get(self, "compartment_ocid")
|
|
876
|
+
|
|
877
|
+
@_builtins.property
|
|
878
|
+
@pulumi.getter(name="ingestVaultOcid")
|
|
879
|
+
def ingest_vault_ocid(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
880
|
+
"""
|
|
881
|
+
Vault secret OCID containing an ingest secret.
|
|
882
|
+
"""
|
|
883
|
+
return pulumi.get(self, "ingest_vault_ocid")
|
|
884
|
+
|
|
885
|
+
@_builtins.property
|
|
886
|
+
@pulumi.getter(name="instrumentationType")
|
|
887
|
+
def instrumentation_type(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
888
|
+
"""
|
|
889
|
+
Specifies the type of integration, such as metrics, logs, or a combination of logs and metrics (e.g., `METRICS`, `LOGS`, `METRICS,LOGS`).
|
|
890
|
+
"""
|
|
891
|
+
return pulumi.get(self, "instrumentation_type")
|
|
892
|
+
|
|
893
|
+
@_builtins.property
|
|
894
|
+
@pulumi.getter(name="loggingStackOcid")
|
|
895
|
+
def logging_stack_ocid(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
896
|
+
"""
|
|
897
|
+
The Logging stack identifier for the OCI account.
|
|
898
|
+
"""
|
|
899
|
+
return pulumi.get(self, "logging_stack_ocid")
|
|
900
|
+
|
|
901
|
+
@_builtins.property
|
|
902
|
+
@pulumi.getter(name="metricStackOcid")
|
|
903
|
+
def metric_stack_ocid(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
904
|
+
"""
|
|
905
|
+
Metric stack OCID (ignored on create, applied on update).
|
|
906
|
+
"""
|
|
907
|
+
return pulumi.get(self, "metric_stack_ocid")
|
|
908
|
+
|
|
909
|
+
@_builtins.property
|
|
910
|
+
@pulumi.getter
|
|
911
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
912
|
+
"""
|
|
913
|
+
Display name for the linked account.
|
|
914
|
+
"""
|
|
915
|
+
return pulumi.get(self, "name")
|
|
916
|
+
|
|
917
|
+
@_builtins.property
|
|
918
|
+
@pulumi.getter(name="ociClientId")
|
|
919
|
+
def oci_client_id(self) -> pulumi.Output[_builtins.str]:
|
|
920
|
+
"""
|
|
921
|
+
OCI Identity Domain (IDCS) OAuth2 client ID used for workload identity federation.
|
|
922
|
+
"""
|
|
923
|
+
return pulumi.get(self, "oci_client_id")
|
|
924
|
+
|
|
925
|
+
@_builtins.property
|
|
926
|
+
@pulumi.getter(name="ociClientSecret")
|
|
927
|
+
def oci_client_secret(self) -> pulumi.Output[_builtins.str]:
|
|
928
|
+
"""
|
|
929
|
+
OAuth2 client secret. Not displayed in plans or state outputs.
|
|
930
|
+
"""
|
|
931
|
+
return pulumi.get(self, "oci_client_secret")
|
|
932
|
+
|
|
933
|
+
@_builtins.property
|
|
934
|
+
@pulumi.getter(name="ociDomainUrl")
|
|
935
|
+
def oci_domain_url(self) -> pulumi.Output[_builtins.str]:
|
|
936
|
+
"""
|
|
937
|
+
Base URL of the OCI Identity Domain (e.g. `https://idcs-<hash>.identity.oraclecloud.com`).
|
|
938
|
+
"""
|
|
939
|
+
return pulumi.get(self, "oci_domain_url")
|
|
940
|
+
|
|
941
|
+
@_builtins.property
|
|
942
|
+
@pulumi.getter(name="ociHomeRegion")
|
|
943
|
+
def oci_home_region(self) -> pulumi.Output[_builtins.str]:
|
|
944
|
+
"""
|
|
945
|
+
Home region of the tenancy (e.g. `us-ashburn-1`).
|
|
946
|
+
"""
|
|
947
|
+
return pulumi.get(self, "oci_home_region")
|
|
948
|
+
|
|
949
|
+
@_builtins.property
|
|
950
|
+
@pulumi.getter(name="ociRegion")
|
|
951
|
+
def oci_region(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
952
|
+
"""
|
|
953
|
+
OCI region for the linkage (ignored on create, applied on update).
|
|
954
|
+
"""
|
|
955
|
+
return pulumi.get(self, "oci_region")
|
|
956
|
+
|
|
957
|
+
@_builtins.property
|
|
958
|
+
@pulumi.getter(name="ociSvcUserName")
|
|
959
|
+
def oci_svc_user_name(self) -> pulumi.Output[_builtins.str]:
|
|
960
|
+
"""
|
|
961
|
+
Service user name associated with the WIF configuration.
|
|
962
|
+
"""
|
|
963
|
+
return pulumi.get(self, "oci_svc_user_name")
|
|
964
|
+
|
|
965
|
+
@_builtins.property
|
|
966
|
+
@pulumi.getter(name="tenantId")
|
|
967
|
+
def tenant_id(self) -> pulumi.Output[_builtins.str]:
|
|
968
|
+
"""
|
|
969
|
+
OCI tenancy OCID (root tenancy). Changing forces a new linked account.
|
|
970
|
+
"""
|
|
971
|
+
return pulumi.get(self, "tenant_id")
|
|
972
|
+
|
|
973
|
+
@_builtins.property
|
|
974
|
+
@pulumi.getter(name="userVaultOcid")
|
|
975
|
+
def user_vault_ocid(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
976
|
+
"""
|
|
977
|
+
Vault secret OCID containing a user or auxiliary secret.
|
|
978
|
+
"""
|
|
979
|
+
return pulumi.get(self, "user_vault_ocid")
|
|
980
|
+
|