pulumi-harness 0.9.0a1760681338__py3-none-any.whl → 0.9.0a1761104282__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-harness might be problematic. Click here for more details.

@@ -69,17 +69,11 @@ class GetPipelineCentralNotificationRuleResult:
69
69
  @_builtins.property
70
70
  @pulumi.getter
71
71
  def account(self) -> _builtins.str:
72
- """
73
- Account identifier associated with this notification channel.
74
- """
75
72
  return pulumi.get(self, "account")
76
73
 
77
74
  @_builtins.property
78
75
  @pulumi.getter
79
76
  def created(self) -> _builtins.int:
80
- """
81
- Timestamp when the notification rule was created.
82
- """
83
77
  return pulumi.get(self, "created")
84
78
 
85
79
  @_builtins.property
@@ -98,17 +92,11 @@ class GetPipelineCentralNotificationRuleResult:
98
92
  @_builtins.property
99
93
  @pulumi.getter
100
94
  def identifier(self) -> _builtins.str:
101
- """
102
- Identifier of the Notification Rule.
103
- """
104
95
  return pulumi.get(self, "identifier")
105
96
 
106
97
  @_builtins.property
107
98
  @pulumi.getter(name="lastModified")
108
99
  def last_modified(self) -> _builtins.int:
109
- """
110
- Timestamp when the notification rule was last modified.
111
- """
112
100
  return pulumi.get(self, "last_modified")
113
101
 
114
102
  @_builtins.property
@@ -129,17 +117,11 @@ class GetPipelineCentralNotificationRuleResult:
129
117
  @_builtins.property
130
118
  @pulumi.getter
131
119
  def org(self) -> Optional[_builtins.str]:
132
- """
133
- Identifier of the organization in which the Notification Rule is configured.
134
- """
135
120
  return pulumi.get(self, "org")
136
121
 
137
122
  @_builtins.property
138
123
  @pulumi.getter
139
124
  def project(self) -> Optional[_builtins.str]:
140
- """
141
- Identifier of the project in which the Notification Rule is configured.
142
- """
143
125
  return pulumi.get(self, "project")
144
126
 
145
127
  @_builtins.property
