generated from terraform-ibm-modules/terraform-ibm-module-template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvariables.tf
3600 lines (3054 loc) · 130 KB
/
variables.tf
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
##############################################################################
# Input Variables
##############################################################################
##### START OF COMMON VARIABLES ##########
variable "add_code_engine_prefix" {
type = bool
description = "Set to `true` to use `prefix` to add a prefix to the code engine project names."
default = true
}
variable "add_container_name_suffix" {
type = bool
description = "Set to `true` to add a random suffix to the specified ICR name."
default = false
}
variable "app_group" {
type = string
description = "Specify the Git user or group for the application repository."
default = ""
}
variable "app_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "app_repo_branch" {
type = string
description = "This is the repository branch used by the default sample application. Alternatively if `app_repo_existing_url` is provided, then the branch must reflect the default branch for that repository. Typically these branches are `main` or `master`."
default = "master"
}
variable "app_repo_clone_from_url" {
type = string
description = "Override the default sample app by providing your own sample app URL, which is cloned into the app repository. Note, uses `clone_if_not_exists` mode, so if the app repository already exists the repository contents are unchanged."
default = ""
}
variable "app_repo_clone_to_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "app_repo_clone_to_git_provider" {
type = string
description = "By default this gets set as 'hostedgit', else set to 'githubconsolidated' for GitHub repositories."
default = ""
}
variable "app_repo_existing_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "app_repo_existing_git_provider" {
type = string
default = ""
description = "Git provider for application repo. If not set will default to `hostedgit`."
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.app_repo_existing_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for evidence repository."
}
}
variable "app_repo_existing_url" {
type = string
description = "Bring your own existing application repository by providing the URL. This will create an integration for your application repository instead of cloning the default sample. Repositories existing in a different org will require the use of Git token. See `app_repo_git_token_secret_name` under optional variables. "
default = "__NOTSET__"
}
variable "app_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the sample (or bring your own) application repository."
default = ""
}
variable "app_repo_secret_group" {
type = string
description = "Secret group for the App repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "app_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token used for accessing the sample application repository."
default = ""
validation {
condition = startswith(var.app_repo_git_token_secret_crn, "crn:") || var.app_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "authorization_policy_creation" {
type = string
description = "Disable Toolchain Service to Secrets Manager/Key Protect/Notifications Service authorization policy creation. To disable set the value to `disabled`. This applies to the CI, CD, and CC toolchains. To set independently, see `ci_authorization_policy_creation`, `cd_authorization_policy_creation`, and `cc_authorization_policy_creation`."
default = ""
}
variable "autostart" {
type = bool
description = "Set to `true` to auto run the CI pipeline in the CI toolchain after creation."
default = false
}
variable "cluster_name" {
type = string
description = "Name of the Kubernetes cluster where the application is deployed. This sets the same cluster name for both CI and CD toolchains. See `ci_cluster_name` and `cd_cluster_name` to set different cluster names. By default , the cluster namespace for CI will be set to `dev` and CD to `prod`. These can be changed using `ci_cluster_namespace` and `cd_cluster_namespace`."
default = "mycluster-free"
}
variable "code_engine_project" {
type = string
description = "The name of the Code Engine project to use. Created if it does not exist. Applies to both the CI and CD toolchains. To set individually use `ci_code_engine_project` and `cd_code_engine_project`."
default = ""
}
variable "compliance_pipeline_branch" {
type = string
description = "The Compliance Pipeline definitions branch. See `ci_compliance_pipeline_branch`, `cd_compliance_pipeline_branch` and `cc_compliance_pipeline_branch` to set independently."
default = "open-v10"
}
variable "compliance_pipeline_existing_repo_url" {
type = string
default = ""
description = "The URL of an existing compliance pipelines repository."
}
variable "compliance_pipeline_group" {
type = string
description = "Specify user or group for compliance pipline repository."
default = ""
}
variable "compliance_pipeline_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "compliance_pipeline_repo_blind_connection" {
type = bool
description = "Setting this value to `true` means the server is not addressable on the public internet. IBM Cloud will not be able to validate the connection details you provide. Certain functionality that requires API access to the git server will be disabled. Delivery pipeline will only work using a private worker that has network access to the git server."
default = false
}
variable "compliance_pipeline_repo_name" {
type = string
description = "Sets the name for the compliance pipelines repository if cloned. The expected behaviour is to link to an existing compliance-pipelines repository."
default = ""
}
variable "compliance_pipeline_repo_root_url" {
type = string
description = "(Optional) The Root URL of the server. e.g. https://git.example.com."
default = ""
}
variable "compliance_pipeline_repo_use_group_settings" {
type = bool
description = "Set to `true` to apply group level repository settings to the compliance pipeline repository. See `repo_git_provider` as an example."
default = false
}
variable "compliance_pipeline_repo_title" {
type = string
description = "(Optional) The title of the server. e.g. My Git Enterprise Server."
default = ""
}
variable "compliance_pipeline_repo_git_provider" {
type = string
default = ""
description = "Git provider for compliance pipeline repo. If not set will default to `hostedgit`."
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.compliance_pipeline_repo_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for pipeline repo."
}
}
variable "compliance_pipeline_repo_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the ID of a custom GitHub Enterprise server."
default = ""
}
variable "compliance_pipeline_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token used for accessing the sample application repository."
default = ""
validation {
condition = startswith(var.compliance_pipeline_repo_git_token_secret_crn, "crn:") || var.compliance_pipeline_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "compliance_pipeline_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the compliance pipelines repository."
default = ""
}
variable "compliance_pipeline_repo_secret_group" {
type = string
description = "Secret group for the Compliance Pipeline repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "compliance_pipeline_source_repo_url" {
type = string
default = ""
description = "The URL of a compliance pipelines repository to clone."
}
variable "cos_api_key_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Cloud Object Storage apikey. Applies to the CI, CD and CC toolchains. Can beset independently using `ci_cos_api_key_secret_crn`,`cd_cos_api_key_secret_crn`,`cc_cos_api_key_secret_crn`."
default = ""
validation {
condition = startswith(var.cos_api_key_secret_crn, "crn:") || var.cos_api_key_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "cos_api_key_secret_group" {
type = string
description = "Secret group for the COS api key secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "cos_api_key_secret_name" {
type = string
description = "Name of the Cloud Object Storage API key secret in the secret provider for accessing the evidence COS bucket. In addition `cos_endpoint` and `cos_bucket_name` must be set. This setting sets the same API key for the COS settings in the CI, CD, and CC toolchains."
default = ""
}
variable "cos_api_key_secret_value" {
type = string
description = "A user provided api key with COS access permissions that can be pushed to Secrets Manager. See `cos_api_key_secret_name` and `create_cos_api_key`."
sensitive = true
default = ""
}
variable "cos_bucket_name" {
type = string
description = "Set the name of your COS bucket. This applies the same COS bucket name for the CI, CD, and CC toolchains."
default = ""
}
variable "cos_endpoint" {
type = string
description = "The endpoint for the Cloud Object Stroage instance containing the evidence bucket. This setting sets the same endpoint for COS in the CI, CD, and CC toolchains. See `ci_cos_endpoint`, `cd_cos_endpoint`, and `cc_cos_endpoint` to set the endpoints independently."
default = ""
}
variable "cos_instance_crn" {
type = string
description = "The CRN of the Cloud Object Storage instance containing the required bucket. This value is required to generate the correct access policies if creating IAM service credentials."
default = ""
}
variable "create_cc_toolchain" {
description = "Boolean flag which determines if the DevSecOps CC toolchain is created."
type = bool
default = true
}
variable "create_cd_instance" {
type = bool
description = "Set to `true` to create Continuous Delivery Service."
default = false
}
variable "create_cd_toolchain" {
description = "Boolean flag which determines if the DevSecOps CD toolchain is created."
type = bool
default = true
}
variable "create_ci_toolchain" {
description = "Flag which determines if the DevSecOps CI toolchain is created. If this toolchain is not created then values must be set for the following variables, evidence_repo_url, issues_repo_url and inventory_repo_url."
type = bool
default = true
}
variable "create_code_engine_access_policy" {
type = bool
description = "Add a Code Engine access policy to the generated IAM access key. See `create_ibmcloud_api_key`."
default = false
}
variable "create_cos_api_key" {
type = bool
description = "Set to `true` to create and add a `cos-api-key` to the Secrets Provider."
default = false
}
variable "create_git_token" {
type = bool
description = "Set to `true` to create and add the specified personal access token secret to the Secrets Provider. Use `repo_git_token_secret_value` for setting the value."
default = false
}
variable "create_ibmcloud_api_key" {
type = bool
description = "Set to `true` to create and add an `ibmcloud-api-key` to the Secrets Provider."
default = false
}
variable "create_icr_namespace" {
type = bool
description = "Set to `true` to have Terraform create the registry namespace. Setting to `false` will have the CI pipeline create the namespace if it does not already exist. Note: If a Terraform destroy is used, the ICR namespace along with all images will be removed."
default = false
}
variable "create_kubernetes_access_policy" {
type = bool
description = "Add a Kubernetes access policy to the generated IAM access key. See `create_ibmcloud_api_key`."
default = false
}
variable "create_privateworker_secret" {
type = bool
description = "Set to `true` to add a specified private worker service api key to the Secrets Provider. This also enables a private worker tool integration in the toolchains. "
default = false
}
variable "create_secret_group" {
type = bool
description = "Set to `true` to create the specified Secrets Manager secret group."
default = false
}
variable "create_signing_key" {
type = bool
description = "Set to `true` to create and add a `signing-key` and the `signing-certificate` to the Secrets Provider."
default = false
}
variable "create_triggers" {
type = string
description = "Set to `true` to create the default triggers associated with the compliance repos and sample app."
default = "true"
}
variable "enable_key_protect" {
type = string
description = "Set to `true` to the enable Key Protect integrations."
default = "false"
}
variable "enable_pipeline_notifications" {
type = string
description = "When enabled, pipeline run events will be sent to the Event Notifications and Slack integrations in the enclosing toolchain."
default = ""
}
variable "enable_secrets_manager" {
description = "Set to `true` to enable the Secrets Manager integrations."
type = string
default = "true"
}
variable "enable_privateworker" {
type = string
default = "false"
description = "Set to `true` to enable private workers for the CI, CD, CC and PR pipelines. A valid service api key must be set in Secrets Manager. The name of this secret can be specified using `privateworker_credentials_secret_name`."
}
variable "enable_slack" {
type = string
description = "Set to `true` to create the Slack toolchain integration. This requires a valid `slack_channel_name`, `slack_team_name`, and a valid `webhook` (see `slack_webhook_secret_name`). This setting applies for CI, CD, and CC toolchains."
default = "false"
}
variable "environment_prefix" {
type = string
description = "By default `ibm:yp:`. This will be set as the prefix to regions automatically where required. For example `ibm:yp:us-south`."
default = "ibm:yp:"
}
variable "environment_tag" {
type = string
description = "Tag name that represents the target environment in the inventory. Example: prod_latest."
default = "prod_latest"
}
variable "event_notifications_crn" {
type = string
description = "Set the Event Notifications CRN to create an Events Notification integration. This paramater will apply to the CI, CD and CC toolchains. Can be set independently with `ci_event_notifications_crn`, `cd_event_notifications_crn`, `cc_event_notifications_crn`."
default = ""
}
variable "event_notifications_tool_name" {
type = string
description = "The name of the Event Notifications integration."
default = "Event Notifications"
}
variable "evidence_group" {
type = string
description = "Specify the Git user or group for the evidence repository."
default = ""
}
variable "evidence_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "evidence_repo_existing_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "evidence_repo_existing_git_provider" {
type = string
default = ""
description = "Git provider for evidence repo. If not set will default to `hostedgit`."
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.evidence_repo_existing_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for evidence repository."
}
}
variable "evidence_repo_existing_url" {
type = string
description = "Set to use an existing evidence repository."
default = ""
}
variable "evidence_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token used for accessing the Evidence repository."
default = ""
validation {
condition = startswith(var.evidence_repo_git_token_secret_crn, "crn:") || var.evidence_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "evidence_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the evidence repository."
default = ""
}
variable "evidence_repo_integration_owner" {
type = string
description = "The name of the repository integration owner."
default = ""
}
variable "evidence_repo_name" {
type = string
description = "Set to use a custom name for the Evidence repository."
default = ""
}
variable "evidence_repo_secret_group" {
type = string
description = "Secret group for the Evidence repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "force_create_standard_api_key" {
type = bool
description = "Set to `true` to force create a standard api key. By default the generated apikey will be a service api key. It is recommended to use a Git Token when using the service api key. In the case where the user has been invited to an account and that user not the account owner, during toolchain creation the default compliance repositories will be created in that user's account and the service api will not have access to those repositories. In this case a Git Token for the repositories is required. See `repo_git_token_secret_name` for more details. The alternative is to set `force_create_standard_api_key` to `true` to create a standard api key."
default = false
}
variable "ibmcloud_api_key" {
type = string
description = "The API key used to create the toolchains. (See deployment guide.)"
sensitive = true
}
variable "ibmcloud_api" {
type = string
description = "The environment URL. When left unset this will default to `https://cloud.ibm.com`"
default = ""
}
variable "inventory_group" {
type = string
description = "Specify the Git user or group for the inventory repository."
default = ""
}
variable "inventory_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "inventory_repo_existing_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "inventory_repo_existing_git_provider" {
type = string
default = ""
description = "Git provider for the inventory repo. If not set will default to `hostedgit`."
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.inventory_repo_existing_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for Inventory repository."
}
}
variable "inventory_repo_existing_url" {
type = string
description = "Set to use an existing inventory repository."
default = ""
}
variable "inventory_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token used for acessing the Inventory repository."
default = ""
validation {
condition = startswith(var.inventory_repo_git_token_secret_crn, "crn:") || var.inventory_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "inventory_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the inventory repository."
default = ""
}
variable "inventory_repo_integration_owner" {
type = string
description = "The name of the repository integration owner."
default = ""
}
variable "inventory_repo_name" {
type = string
description = "Set to use a custom name for the Inventory repository."
default = ""
}
variable "inventory_repo_secret_group" {
type = string
description = "Secret group for the Inventory repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "issues_group" {
type = string
description = "Specify the Git user or group for the issues repository."
default = ""
}
variable "issues_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "issues_repo_existing_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "issues_repo_existing_git_provider" {
type = string
default = ""
description = "Git provider for the issues repo. If not set will default to `hostedgit`."
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.issues_repo_existing_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for issue repository."
}
}
variable "issues_repo_existing_url" {
type = string
description = "By default this gets set as 'hostedgit', else set to 'githubconsolidated' for GitHub repositories."
default = ""
}
variable "issues_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token used for accessing the Issues repository."
default = ""
validation {
condition = startswith(var.issues_repo_git_token_secret_crn, "crn:") || var.issues_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "issues_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the issues repository."
default = ""
}
variable "issues_repo_integration_owner" {
type = string
description = "The name of the repository integration owner."
default = ""
}
variable "issues_repo_name" {
type = string
description = "Set to use a custom name for the Issues repository."
default = ""
}
variable "issues_repo_secret_group" {
type = string
description = "Secret group for the Issues repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "kp_integration_name" {
type = string
description = "The name of the Key Protect integration."
default = "kp-compliance-secrets"
}
variable "kp_location" {
type = string
description = "The region hosting the Key Protect instance. This applies to the CI, CD and CC Key Protect integrations. See `ci_kp_location`, `cd_kp_location`, and `cc_kp_location` to set these values ."
default = "us-south"
}
variable "kp_name" {
type = string
description = "Name of the Key Protect instance where the secrets are stored. This applies to the CI, CD and CC Key Protect integrations. See `ci_kp_name`, `cd_kp_name`, and `cc_kp_name` to set these values independently."
default = "kp-compliance-secrets"
}
variable "kp_resource_group" {
type = string
description = "The resource group containing the Key Protect instance. This applies to the CI, CD and CC Key Protect integrations. See `ci_kp_resource_group`, `cd_kp_resource_group`, and `cc_kp_resource_group` to set these values independently."
default = "Default"
}
variable "pipeline_config_repo_auth_type" {
type = string
description = "Select the method of authentication that is used to access the Git repository. Valid values are 'oauth' or 'pat'. Defaults to `oauth` when unset. `pat` is a git `personal access token`."
default = ""
}
variable "pipeline_config_repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN of the Git token for accessing the pipeline config repository."
default = ""
validation {
condition = startswith(var.pipeline_config_repo_git_token_secret_crn, "crn:") || var.pipeline_config_repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "pipeline_config_repo_existing_url" {
type = string
description = "Specify and link to an existing repository containing a custom pipeline-config.yaml file."
default = ""
}
variable "pipeline_config_repo_clone_from_url" {
type = string
description = "Specify a repository containing a custom pipeline-config.yaml file."
default = ""
}
variable "pipeline_config_repo_branch" {
type = string
description = "Specify the branch containing the custom pipeline-config.yaml file."
default = ""
}
variable "pipeline_ibmcloud_api_key_secret_group" {
type = string
description = "Secret group for the pipeline ibmcloud API key secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "pipeline_config_repo_git_id" {
type = string
description = "Set this value to `github` for github.com, or to the GUID of a custom GitHub Enterprise server."
default = ""
}
variable "pipeline_config_repo_git_provider" {
type = string
default = ""
description = "Git provider for pipeline repo config"
validation {
condition = contains(["hostedgit", "githubconsolidated", "gitlab", ""], var.pipeline_config_repo_git_provider)
error_message = "Must be either \"hostedgit\" or \"gitlab\" or \"githubconsolidated\" for pipeline config repo."
}
}
variable "pipeline_config_group" {
type = string
description = "Specify the Git user or group for the compliance pipeline repository."
default = ""
}
variable "pipeline_config_repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider used for accessing the pipeline config repository."
default = ""
}
variable "pipeline_config_repo_secret_group" {
type = string
description = "Secret group for the Pipeline Config repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "pipeline_doi_api_key_secret_crn" {
type = string
sensitive = true
description = "The CRN of the DOI (DevOps Insights) apikey used for accessing a specific toolchain Insights instance. Applies to the CI, CD and CC toolchains."
default = ""
validation {
condition = startswith(var.pipeline_doi_api_key_secret_crn, "crn:") || var.pipeline_doi_api_key_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "pipeline_doi_api_key_secret_group" {
type = string
description = "Secret group for the pipeline DOI api key. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`. Applies to the CI, CD and CC toolchains."
default = ""
}
variable "pipeline_doi_api_key_secret_name" {
type = string
description = "Name of the Cloud API key secret in the secret provider to access the toolchain containing the Devops Insights instance. This will apply to the CI, CD and CC toolchains."
default = ""
}
variable "pipeline_git_tag" {
type = string
description = "The GIT tag selector for the Compliance Pipelines definitions."
default = ""
}
variable "pipeline_ibmcloud_api_key_secret_crn" {
type = string
sensitive = true
description = "The CRN of the IBMCloud apikey used for running the pipelines."
default = ""
validation {
condition = startswith(var.pipeline_ibmcloud_api_key_secret_crn, "crn:") || var.pipeline_ibmcloud_api_key_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "pipeline_ibmcloud_api_key_secret_name" {
type = string
description = "Name of the Cloud API key secret in the secret provider for running the pipelines. Applies to the CI, CD and CC toolchains."
default = "ibmcloud-api-key"
}
variable "pipeline_ibmcloud_api_key_secret_value" {
type = string
description = "A user provided api key for running the toolchain pipelines that can be pushed to Secrets Manager. See `pipeline_ibmcloud_api_key_secret_name` and `create_ibmcloud_api_key`."
sensitive = true
default = ""
}
variable "privateworker_credentials_secret_crn" {
type = string
sensitive = true
description = "The CRN for the Private Worker secret secret."
default = ""
validation {
condition = startswith(var.privateworker_credentials_secret_crn, "crn:") || var.privateworker_credentials_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "privateworker_credentials_secret_group" {
type = string
description = "Secret group prefix for the Private Worker secret. Defaults to using `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "privateworker_credentials_secret_name" {
type = string
default = ""
description = "Name of the privateworker secret in the secret provider."
}
variable "privateworker_name" {
type = string
description = "The name of the private worker tool integration."
default = "private-worker-tool-01"
}
variable "privateworker_secret_value" {
type = string
sensitive = true
description = "The private worker service api key that will be added to the `privateworker_credentials_secret_name` secret in the secrets provider."
default = ""
}
variable "pr_pipeline_git_tag" {
type = string
description = "The GIT tag selector for the Compliance Pipelines definitions."
default = ""
}
variable "prefix" {
type = string
description = "A prefix that is added to the toolchain resources."
default = ""
}
variable "registry_namespace" {
type = string
description = "A unique namespace within the IBM Cloud Container Registry region where the application image is stored."
default = ""
}
variable "repo_apply_settings_to_compliance_repos" {
type = bool
description = "Set to `true` to apply the same settings to all the default compliance repositories. Set to `false` to apply these settings to only the sample application, pipeline config and the deployment repositories."
default = true
}
variable "repo_blind_connection" {
type = bool
description = "Setting this value to `true` means the server is not addressable on the public internet. IBM Cloud will not be able to validate the connection details you provide. Certain functionality that requires API access to the git server will be disabled. Delivery pipeline will only work using a private worker that has network access to the git server."
default = false
}
variable "repo_git_id" {
type = string
description = "The Git ID for the compliance repositories."
default = ""
}
variable "repo_git_provider" {
type = string
description = "The Git provider type."
default = ""
}
variable "repo_git_token_secret_crn" {
type = string
sensitive = true
description = "The CRN for the repositories Git Token."
default = ""
validation {
condition = startswith(var.repo_git_token_secret_crn, "crn:") || var.repo_git_token_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "repo_git_token_secret_name" {
type = string
description = "Name of the Git token secret in the secret provider. Specifying a secret name for the Git Token automatically sets the authentication type to `pat`."
default = ""
}
variable "repo_git_token_secret_value" {
type = string
sensitive = true
description = "The personal access token that will be added to the `repo_git_token_secret_name` secret in the secrets provider."
default = ""
}
variable "repo_group" {
type = string
description = "Specify the Git user or group for your application. This must be set if the repository authentication type is `pat` (personal access token)."
default = ""
}
variable "repo_root_url" {
type = string
description = "(Optional) The Root URL of the server. e.g. https://git.example.com."
default = ""
}
variable "repo_secret_group" {
type = string
description = "Secret group in Secrets Manager that contains the secret for the repository. This variable will set the same secret group for all the repositories. Can be overriden on a per secret group basis. Only applies when using Secrets Manager."
default = ""
}
variable "repositories_prefix" {
type = string
description = "Prefix name for the cloned compliance repos. For the repositories_prefix value only a-z, A-Z and 0-9 and the special characters `-_` are allowed. In addition the string must not end with a special character or have two consecutive special characters."
default = "compliance"
validation {
condition = (
(can(regex("^[0-9A-Za-z\\-\\_]+$", var.repositories_prefix))) && ((endswith(var.repositories_prefix, "-") == false) && (endswith(var.repositories_prefix, "_") == false))
&& (strcontains(var.repositories_prefix, "--") == false) && (strcontains(var.repositories_prefix, "__") == false) && (strcontains(var.repositories_prefix, "_-") == false)
&& (strcontains(var.repositories_prefix, "-_") == false)
)
error_message = "For the repositories_prefix value only a-z, A-Z and 0-9 and the special characters `-_` are allowed. In addition the string must not end with a special character or have two consecutive special characters."
}
}
variable "repo_title" {
type = string
description = "(Optional) The title of the server. e.g. My Git Enterprise Server."
default = ""
}
variable "rotation_period" {
type = number
description = "The number of days until the `ibmcloud-api-key` and the `cos-api-key` are auto rotated."
default = 90
}
variable "rotate_signing_key" {
type = bool
description = "Set to `true` to rotate the signing key and signing certificate. It is important to make a back up for the current code signing certificate as pending CD deployments might require image validation against the previous signing key."
default = false
}
variable "scc_attachment_id" {
type = string
description = "An attachment ID. An attachment is configured under a profile to define how a scan will be run. To find the attachment ID, in the browser, in the attachments list, click on the attachment link, and a panel appears with a button to copy the attachment ID. This parameter is only relevant when the `scc_use_profile_attachment` parameter is enabled."
default = ""
}
variable "scc_enable_scc" {
type = string
description = "Adds the SCC tool integration to the toolchain."
default = "true"
}
variable "scc_instance_crn" {
type = string
description = "The Security and Compliance Center service instance CRN (Cloud Resource Name). This parameter is only relevant when the `scc_use_profile_attachment` parameter is enabled."
default = ""
}
variable "scc_profile_name" {
type = string
description = "The name of a Security and Compliance Center profile. Use the `IBM Cloud Framework for Financial Services` profile, which contains the DevSecOps Toolchain rules. Or use a user-authored customized profile that has been configured to contain those rules. This parameter is only relevant when the `scc_use_profile_attachment` parameter is enabled."
default = ""
}
variable "scc_profile_version" {
type = string
description = "The version of a Security and Compliance Center profile, in SemVer format, like `0.0.0`. This parameter is only relevant when the `scc_use_profile_attachment` parameter is enabled."
default = ""
}
variable "scc_scc_api_key_secret_crn" {
type = string
sensitive = true
description = "The CRN for the SCC apikey."
default = ""
validation {
condition = startswith(var.scc_scc_api_key_secret_crn, "crn:") || var.scc_scc_api_key_secret_crn == ""
error_message = "Must be a CRN or left empty."
}
}
variable "scc_scc_api_key_secret_group" {
type = string
description = "Secret group for the Security and Compliance tool secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`."
default = ""
}
variable "scc_scc_api_key_secret_name" {
type = string
description = "The name of the Security and Compliance Center api-key secret in the secret provider."
default = "scc-api-key"
}
variable "scc_use_profile_attachment" {
type = string
description = "Set to `enabled` to enable use profile with attachment, so that the scripts in the pipeline can interact with the Security and Compliance Center service. When enabled, other parameters become relevant; `scc_scc_api_key_secret_name`, `scc_instance_crn`, `scc_profile_name`, `scc_profile_version`, `scc_attachment_id`. Can individually be `enabled` and `disabled` in the CD and CC toolchains using `cd_scc_use_profile_attachment` and `cc_scc_use_profile_attachment`."
default = "disabled"
}
variable "slack_channel_name" {
type = string
description = "The name of the Slack channel where notifications are posted. This applies to the CI, CD, and CC toolchains. To set independently see `ci_slack_channel_name`, `cd_slack_channel_name`, and `cc_slack_channel_name`."
default = ""