-
Notifications
You must be signed in to change notification settings - Fork 16
/
pulumi.saas.txt
3423 lines (2645 loc) · 164 KB
/
pulumi.saas.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
PULUMI
PAUSED DOCUMENTATION ==> #Current documentation is from October 2023
#Until I actually use Pulumi, I stopped documenting it, which includes:
# - https://github.com/pulumi/pulumi/releases
# - https://github.com/pulumi/actions/releases
# - https://github.com/pulumi/pulumi-command/releases
# - https://github.com/pulumi/pulumi-random/releases
# - https://github.com/pulumiverse/pulumi-time/releases
# - https://github.com/pulumiverse/pulumi-purrl/releases
# - https://github.com/pulumi/pulumi-str/releases
# - https://github.com/pulumi/pulumi-aws/releases
# - https://github.com/pulumi/pulumi-aws-native/releases
# - https://github.com/pulumi/pulumi-awsx/releases
# - https://github.com/pulumi/pulumi-policy-aws/commits/master
ALTERNATIVES ==> #Terraform:
# - declarative approach (HCL)
# - most high-profile
# - more providers
# - more programming languages
# - easier to setup alternative backends
#Pulumi:
# - declarative approach (YAML) + imperative approach
# - same-day provider updates with main cloud providers
# - good REST API
# - better secrets encryption
# - better CI|DevOps flow
# - better import|convert
# - scaffolding
# - update on local file changes
#CloudFormation (preferred):
# - declarative (YAML) + imperative approach (CDK)
# - AWS-specific
# - almost free
# - drift detection
# - template linting
# - better parameters|inputs validation
# - better declarative logic
# - macros
# - best REST API
# - better extensions management
# - better rollback
# - wait for signal
# - snapshot on delete
# - multi-region|account
SUMMARY ==> #Clients: REST API, CLI, Docker, UI
#Runtime: binary|programmatic, YAML|Node|Go|Python|DotNet|Java
#Inputs|outputs: dependencies, assets|archives
#Inputs|outputs YAML: ${VARR}, fn::*, variables
#Inputs|outputs Node: promise, deep, utilities
#Program outputs: stack reference
#Config: project|stack, provider|library|custom, type
#Secrets: config|outputs, cloud|local|AWS|GCP|Azure|Hashivault
#Function serialization
#Deployment local: home|cwd|mainDir, envVars, custom CLI args|commands
#Deployment cloud: git settings, cloud credentials, envVars, deps, custom CLI commands, logs, GitHub app, PR comments
#Deployment CI: GitHub action, PR comments
#Project: Pulumi.yaml, metadata, templates, program file|inline
#Stack: select, Pulumi.STACK.yaml, tags, state, export|import
#Resources: type|name|id|urn, aliases, init, transforms, custom|component, RPROPS|ROPTS, timeouts, ignoreChanges, parent
#External: get(), import, converters
#Update: preview, up, cancel, watch, refresh, pending
#Delete: destroy, state delete, retainOnDelete, protect, deletedWith
#Automation: targets, expectNoChanges, parallel REZ|UPDATE, diff, plan, history, events
#Replace: update|replace, deleteBeforeReplace, replaceOnChanges
#Webhooks: preview|update|stackCreate|stackDelete, email
#Provider: PROV_RPROPS, version, PFUNC, dynamic|plugin, CRUD|check|diff|construct|PFUNC
#Package: resource plugin, generated provider SDK, PSCHEMA, registry, native|bridged|component, module, boilerplate
#Organization: team, permissions, roles, member|user, access token
#Backend: cloud|local|S3|GCP|Azure, self-managed, self-hosted
#Policies: pack, template, PulumiPolicy.yaml, program, enforcementLevel, before|after REZ init, config, CrossGuard, group
#Logs: verbose|debug, trace, profile, REZ, audit
#Insights: search, aggregate, count
#Mocks: init, PFUNC, config
#Providers: string, random, time, http, shell
/=+===============================+=\
/ : : \
)==: VERSION :==(
\ :_______________________________: /
\=+===============================+=/
VERSION ==> #3.91.1
INSTALL|UPGRADE ==> #Download archive from website
# - they are at https://get.pulumi.com/releases/sdk/pulumi-vVERSION-OS-ARCH.tar.gz
#Extract to a directory that's in the PATH
# - prefered: ~/.pulumi/bin/
#https://get.pulumi.com is a Bash script automating the above
# - it adds `export PATH=$PATH:$HOME/.pulumi/bin` to .bashrc|.bash_profile
N.version
NMANIFEST|XMANIFEST.version
GH_INPUTS.pulumi-version
NWORKSPACE.pulumiVersion #'vX.Y.Z'
pulumi version #Print Pulumi version
ENVVAR PULUMI_SKIP_UPDATE_CHECK #If 'true', do not abort when version of Pulumi is not latest
pulumi about #Print:
# - OS info
# - pulumi version
# - ACCESS_TOKEN
# - PLUGINs, RUNTIMEs
# - 'PROJECT|STACK|BACKEND'
# - REZs, STAKE_STATE
# - BACKEND
# - runtime dependencies (e.g. Node modules)
--transitive|-t #Include transitive dependencies
/=+===============================+=\
/ : : \
)==: PRICING :==(
\ :_______________________________: /
\=+===============================+=/
PRICING OF PULUMI CLOUD ==> #Plans:
# - free
# - team:
# - 1$ for 3 REZs
# - first 200 REZs free
# - enterprise: custom price
# - business critical: custom price
#Billed REZ:
# - when REZ is in current STATE, even if no update happening
# - includes rootStackResource and KREZs
#Pulumi Deployments:
# - currently free because in preview
# - not for free plan
# - billed per compute-minute
SUPPORT ==> #12h * 5d with enterprise plan
#24h * 7d with business critical
/=+===============================+=\
/ : : \
)==: REST API :==(
\ :_______________________________: /
\=+===============================+=/
X* #REST API request|response
API_URL #https://api.pulumi.com/api
CLI ==> #Must be available in PATH to use the REST API
Accept: application/vnd.pulumi+8
[C] #
Content-Type: application/json [C]#
REQUEST ==> #With POST|PUT|PATCH, JSON request body
#With GET|DELETE, query variables
PAGINATION ==> #Some endpoints are always paginated:
# - Request OBJ: continuationToken=STR
# - Response OBJ: continuationToken STR
#Others too but with a different way:
# - Request OBJ: continue STR, size NUM, page NUM
# - Response OBJ: total NUM, pagination.previous|next|continue STR
#Or:
# - Request OBJ: nextToken=STR
# - Response OBJ: nextToken STR
#Or:
# - Request OBJ: count NUM, offset NUM, step NUM
# - Response OBJ: nextOffset NUM
#Others are only paginated on-demand:
# - Request OBJ: pageSize NUM, page NUM
# - Response OBJ: itemsPerPage NUM, total NUM
@pulumi/pulumiservice #PROV for the Pulumi REST API itself
#REZs: PROV, TAGS, ACCESS_TOKEN, TEAM, WEBHOOK, XDSETTINGS
/=+===============================+=\
/ : : \
)==: CLI :==(
\ :_______________________________: /
\=+===============================+=/
CLI ==> #Uses the REST API under the hood
MAIN FLOW ==> # - CLI starts Deployment engine (local gRPC server)
# - CLI executes resource PLUGINs binaries
# - they start their server to communicate with Deployment engine
# - CLI executes language executor binary
# - which itself executes PROGRAMs
# - PROGRAMs declare REZs using the language SDKs
# - which themselves use the language RUNTIMEs
# - REZs are communicated to Deployment engine
# - Deployment engine computes actions to perform
# - Actions are sent to resource PLUGIN, which performs them
pulumi --BOOL_VAR #If type not documented, means BOOL with default false
pulumi ... --non-interactive #
pulumi cancel|destroy|import|new
|plugin rm|policy rm|refresh
|stack rm|state|up
--yes|-y
ENVVAR PULUMI_SKIP_CONFIRMATIONS #If 'true', no confirmations
pulumi ... --color
GH_INPUTS.color
SOPTS.color #'auto' (def), 'always', 'never' or 'raw'
ENVVAR NO_COLOR #
pulumi about|config|destroy|logs
|plugin ls|policy [group] ls
|preview|refresh|stack ls
|stack output|stack tag ls|up
|whoami
--json|-j #JSON output
pulumi ... --emoji|-e #Allow emojis in the CLI output
pulumi gen-completion #Print CLI completion script
/=+===============================+=\
/ : : \
)==: DOCKER :==(
\ :_______________________________: /
\=+===============================+=/
pulumi/pulumi-base #Debian image with pulumi CLI
#Best when want to customize RUNTIME version
#~150MB
pulumi/pulumi-RUNTIME #Same but install a specific RUNTIME globally, e.g. Node.js
#For Node, use node:lts-bullseye-slim, i.e. Node.js latest
#Best most of the times
#~160MB
pulumi/pulumi #Combine all pulumi/pulumi-RUNTIMEs
#Best when want to use PROGRAMs written using any|multiple RUNTIMEs
#~1350MB
/=+===============================+=\
/ : : \
)==: UI :==(
\ :_______________________________: /
\=+===============================+=/
PULUMI CLOUD UI ==> #Similar features as CLI
LOGIN ==> #Can use GitHub|GitLab|BitBucket
#Not fully documented yet
SAML/SSO ==> #Only with enterprise plan
#Not fully documented yet
SCIM ==> #Only with business critical plan
#Not fully documented yet
readme #POUTPUT with value 'MARKDOWN'
#Shown in UI for a given STACK
/=+===============================+=\
/ : : \
)==: RUNTIME :==(
\ :_______________________________: /
\=+===============================+=/
LANGUAGE HOST ==> #Language executor + runtime
LANGUAGE EXECUTOR ==> #Binary file used to execute the [N]PROGRAM in a specific programming language
#PLUGIN pulumi-language-RUNTIME
LANGUAGE RUNTIME ==> #Programmatic library used inside [N]PROGRAM to declare REZs
#E.g. @pulumi/pulumi for Node.js
[N]PROJECT.runtime #Either [N]RUNTIME or [N]RUNTIME.name
[N]RUNTIME #Language executor and runtime
pulumi:runtime
[N]RUNTIME.name #'RUNTIME', i.e. 'nodejs|go|python|dotnet|java|yaml'
[N]RUNTIME.options #[N]RUNTIME_OPTS
[N]RUNTIME_OPTS.buildTarget #'DIR' where to run 'go build'
#Def: temp DIR
#Only with 'go'
[N]RUNTIME_OPTS.binary #'PATH' to binary
#Only with 'go|dotnet|java'
[N]RUNTIME_OPTS.virtualenv #'DIR' where python binary is
ENVVAR PULUMI_PYTHON_CMD #Only with 'python'
pulumi convert [...ARGS] #Convert a PROGRAM from one RUNTIME to another
--from #'RUNTIME|terraform' (def: 'yaml') source
--language #'RUNTIME' destination
--out #'DIR' (def: '.')
--mappings #STR
--strict #Type checking (def: false)
pulumi install #Install RUNTIME-specific dependencies and PLUGINs
pulumi convert --generate-only
NQCOPTS.skipInstallDependencies
XDOP.options
.skipInstallDependencies #BOOL. If false (def), automatically runs `pulumi install`
/=+===============================+=\
/ : : \
)==: YAML :==(
\ :_______________________________: /
\=+===============================+=/
[N]RUNTIME_OPTS.compiler #'PROGRAM' to preprocess YAML (e.g. cue)
/=+===============================+=\
/ : : \
)==: NODE :==(
\ :_______________________________: /
\=+===============================+=/
@pulumi/pulumi #Node.js language RUNTIME
N* #Node.js types
N.VAR #Named export VAR
N.automation #NA
#Actually executes the CLI under the hood
N.runtime #NR
#Not fully documented, since mostly internal
>VAL #Means PROMISE_VAL
[>]VAL #Means [PROMISE_]VAL
->>[VAL] #Means ->PROMISE[_VAL]
CLASS.isInstance(VAL)->BOOL #Like VAL instanceof CLASS, but cross-realm
#Available with most CLASSes
[N]RUNTIME_OPTS.typescript #BOOL (def: true). Whether to use TypeScript, through ts-node
[N]RUNTIME_OPTS.nodeargs #'--FLAG ...' passed to node
/=+===============================+=\
/ : : \
)==: INPUTS OUTPUTS MAIN :==(
\ :_______________________________: /
\=+===============================+=/
OUTPUTS ==> #Async|dynamic value, similar to a PROMISE, as a return value
#Resolved when provisioning a STACK
#Related to specific REZs
STABLE OUTPUTS ==> #OUTPUTs are not resolved during a preview, i.e. they are "unknown".
#Unless they are marked as "stable", i.e. their value is both:
# - already available, e.g. RPROPs of an already existing REZ
# - readonly after creation
UNWRAPPING ==> #Resolving }VAL{ to VAL
LIFTING ==> #Turning VAL to }VAL{
INPUTS ==> #Async|dynamic value, similar to a PROMISE, as a function argument
#Resolved when provisioning a STACK
}TYPE{ #Notation for a [N]OUTPUT of TYPE
{TYPE} #Notation for a [N]INPUT of TYPE
}{TYPE}{ #Notation for {TYPE} + }TYPE{
}}TYPE{{
{{TYPE}} #Like above, but top-level OBJ|ARR is normal (not dynamic)
/=+===============================+=\
/ : : \
)==: INPUTS OUTPUTS YAML :==(
\ :_______________________________: /
\=+===============================+=/
INPUT #Can use:
# - VAL as is
# - ${VARR}
# - { fn::FUNC }
#Also called "expression"
${VARR} #Insert a value in a {VAL} in YAML
#Can be:
# - 'REZ[.OUTPUT_VARR]'
# - 'SCONFIG_VARR'
# - 'VARR' from:
# - PROGRAM.variables.*
# - GLOBALS.*
#VARR:
# - VAR.VAR2
# - VAR["VAR2"]
# - same as VAR.VAR2 but escapes
# - must \-escape "
# - VAR[NUM]
#Can be part of a STR if value is a STR itself.
$${...} #Escape ${...}
PROGRAM.variables.KEY #{VAL} available in ${VARR}
GLOBALS #Values available in ${VARR}
{ fn::FUNC: {ARG[_ARR]} } #Insert a function's return value in a {VAL} in YAML
#"Built-in function"
fn::select(NUM, ARR)->VAL #ARR[NUM] (0-based)
fn::join('DELIM', ARR)->STR #Like ARR.join('DELIM')
fn::split('DELIM', STR)->ARR #Like STR.split('DELIM')
fn::toBase64(STR)->STR #
fn::fromBase64(STR)->STR #
fn::toJSON(VAL)->'JSON' #
fn::readFile('PATH')->'CONTENT' #'PATH' can start with ../
/=+===============================+=\
/ : : \
)==: INPUTS OUTPUTS NODE :==(
\ :_______________________________: /
\=+===============================+=/
NINPUT #Can use:
# - VAL as is
# - PROMISE_VAL
# - }VAL{
#Can be done deeply, including any OBJ|ARR deeply
REZ.OUTPUT #NOUTPUT
NOUTPUT #Wraps a VAL, including any OBJ|ARR deeply
# - can traverse deeply without needing ?.
NDREZ|XDREZ.inputs.INPUT #VAL
NDREZ|XDREZ.outputs.OUTPUT #VAL
output({VAL})->}VAL{
Output.create({VAL})->}VAL{ #Create a new }VAL{
}VAL{.get()->VAL #Retrieve the value of a }VAL{
}VAL{.apply
(FUNC(VAL)->>VAL2|}VAL2{)
->}VAL2{ #Map the value of a }VAL{
all({}VAL{}_ARR)->}ARR{ #Concatenate values into an }ARR{
concat({VAL}_ARR)->}STR{ #Concatenate values into a }STR{
interpolate`...${{VAL}}...` #Same as concat() but as a `...`
N.iterable.groupBy({OBJ_ARR}, #Group OBJ_ARR into an OBJ with:
FUNC(VAL)->{['KEY', VAL]}) # - key 'KEY'
->}OBJ{ # - value VAL_ARR
N.iterable.toObject(...) #Same args as groupBy(), except value is VAL (last item of VAL_ARR)
jsonParse(...)
jsonStringify(...) #Like JSON.parse|stringify(...) but allowing {VAL} (deeply) and returning }VAL{ (deeply)
/=+===============================+=\
/ : : \
)==: PROGRAM OUTPUTS :==(
\ :_______________________________: /
\=+===============================+=/
POUTPUTS ==> #Unlike regular OUTPUTs which are:
# - related to a REZ
# - used inside a PROGRAM
#POUTPUTs are:
# - related to a PROGRAM, instanced by a STACK
# - used by other STACKs, PROGRAMs or processes
#Also called "stack outputs"
PROGRAM.outputs.POUTPUT #{VAL}
export const VAR = {VAL} #In Node.js, each exported variable is a POUTPUT
export default FUNC()
[->>POUTPUTS_OBJ] #Alternative
N[R]STACK.outputs()->>NPOUTPUTS #
NPOUTPUTS.POUTPUT #NPOUTPUT
NPOUTPUT.value #VAL|'ENCRYPTED_VAL'
pulumi stack output [NPOUTPUT] #Print an NPOUTPUT value
#Def NPOUTPUT: all
--shell #Print as shell script instead
pulumi preview|up|refresh|destroy
|import
--suppress-outputs #Unless defined, POUTPUTs are printed
pulumi up
--show-full-output #BOOL. If true (def), show POUTPUTs in full
/=+===============================+=\
/ : : \
)==: STACK REFERENCE :==(
\ :_______________________________: /
\=+===============================+=/
REZ.type
'pulumi:pulumi:StackReference' #[N]SREZ. Child of [N]CREZ
new N.StackReference #Reference to another STACK in the same PROJECT
(...NSREZ_ARGS) #Meant to get its POUTPUTs
RPROPS.name
NSREZ.ARGS[1].name #{'OOSTACK'}
[N]SREZ.name #}'OOSTACK'{
[N]SREZ.outputs #}OBJ{
NSREZ.getOutput
({'POUTPUT'})[->}VAL{] #
NSREZ.getOutputValue
('POUTPUT')[->>VAL] #
NSREZ.require*(...) #Same as NSREZ.get*(...) but throw instead of returning undefined
NSREZ.getOutputDetails
('POUTPUT')->>OBJ #OBJ: value VAL, secretValue VAL
/=+===============================+=\
/ : : \
)==: PROJECT CONFIG :==(
\ :_______________________________: /
\=+===============================+=/
PROJECT.config #PCONFIG
#Configuration values (similar goal as ENVVARs)
PCONFIG_VAR #'[PCONFIG_NS:]PCONFIG_KEY'
#Def PCONFIG_NS: current 'PROJECT'
PROJECT:PCONFIG_KEY #PCONFIG_VAR for a PROJECT
LIBRARY:PCONFIG_KEY #PCONFIG_VAR for a library
PACKAGE:PROV_RPROP #PCONFIG_VAR for [N]PROV_RPROPs of default PROV
PCONFIG.PCONFIG_VAR #Either VAL or { value: PCONFIG_VAL }
PCONFIG_VAL.type #'string|boolean|integer|array'
#If YAML runtime: '[List<]String|Number[>]'
PCONFIG_VAL.default #Default VAL|'ENCRYPTED_VAL' when undefined
PCONFIG_VAL.description #STR. Not with YAML runtime
PCONFIG_VAL.items #PCONFIG_VAL_ARR. Not with YAML runtime
new Config(['PCONFIG_NS']) #NPCONFIG for current PROJECT and PCONFIG_NS. Loads it.
NPROJECT.config
NPCONFIG.name #'PCONFIG_NS'. Def: 'PROJECT'
NPCONFIG.get
('PCONFIG_KEY'[, OPTS])
[->PCONFIG_VAL] #Returns undefined if missing or not matching OPTS.*
OPTS.allowedValues #ARR
OPTS.min|maxLength #NUM
OPTS.pattern #REGEXP|'REGEXP'
NPCONFIG.getObject
('PCONFIG_KEY')[->OBJ] #
NPCONFIG.getBoolean
('PCONFIG_KEY')[->BOOL] #
NPCONFIG.getNumber
('PCONFIG_KEY'[, OPTS])[->NUM] #
OPTS.min|max #NUM
NPCONFIG.require*(...)->VAL #Same as NPCONFIG.get*(...) but throw instead of returning undefined
/=+===============================+=\
/ : : \
)==: STACK CONFIG :==(
\ :_______________________________: /
\=+===============================+=/
SCONFIG #Like PCONFIG but:
# - for a STACK
# - cannot specify type
#Inherits PCONFIG values
[N]STACK_SETTINGS.config #[N]SCONFIG
[N]SCONFIG.SCONFIG_VAR #'SCONFIG_VAL'|NCONFIG_SECRET_VAL
NUPDATE.config
GH_INPUTS.config-map #NSCONFIG_MAP
NSCONFIG_MAP.SCONFIG_VAR #NSCONFIG_ENTRY
NSCONFIG_ENTRY.value #SCONFIG_VAL|'ENCRYPTED_VAL'
pulumi new|preview|up|watch
--config-path
pulumi config --path
NSTACK.*Config(..., BOOL) #Allow using VARR with SCONFIG_VAR
pulumi new|preview|up|watch
--config|-c #'SCONFIG_VAR=SCONFIG_VAL'_ARR
NSTACK.setAllConfig
(NSCONFIG_MAP)->> #Set all SCONFIG_VARs
pulumi config set-all
--plaintext|secret
SCONFIG_VAR=SCONFIG_VAL #Set multiple SCONFIG_VARs
pulumi config set SCONFIG_VAR
[SCONFIG_VAL] #Def SCONFIG_VAL: stdin
NSTACK.setConfig('SCONFIG_VAR',
NSCONFIG_ENTRY)->> #
pulumi config rm-all
SCONFIG_VAR...
NSTACK.removeAllConfig
('SCONFIG_VAR'_ARR)->> #
pulumi config rm SCONFIG_VAR
NSTACK.removeConfig
('SCONFIG_VAR')->> #
pulumi preview|up|destroy|watch
--show-config
pulumi config
NSTACK.getAllConfig()
->>NSCONFIG_MAP #
pulumi config get SCONFIG_VAR
NSTACK.getConfig('SCONFIG_VAR')
->>NSCONFIG_ENTRY #
pulumi config refresh
NSTACK.refreshConfig()
->>NSCONFIG_MAP #Sync local SCONFIG with BACKEND's one
--force|-f #Do not abort if config file exists
pulumi config cp SCONFIG_VAR #
--dest|-d #'STACK'
/=+===============================+=\
/ : : \
)==: SECRETS :==(
\ :_______________________________: /
\=+===============================+=/
SECRETS ==> #Encrypt PCONFIG|SCONFIG|TCONFIG|OUTPUT|POUTPUT values when stored|serialized
#Never encrypted runtime:
# - automatically decrypted
# - only marked as secret
SECRETS_PROV #Where secret key is located
#One of:
# - 'default' (def if BACKEND Pulumi Cloud): Pulumi Cloud
# - 'passphrase' (def otherwise): locally
# - 'awskms://...?region=REGION'
# - 'gcpkms://...'
# - 'azurekeyvault://...'
# - 'hashivault://...'
#Not fully documented yet
pulumi:secrets_provider
NWOPTS|NWORKSPACE|NSTACK_SETTINGS
.secretsProvider
GH_INPUTS.secrets-provider
pulumi new|stack init
|stack select|up|watch
--secrets-provider #'SECRETS_PROV'
pulumi stack
change-secrets-provider
SECRETS_PROV #
XDEPLOYMENT.secrets_providers #XSECRETS_PROV
XSECRETS_PROV.type #'SECRETS_PROV'
XSECRETS_PROV.state #XSECRETS_PROV_STATE
XSECRETS_PROV_STATE.project #'PROJECT'
XSECRETS_PROV_STATE.stack #'STACK'
XSECRETS_PROV_STATE.url #'URL'
XSECRETS_PROV_STATE.owner #STR
pulumi config set|set-all
--plaintext|secret #Whether to encrypt or not
fn::secret(VAL)->VAL
secret({VAL})->}VAL{ #Mark as secret
unsecret(}VAL{)->}VAL{ #Mark as not secret
isSecret(}VAL{)->>BOOL #
NPCONFIG.get|requireSecret*
(...)[->}VAL{] #Same as NPCONFIG.get|require*(...) but mark as secret
PCONFIG_VAL|NSCONFIG_ENTRY
|[N]TCONFIG_ENTRY|NPOUTPUT.secret#BOOL
SCONFIG_SECRET_VAL.secure #'ENCRYPTED_VAL'
[NC]ROPTS.additionalSecretOutputs #'OUTPUT'_ARR to mark as secret
NSREZ.secretOutputNames #}'OUTPUT'_ARR{ that are marked as secret
new Secret(VAL) #Mark as secret, inside NRPOLICY.remediateResource
pulumi stack
pulumi config
[history|output|export]
--show-secrets
HARGS[2]
SOPTS.showSecrets #BOOL. If false (def), secrets are not printed
NSTACK_SETTINGS.encryptedKey
ENVVAR PULUMI_CONFIG_PASSPHRASE #'SECRET', with SECRETS_PROV 'passphrase'
ENVVAR
PULUMI_CONFIG_PASSPHRASE_FILE #Like PULUMI_CONFIG_PASSPHRASE but as 'PATH'
NSTACK_SETTINGS.encryptionSalt #STR, with SECRETS_PROV 'passphrase'
/=+===============================+=\
/ : : \
)==: ASSETS :==(
\ :_______________________________: /
\=+===============================+=/
N.asset #NS
ASSET #File
fn::stringAsset('CONTENT')
new NS.StringAsset([>]'CONTENT') #[N]STRING_ASSET. Child of ASSET
NSTRING_ASSET.text #>'CONTENT'
fn::fileAsset('PATH')
new NS.FileAsset([>]'PATH') #[N]FILE_ASSET. Child of ASSET
NFILE_ASSET.path #>'PATH'
fn::remoteAsset('URI') #[N]REMOTE_ASSET. Child of ASSET
new NS.RemoteAsset([>]'URI') #Can use HTTP[S] or `file:`
NREMOTE_ASSET.uri #>'URI'
ARCHIVE #Collection of ASSETs|ARCHIVEs
fn::assetArchive(ASSETS)
new NS.AssetArchive([>]NASSETS) #[N]ASSET_ARCHIVE. Child of ARCHIVE
NARCHIVE.assets #>NASSETS
[N]ASSETS.ARCHIVE_ITEM #[N]ASSET|[N]ARCHIVE
fn::fileArchive('PATH') #[N]FILE_ARCHIVE. Child of ARCHIVE
new NS.FileArchive([>]'PATH') #Either 'DIR' or PATH to *.tar|tgz|tar.gz|zip|jar
NFILE_ARCHIVE.path #>'PATH'
fn::remoteArchive('URI') #[N]REMOTE_ARCHIVE. Child of ARCHIVE
new NS.RemoteArchive([>]'URI') #Must be *.tar|tgz|tar.gz|zip|jar
NREMOTE_ARCHIVE.uri #>'URI'
/=+===============================+=\
/ : : \
)==: FUNCTION SERIALIZATION :==(
\ :_______________________________: /
\=+===============================+=/
NR.serializeFunction #Serialize FUNC.
(FUNC[, OPTS])->>OBJ #Goal is to allow passing FUNCs to REZs arguments, that are called later
# - e.g. AWS Lambda, or NVPROV.*
#OBJ:
# - text 'CODE'
# - exportName 'VAR'
# - containsSecrets BOOL
#Serializes recursively any:
# - FUNC calls
# - FUNC closure
# - imports
# - ESM imports of Node core|external modules are turned into CommonJS imports and not recursed
# - stack lines, for debugging
#Serialized values use their current value, i.e. inlined
#Serialize:
# - FUNCs with toString()
# - PROMISE resolved value, i.e. awaits them
# - REZs
# - any other JavaScript type
#Does not work with:
# - native FUNCs (e.g. FUNC.bind(...)) declared in closure scope
# - dynamic OBJ[STR] declared in closure scope, with STR unknown at compile-time
#Uses 'v8' and 'inspector' Node core modules under the hood
OPTS.exportName #'VAR' (def: 'handler') of the named export in 'CODE'
OPTS.isFactoryFunction #BOOL (def: false). If true, serialize FUNC(), not FUNC
OPTS.serialize #FUNC(VAL)->BOOL. Called on each VAL recursively. If false, do not serialize.
#Meant to remove cycles
OPTS.allowSecrets #BOOL. If false (def), do not serialize secrets
OPTS.logResource #REZ passed to any thrown new ResourceError()
NR.computeCodePaths(OPTS) #Compute list of files from package.json `dependencies`, recursively.
->>ASSET|ARCHIVE_MAP #Does not inspect files except for package.json, i.e. might be adding too much|little.
#package.json:
# - can contain `runtimeDependencies`: used instead of `dependencies`
# - is excluded if Pulumi core package (name @pulumi/*) or PROV (`package.json` `pulumi`)
#Meant for serverless Functions packaging.
OPTS.extraInclude|ExcludePackages #STR_ARR. Node modules to include|exclude, additionally.
OPTS.extraIncludePaths #'PATH'_ARR to include, additionally.
OPTS.logResource #Like NR.serializeFunction()
/=+===============================+=\
/ : : \
)==: DEPLOYMENT LOCAL :==(
\ :_______________________________: /
\=+===============================+=/
LOCAL WORKSPACE ==> #Run UPDATE locally
PHOME_DIR/workspaces/PROJECT-
WORKSPACE_ID-workspace.json #Local WORKSPACE_SETTINGS
NA.LocalWorkspace
.create([NWOPTS])->>NWORKSPACE #
NSTACK.workspace #NWORKSPACE
NWOPTS|NWORKSPACE.pulumiHome #'PHOME_DIR' where to store binaries, PLUGINs, WORKSPACEs, TEMPLATEs, ACCESS_TOKENs
ENVVAR PULUMI_HOME #Def: ~/.pulumi
pulumi ... --cwd|-C
GLOBALS.pulumi.cwd #'CWD_DIR' (def: '.') used for:
NWOPTS|NWORKSPACE.workDir # - main files like Pulumi[.STACK].yaml|json, index.js|ts, etc.
GH_INPUTS.work-dir # - all local paths
NQOPTS.workDir #Same. Not with NQOPTS.projectName|program
[N]PROJECT.main #'DIR' of PROGRAM
#Def: 'CWD_DIR'
NWOPTS|NWORKSPACE.envVars #OBJ of ENVVARs passed to PROGRAMs
NWORKSPACE.serializeArgsForOp #FUNC('STACK')->>STR_ARR
#Pass additional CLI args to every command (including under the hood)
NWORKSPACE.postCommandCallback #FUNC('STACK')->>
#Run after every CLI command (including under the hood)
/=+===============================+=\
/ : : \
)==: DEPLOYMENT CREATE :==(
\ :_______________________________: /
\=+===============================+=/
PULUMI DEPLOYMENT ==> #Run UPDATE on Pulumi Cloud
DEPLOYMENTS_URL #API_URL/preview/ORG/PROJECT/STACK/deployments
POST DEPLOYMENTS_URL #Req: XDEPLOYMENT_REQ
#Res: empty
#Can be done from a "Click to deploy" UI button
NA.RemoteWorkspace.create|select
|createOrSelectStack
(NQROPTS[, RQCOPTS])->>NRSTACK #
XDEPLOYMENT_REQ #Run on Pulumi Cloud:
# - fetch git repo
# - install dependencies
# - set cloud credentials
# - find PROGRAM
# - run UPDATE
XDEPLOYMENT_REQ.* #Like XDSETTINGS
XDEPLOYMENT_REQ.inheritSettings #BOOL (def: false). Inherit STACK's XDSETTINGS
XDEPLOYMENT_REQ.operation #'preview|up|refresh|destroy'
NQROPTS.stackName #'STACK'
NRSTACK #SOPTS has only: onEvent|onOutput()
POST DEPLOYMENTS_URL/UUID/cancel #Req: empty
#Res: empty
#Cancal a XDEPLOYMENT_REQ
/=+===============================+=\
/ : : \
)==: DEPLOYMENT SETTINGS :==(
\ :_______________________________: /
\=+===============================+=/
SETTINGS_URL #DEPLOYMENTS_URL/settings
GET SETTINGS_URL #Req: empty
#Res: XDSETTINGS
POST SETTINGS_URL #Req: XDSETTINGS
#Res: XDSETTINGS
DELETE SETTINGS_URL #Req: empty
#Res: empty
XDSETTINGS #Settings for all XDEPLOYMENT_REQ of a given STACK
XDSETTINGS.sourceContext #XDSOURCE. Locates the PROGRAM to fetch.
NQROPTS.url
XDSOURCE.repoURL #'URL' to repository
NQROPTS.projectPath
XDSOURCE.repoDir #'DIR' (def: root)
NQROPTS|XDSOURCE.branch #Git 'BRANCH'
NQROPTS.commitHash
XDSOURCE.commit #Git 'COMMIT_HASH'
NQROPTS.auth
XDSOURCE.gitAuth #NDGIT|XDGIT. Git credentials, only for private repos
NDGIT|XDGIT.personalAccessToken #STR
NDGIT.sshPrivateKey
XDGIT.sshAuth.sshPrivateKey #XSECRET
NDGIT.sshPrivateKeyPath #'PATH'
NDGIT.password
XDGIT.sshAuth.password #XSECRET
NDGIT.username
XDGIT.basicAuth.userName #STR
XDGIT.basicAuth.password #XSECRET
XDSETTINGS #STR. Pulumi CLI Docker image
.executorContext.executorImage #See above for available ones. Def: 'pulumi/pulumi'
XDSETTINGS.operationContext #XDOP
NQCOPS|XDOP.preRunCommands #'SHELL_COMMAND'_ARR to run before Pulumi command
NQCOPTS.envVars.ENVVAR
XDOP.environmentVariables.ENVVAR #'VAL'|XSECRET
XDOP.oidc #XDOID
#Credentials to cloud provider
XDOID.azure|gcp #Not fully documented yet
XDOID.aws #XDAWS. STS credentials, using WEB_ID_ROLE.
#Should create an OPENID_PROVIDER:
# - WEB_ID_DOMAIN 'https://api.pulumi.com/oidc'
# - CLIENT_ID 'ORG'
#Trust POLICY should check COND_KEYs:
# - WEB_ID_DOMAIN:aud 'ORG'
# - WEB_ID_DOMAIN:sub 'pulumi:deploy:org:ORG:project:Core:*'
XDAWS.roleArn #ROLE_ARN
XDAWS.sessionName #'ASSUMED_ROLE'
XDAWS.policyArns #POLICY_ARN_ARR
XDAWS.duration #NUM
XSECRET.secret #STR
/=+===============================+=\
/ : : \
)==: DEPLOYMENT INFO :==(
\ :_______________________________: /
\=+===============================+=/
GET DEPLOYMENTS_URL/UUID #Req: empty
GET DEPLOYMENTS_URL/version/NUM #Res: XDEPLOYMENT
GET DEPLOYMENTS_URL #Req: empty
#Res: XDEPLOYMENT_ARR
XDEPLOYMENT #Result of XDEPLOYMENT_REQ
NUPDATE.Deployment #'JSON' of XDEPLOYMENT
XDEPLOYMENT.id #'UUID'
XDEPLOYMENT.created|modified #'DATE'
XDEPLOYMENT.version
XDEPLOYMENT.latestVersion
XDEPLOYMENT.requestedBy #Like XUPDATE.*
XDEPLOYMENT.jobs #XDJOB_ARR
#CI jobs performed
XDJOB.steps #XDSTEP_ARR
#CI steps performed
XDEPLOYMENT|XDJOB|XDSTEP.status #'running|succeeded'
XDJOB|XDSTEP.started|lastUpdated #'DATE'
XDSTEP.name #STR
XDEPLOYMENT.configuration #XDCONF
XDCONF.source #XDSOURCE
XDCONF.environmentVariables #XDENVVAR_ARR
XDENVVAR.name #'ENVVAR'
XDENVVAR.value #'VAL'
XDENVVAR.secret #BOOL
XUPDATE.githubCommitInfo #XGITINFO
XGITINFO.slug #'USER/REPO'
XGITINFO.sha #'COMMIT_HASH'
XGITINFO.url #'URL' to commit
XGITINFO.author #XUSER
/=+===============================+=\
/ : : \
)==: DEPLOYMENT LOGS :==(
\ :_______________________________: /
\=+===============================+=/
GET DEPLOYMENTS_URL/UUID/logs #Req: OBJ
#Res: lines XLINE_ARR
#Can paginate either by nextToken or by step|offset|count
XLINE #Stdout|stderr line of XDEPLOYMENT
XLINE.line #STR
XLINE.header #STR. Like XLINE.line, but defined for main section lines.
XLINE.timestamp #'DATE'