@@ -179,11 +161,6 @@ def get_pipeline_central_notification_rule(custom_notification_template_ref: Opt
179
161
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPipelineCentralNotificationRuleResult:
180
162
  """
181
163
  Data source for retrieving a Notification Rule.
182
-
183
-
184
- :param _builtins.str identifier: Identifier of the Notification Rule.
185
- :param _builtins.str org: Identifier of the organization in which the Notification Rule is configured.
186
- :param _builtins.str project: Identifier of the project in which the Notification Rule is configured.
187
164
  """
188
165
  __args__ = dict()
189
166
  __args__['customNotificationTemplateRef'] = custom_notification_template_ref
@@ -221,11 +198,6 @@ def get_pipeline_central_notification_rule_output(custom_notification_template_r
221
198
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPipelineCentralNotificationRuleResult]:
222
199
  """
223
200
  Data source for retrieving a Notification Rule.
224
-
225
-
226
- :param _builtins.str identifier: Identifier of the Notification Rule.
227
- :param _builtins.str org: Identifier of the organization in which the Notification Rule is configured.
228
- :param _builtins.str project: Identifier of the project in which the Notification Rule is configured.
229
201
  """
230
202
  __args__ = dict()
231
203
  __args__['customNotificationTemplateRef'] = custom_notification_template_ref
@@ -701,8 +701,6 @@ class GitOpsApplications(pulumi.CustomResource):
701
701
 
702
702
  ## Import
703
703
 
704
- The `pulumi import` command can be used, for example:
705
-
706
704
  Import a Project level Gitops Application
707
705
 
708
706
  ```sh
@@ -791,8 +789,6 @@ class GitOpsApplications(pulumi.CustomResource):
791
789
 
792
790
  ## Import
793
791
 
794
- The `pulumi import` command can be used, for example:
795
-
796
792
  Import a Project level Gitops Application
797
793
 
798
794
  ```sh
@@ -227,14 +227,15 @@ class GitopsApplicationset(pulumi.CustomResource):
227
227
  import pulumi
228
228
  import pulumi_harness as harness
229
229
 
230
- test_fixed = harness.platform.GitopsApplicationset("test_fixed",
230
+ # Example 1: Cluster Generator
231
+ cluster_generator = harness.platform.GitopsApplicationset("cluster_generator",
231
232
  org_id="default",
232
233
  project_id="projectId",
233
234
  agent_id="account.agentuseast1",
234
235
  upsert=True,
235
236
  applicationset={
236
237
  "metadata": {
237
- "name": "tf-appset",
238
+ "name": "cluster-appset",
238
239
  "namespace": "argocd",
239
240
  },
240
241
  "spec": {
@@ -250,7 +251,6 @@ class GitopsApplicationset(pulumi.CustomResource):
250
251
  "name": "{{.name}}-guestbook",
251
252
  "labels": {
252
253
  "env": "dev",
253
- "harness.io/serviceRef": "svc1",
254
254
  },
255
255
  },
256
256
  "spec": {
@@ -268,6 +268,157 @@ class GitopsApplicationset(pulumi.CustomResource):
268
268
  },
269
269
  },
270
270
  })
271
+ # Example 2: List Generator
272
+ list_generator = harness.platform.GitopsApplicationset("list_generator",
273
+ org_id="default",
274
+ project_id="projectId",
275
+ agent_id="account.agentuseast1",
276
+ upsert=True,
277
+ applicationset={
278
+ "metadata": {
279
+ "name": "list-appset",
280
+ },
281
+ "spec": {
282
+ "go_template": True,
283
+ "go_template_options": ["missingkey=error"],
284
+ "generators": [{
285
+ "lists": [{
286
+ "elements": [
287
+ {
288
+ "cluster": "engineering-dev",
289
+ "url": "https://kubernetes.default.svc",
290
+ },
291
+ {
292
+ "cluster": "engineering-prod",
293
+ "url": "https://kubernetes.prod.svc",
294
+ },
295
+ ],
296
+ }],
297
+ }],
298
+ "template": {
299
+ "metadata": {
300
+ "name": "{{.cluster}}-guestbook",
301
+ },
302
+ "spec": {
303
+ "project": "default",
304
+ "sources": [{
305
+ "repo_url": "https://github.com/argoproj/argocd-example-apps.git",
306
+ "path": "helm-guestbook",
307
+ "target_revision": "HEAD",
308
+ }],
309
+ "destination": {
310
+ "server": "{{.url}}",
311
+ "namespace": "default",
312
+ },
313
+ },
314
+ },
315
+ },
316
+ })
317
+ # Example 3: Git Generator with Files
318
+ git_files = harness.platform.GitopsApplicationset("git_files",
319
+ org_id="default",
320
+ project_id="projectId",
321
+ agent_id="account.agentuseast1",
322
+ upsert=True,
323
+ applicationset={
324
+ "metadata": {
325
+ "name": "git-files-appset",
326
+ },
327
+ "spec": {
328
+ "generators": [{
329
+ "gits": [{
330
+ "repo_url": "https://github.com/example/config-repo",
331
+ "revision": "main",
332
+ "files": [{
333
+ "path": "apps/*/config.json",
334
+ }],
335
+ }],
336
+ }],
337
+ "template": {
338
+ "metadata": {
339
+ "name": "{{.path.basename}}-app",
340
+ },
341
+ "spec": {
342
+ "project": "default",
343
+ "sources": [{
344
+ "repo_url": "https://github.com/example/app-repo",
345
+ "path": "{{.path.path}}",
346
+ "target_revision": "main",
347
+ }],
348
+ "destination": {
349
+ "server": "https://kubernetes.default.svc",
350
+ "namespace": "{{.path.basename}}",
351
+ },
352
+ },
353
+ },
354
+ },
355
+ })
356
+ # Example 4: Git Generator with Directories
357
+ git_directories = harness.platform.GitopsApplicationset("git_directories",
358
+ org_id="default",
359
+ project_id="projectId",
360
+ agent_id="account.agentuseast1",
361
+ upsert=True,
362
+ applicationset={
363
+ "metadata": {
364
+ "name": "git-directories-appset",
365
+ },
366
+ "spec": {
367
+ "generators": [{
368
+ "gits": [{
369
+ "repo_url": "https://github.com/argoproj/argo-cd.git",
370
+ "revision": "HEAD",
371
+ "directories": [{
372
+ "path": "applicationset/examples/git-generator-directory/cluster-addons/*",
373
+ "exclude": False,
374
+ }],
375
+ }],
376
+ }],
377
+ "template": {
378
+ "metadata": {
379
+ "name": "{{.path.basename}}-addon",
380
+ },
381
+ "spec": {
382
+ "project": "default",
383
+ "sources": [{
384
+ "repo_url": "https://github.com/argoproj/argo-cd.git",
385
+ "path": "{{.path.path}}",
386
+ "target_revision": "HEAD",
387
+ }],
388
+ "destination": {
389
+ "server": "https://kubernetes.default.svc",
390
+ "namespace": "{{.path.basename}}",
391
+ },
392
+ "sync_policy": {
393
+ "automated": {
394
+ "prune": True,
395
+ "self_heal": True,
396
+ },
397
+ },
398
+ },
399
+ },
400
+ },
401
+ })
402
+ ```
403
+
404
+ ## Import
405
+
406
+ Import gitOps applicationset with account level agent, agent id has account prefix #
407
+
408
+ ```sh
409
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
410
+ ```
411
+
412
+ Import gitOps applicationset with org level agent, agent id has org prefix #
413
+
414
+ ```sh
415
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
416
+ ```
417
+
418
+ Import gitOps applicationset with project level agent #
419
+
420
+ ```sh
421
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
271
422
  ```
272
423
 
273
424
  :param str resource_name: The name of the resource.
@@ -293,14 +444,15 @@ class GitopsApplicationset(pulumi.CustomResource):
293
444
  import pulumi
294
445
  import pulumi_harness as harness
295
446
 
296
- test_fixed = harness.platform.GitopsApplicationset("test_fixed",
447
+ # Example 1: Cluster Generator
448
+ cluster_generator = harness.platform.GitopsApplicationset("cluster_generator",
297
449
  org_id="default",
298
450
  project_id="projectId",
299
451
  agent_id="account.agentuseast1",
300
452
  upsert=True,
301
453
  applicationset={
302
454
  "metadata": {
303
- "name": "tf-appset",
455
+ "name": "cluster-appset",
304
456
  "namespace": "argocd",
305
457
  },
306
458
  "spec": {
@@ -316,7 +468,6 @@ class GitopsApplicationset(pulumi.CustomResource):
316
468
  "name": "{{.name}}-guestbook",
317
469
  "labels": {
318
470
  "env": "dev",
319
- "harness.io/serviceRef": "svc1",
320
471
  },
321
472
  },
322
473
  "spec": {
@@ -334,6 +485,157 @@ class GitopsApplicationset(pulumi.CustomResource):
334
485
  },
335
486
  },
336
487
  })
488
+ # Example 2: List Generator
489
+ list_generator = harness.platform.GitopsApplicationset("list_generator",
490
+ org_id="default",
491
+ project_id="projectId",
492
+ agent_id="account.agentuseast1",
493
+ upsert=True,
494
+ applicationset={
495
+ "metadata": {
496
+ "name": "list-appset",
497
+ },
498
+ "spec": {
499
+ "go_template": True,
500
+ "go_template_options": ["missingkey=error"],
501
+ "generators": [{
502
+ "lists": [{
503
+ "elements": [
504
+ {
505
+ "cluster": "engineering-dev",
506
+ "url": "https://kubernetes.default.svc",
507
+ },
508
+ {
509
+ "cluster": "engineering-prod",
510
+ "url": "https://kubernetes.prod.svc",
511
+ },
512
+ ],
513
+ }],
514
+ }],
515
+ "template": {
516
+ "metadata": {
517
+ "name": "{{.cluster}}-guestbook",
518
+ },
519
+ "spec": {
520
+ "project": "default",
521
+ "sources": [{
522
+ "repo_url": "https://github.com/argoproj/argocd-example-apps.git",
523
+ "path": "helm-guestbook",
524
+ "target_revision": "HEAD",
525
+ }],
526
+ "destination": {
527
+ "server": "{{.url}}",
528
+ "namespace": "default",
529
+ },
530
+ },
531
+ },
532
+ },
533
+ })
534
+ # Example 3: Git Generator with Files
535
+ git_files = harness.platform.GitopsApplicationset("git_files",
536
+ org_id="default",
537
+ project_id="projectId",
538
+ agent_id="account.agentuseast1",
539
+ upsert=True,
540
+ applicationset={
541
+ "metadata": {
542
+ "name": "git-files-appset",
543
+ },
544
+ "spec": {
545
+ "generators": [{
546
+ "gits": [{
547
+ "repo_url": "https://github.com/example/config-repo",
548
+ "revision": "main",
549
+ "files": [{
550
+ "path": "apps/*/config.json",
551
+ }],
552
+ }],
553
+ }],
554
+ "template": {
555
+ "metadata": {
556
+ "name": "{{.path.basename}}-app",
557
+ },
558
+ "spec": {
559
+ "project": "default",
560
+ "sources": [{
561
+ "repo_url": "https://github.com/example/app-repo",
562
+ "path": "{{.path.path}}",
563
+ "target_revision": "main",
564
+ }],
565
+ "destination": {
566
+ "server": "https://kubernetes.default.svc",
567
+ "namespace": "{{.path.basename}}",
568
+ },
569
+ },
570
+ },
571
+ },
572
+ })
573
+ # Example 4: Git Generator with Directories
574
+ git_directories = harness.platform.GitopsApplicationset("git_directories",
575
+ org_id="default",
576
+ project_id="projectId",
577
+ agent_id="account.agentuseast1",
578
+ upsert=True,
579
+ applicationset={
580
+ "metadata": {
581
+ "name": "git-directories-appset",
582
+ },
583
+ "spec": {
584
+ "generators": [{
585
+ "gits": [{
586
+ "repo_url": "https://github.com/argoproj/argo-cd.git",
587
+ "revision": "HEAD",
588
+ "directories": [{
589
+ "path": "applicationset/examples/git-generator-directory/cluster-addons/*",
590
+ "exclude": False,
591
+ }],
592
+ }],
593
+ }],
594
+ "template": {
595
+ "metadata": {
596
+ "name": "{{.path.basename}}-addon",
597
+ },
598
+ "spec": {
599
+ "project": "default",
600
+ "sources": [{
601
+ "repo_url": "https://github.com/argoproj/argo-cd.git",
602
+ "path": "{{.path.path}}",
603
+ "target_revision": "HEAD",
604
+ }],
605
+ "destination": {
606
+ "server": "https://kubernetes.default.svc",
607
+ "namespace": "{{.path.basename}}",
608
+ },
609
+ "sync_policy": {
610
+ "automated": {
611
+ "prune": True,
612
+ "self_heal": True,
613
+ },
614
+ },
615
+ },
616
+ },
617
+ },
618
+ })
619
+ ```
620
+
621
+ ## Import
622
+
623
+ Import gitOps applicationset with account level agent, agent id has account prefix #
624
+
625
+ ```sh
626
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
627
+ ```
628
+
629
+ Import gitOps applicationset with org level agent, agent id has org prefix #
630
+
631
+ ```sh
632
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
633
+ ```
634
+
635
+ Import gitOps applicationset with project level agent #
636
+
637
+ ```sh
638
+ $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example <organization_id>/<project_id>/<agent_id>/<identifier>
337
639
  ```
338
640
 
339
641
  :param str resource_name: The name of the resource.