-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
1755 lines (1492 loc) · 48.3 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
# ------------------------------------------------------------------------------
# REQUIRED VARIABLES
# These variables must be set when using this module.
# ------------------------------------------------------------------------------
variable "security_group_ingress_allow_access_from_cidr_range" {
description = <<-EOT
(Required) Comma delimited string of IPv4 CIDR range to allow access to anyscale resources.
This should be the list of CIDR ranges that have access to the clusters. Public or private IPs are supported.
This is added to the security group and allows port 443 (https) and 22 (ssh) access.
While not recommended, you can set this to `0.0.0.0/0` to allow access from anywhere.
ex:
```
security_group_ingress_allow_access_from_cidr_range = "10.0.1.0/24,24.1.24.24/32"
```
EOT
type = string
}
# ------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# These variables have defaults, but may be overridden.
# ------------------------------------------------------------------------------
variable "anyscale_deploy_env" {
description = <<-EOF
(Optional) Anyscale deployment environment.
Used in resource names and tags.
ex:
```
anyscale_deploy_env = "production"
```
EOF
type = string
validation {
condition = (
var.anyscale_deploy_env == "production" || var.anyscale_deploy_env == "development" || var.anyscale_deploy_env == "test"
)
error_message = "The anyscale_deploy_env only allows `production`, `test`, or `development`"
}
default = "production"
}
variable "anyscale_cloud_id" {
description = <<-EOF
(Optional) Anyscale Cloud ID.
This is used to lock down the cross account access role by Cloud ID. Because the Cloud ID is unique to each
customer, this ensures that only the customer can access their own resources. The Cloud ID is not known until the
Cloud is created, so this is an optional variable.
ex:
```
anyscale_cloud_id = "cld_abcdefghijklmnop1234567890"
```
EOF
type = string
default = null
validation {
condition = (
var.anyscale_cloud_id == null ? true : (
length(var.anyscale_cloud_id) > 4 &&
substr(var.anyscale_cloud_id, 0, 4) == "cld_"
)
)
error_message = "The anyscale_cloud_id value must start with \"cld_\"."
}
}
variable "anyscale_org_id" {
description = <<-EOT
(Optional) Anyscale Organization ID.
This is used to lock down the cross account access role by Organization ID. Because the Organization ID is unique to each
customer, this ensures that only the customer can access their own resources.
ex:
```
anyscale_org_id = "org_abcdefghijklmn1234567890"
```
EOT
type = string
default = null
validation {
condition = (
var.anyscale_org_id == null ? true : (
length(var.anyscale_org_id) > 4 &&
substr(var.anyscale_org_id, 0, 4) == "org_"
)
)
error_message = "The anyscale_org_id value must start with \"org_\"."
}
}
variable "tags" {
description = <<-EOT
(Optional) A map of tags.
A map of default tags to be added to all resources that accept tags.
Resource dependent tags will be appended to this list.
ex:
```
tags = {
application = "Anyscale",
environment = "prod"
}
```
EOT
type = map(string)
default = {}
}
variable "common_prefix" {
description = <<-EOT
(Optional) Common prefix.
A common prefix to add to resources created (where prefixes are allowed).
If paired with `use_common_name`, this will apply to all resources.
If this is not paired with `use_common_name`, this applies to:
- S3 Buckets
- IAM Resources
- Security Groups
Resource specific prefixes override this variable.
Max length is 30 characters.
ex:
```
common_prefix = "anyscale-"
```
EOT
type = string
default = null
validation {
condition = var.common_prefix == null || try(length(var.common_prefix) <= 30, false)
error_message = "common_prefix must either be `null` or less than 30 characters."
}
}
variable "use_common_name" {
description = <<-EOT
(Optional) Use a common name.
Determines if a standard name should be used across all resources.
If set to true and `common_prefix` is also provided, the `common_prefix` will be used prefixed to a common name.
If set to true and `common_prefix` is not provided, the prefix will be `anyscale-`
If set to true, this will also use a random suffix to avoid name collisions.
ex:
```
use_common_name = true
```
EOT
type = bool
default = false
}
variable "random_name_suffix_length" {
description = <<-EOT
(Optional) Random name suffix length.
Determines the random suffix length that is used to generate a common name.
Certain AWS resources have a hard limit on name lengths and this will allow
the ability to control how many characters are added as a suffix.
Must be >= 2 and <= 30.
ex:
```
random_name_suffix_length = 6
```
EOT
type = number
default = 6
validation {
condition = try(var.random_name_suffix_length >= 2, var.random_name_suffix_length <= 30, false)
error_message = "random_name_suffix_length must either be >= 2 and <= 30"
}
}
#--------------------------------------------
# VPC Variables
#--------------------------------------------
variable "existing_vpc_id" {
description = <<-EOT
(Optional) An existing VPC ID.
If provided, this will skip creating resources a new VPC with the Anyscale VPC module.
Subnet IDs are also required if this is provided.
ex:
```
existing_vpc_id = "vpc-1234567890"
```
EOT
type = string
default = null
}
variable "existing_vpc_subnet_ids" {
description = <<-EOT
(Optional) Existing subnet IDs.
If provided, this will skip creating a new VPC with the Anyscale VPC module.
The variable `existing_vpc_id` also needs to be provided.
ex:
```
existing_vpc_subnet_ids = ["subnet-1234567890", "subnet-0987654321"]
```
EOT
type = list(string)
default = []
}
variable "existing_vpc_private_route_table_ids" {
description = <<-EOT
(Optional) Existing VPC Private Route Table IDs.
If provided, this will map new private subnets to these route table IDs.
If no new subnets are created, these route tables will be used to create VPC Endpoint(s).
ex:
```
existing_vpc_private_route_table_ids = ["rtb-1234567890", "rtb-0987654321"]
```
EOT
type = list(string)
default = []
}
variable "existing_vpc_public_route_table_ids" {
description = <<-EOT
(Optional) Existing VPC Public Route Table IDs.
If provided, these route tables will be used to create VPC Endpoint(s).
ex:
```
existing_vpc_public_route_table_ids = ["rtb-1234567890", "rtb-0987654321"]
```
EOT
type = list(string)
default = []
}
variable "anyscale_vpc_name" {
description = <<-EOT
(Optional) VPC name.
If provided, will create a VPC with this name.
Defaults to `vpc_<anyscale_cloud_id>` in a local variable if not provided.
ex:
```
anyscale_vpc_name = "anyscale-vpc"
```
EOT
type = string
default = null
}
variable "anyscale_vpc_cidr_block" {
description = <<-EOT
(Optional) The IPv4 CIDR block for the VPC.
The CIDR block can be explicitly set or it can be derived from IPAM using `ipv4_netmask_length` & `ipv4_ipam_pool_id`.
ex:
```
anyscale_vpc_cidr_block = "10.0.0.0/16"
```
EOT
type = string
default = "10.0.0.0/16"
}
variable "anyscale_vpc_public_subnets" {
description = <<-EOT
(Optional) A list of public subnets inside the VPC.
If this variable is provided, public subnets will be created with these CIDR blocks.
ex:
```
anyscale_vpc_public_subnets = [
"10.0.21.0/24",
"10.0.22.0/24",
"10.0.23.0/24"
]
```
EOT
type = list(string)
default = []
}
variable "anyscale_vpc_public_subnet_tags" {
description = <<-EOT
(Optional) A map of tags for public subnets.
Duplicate tags found in the `tags` or `anyscale_vpc_tags` variables will get duplicated on the resource.
ex:
```
anyscale_vpc_public_subnet_tags = {
"purpose" : "networking",
"criticality" : "critical"
}
```
EOT
type = map(string)
default = {}
}
variable "anyscale_vpc_private_subnets" {
description = <<-EOT
(Optional) A list of private subnets inside the VPC.
If this variable is provided, private subnets will be created with these CIDR blocks.
ex:
```
anyscale_vpc_private_subnets = [
"10.0.121.0/24",
"10.0.122.0/24",
"10.0.123.0/24"
]
```
EOT
type = list(string)
default = []
}
variable "anyscale_vpc_private_subnet_tags" {
description = <<-EOT
(Optional) A map of tags for private subnets.
Duplicate tags found in the `tags` or `anyscale_vpc_tags` variables will get duplicated on the resource.
ex:
```
anyscale_vpc_private_subnet_tags = {
"purpose" : "networking",
"criticality" : "critical"
}
```
EOT
type = map(string)
default = {}
}
variable "anyscale_vpc_tags" {
description = <<-EOT
(Optional) A map of tags for VPC resources.
Duplicate tags found in the "tags" variable will get duplicated on the resource.
ex:
```
anyscale_vpc_tags = {
"purpose" : "networking",
"criticality" : "critical"
}
```
EOT
type = map(string)
default = {}
}
variable "anyscale_gateway_vpc_endpoints" {
description = <<-EOT
(Optional) A map of Gateway VPC Endpoints to provision into the VPC.
This is a map of objects with the following attributes:
- `name`: Short service name (either "s3" or "dynamodb")
- `policy` = A policy (as JSON string) to attach to the endpoint that controls access to the service. May be `null` for full access.
See the submodule variable for additional examples.
It is Anyscale's recommendation to have an S3 VPC Endpoint to minimize S3 costs and maximize S3 performance.
Set to an empty map `{}` to skip creating VPC Endpoints.
ex:
```
anyscale_gateway_vpc_endpoints = {
"s3" = {
name = "s3"
policy = null
}
}
```
EOT
type = map(object({
name = string
policy = string
}))
default = {
"s3" = {
name = "s3"
policy = null
}
}
}
# variable "create_memorydb_subnets" {
# description = <<-EOT
# (Optional) Create MemoryDB subnets.
# If set to true, this will create MemoryDB subnets in the VPC. In this case, if the `create_memorydb_resources` is set to true, private subnets for MemoryDB will be created and used.
# If set to false, this will not create MemoryDB subnets in the VPC. In this case, if the `create_memorydb_resources` is set to true, the private subnets will be used to create MemoryDB subnets.
# Also requires `create_memorydb_resources` to be set to true.
# ex:
# ```
# create_memorydb_subnets = true
# ```
# EOT
# type = bool
# default = false
# }
# variable "anyscale_vpc_memorydb_subnets" {
# description = <<-EOT
# (Optional) A list of MemoryDB subnets inside the VPC.
# MemoryDB subnets will be created with these CIDR blocks. Also requires `create_memorydb_subnets` and `create_memorydb_resources` to both be set to true.
# ex:
# ```
# anyscale_vpc_memorydb_subnets = [
# "10.0.130.0/24",
# "10.0.131.0/24",
# ]
# ```
# EOT
# type = list(string)
# default = []
# }
# variable "anyscale_vpc_memorydb_subnet_tags" {
# description = <<-EOT
# (Optional) A map of tags for MemoryDB subnets.
# Duplicate tags found in the `tags` or `anyscale_vpc_tags` variables will get duplicated on the resource.
# ex:
# ```
# anyscale_vpc_memorydb_subnet_tags = {
# "purpose" : "networking",
# "criticality" : "critical"
# }
# ```
# EOT
# type = map(string)
# default = {}
# }
#--------------------------------------------
# IAM Variables
#--------------------------------------------
# Cross Acct Access Role
variable "anyscale_iam_access_role_name" {
description = <<-EOT
(Optional, forces creation of new resource) The name of the Anyscale IAM access role.
If left `null`, the name will default to `anyscale_iam_access_role_name_prefix` or `general_prefix`.
If provided, overrides the `anyscale_iam_access_role_name_prefix` variable.
ex:
```
anyscale_iam_access_role_name = "anyscale-iam-crossacct-role"
```
EOT
type = string
default = null
}
variable "anyscale_iam_access_role_name_prefix" {
description = <<-EOT
(Optional, forces creation of new resource) The prefix for the Anyscale IAM access role.
If `anyscale_iam_access_role_name_prefix` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-iam-role-` in a local variable.
ex:
```
anyscale_iam_access_role_name_prefix = "anyscale-crossacct-role-"
```
EOT
type = string
default = null
}
variable "anyscale_access_role_description" {
description = <<-EOT
(Optional) The IAM role description for the Anysclae IAM access role.
This role is used for cross account access from the Anyscale Controlplane to an AWS account and allows access to manage AWS resources.
ex:
```
anyscale_access_role_description = "Anyscale cross account access role"
```
EOT
type = string
default = "Anyscale access role"
}
variable "anyscale_access_role_trusted_role_arns" {
description = <<-EOT
(Optional) Access Role Trusted Role ARNs.
A list of ARNs of IAM roles that are allowed to assume the Anyscale IAM access role.
Default is an empty list and the default in the `aws-anyscale-iam` sub-module is used.
This variable should not be used unless directed by Anyscale.
EOT
type = list(string)
default = []
}
variable "anyscale_access_steadystate_policy_name" {
description = <<-EOT
(Optional) Name for the Anyscale default steady state IAM policy.
If left `null`, will default to `anyscale_access_steadystate_policy_prefix` or `general_prefix`.
If provided, overrides the `anyscale_access_steadystate_policy_prefix` variable.
ex:
```
anyscale_access_steadystate_policy_name = "anyscale-steadystate-policy"
```
EOT
type = string
default = null
}
variable "anyscale_access_steadystate_policy_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale default steady state IAM policy.
If `anyscale_access_steadystate_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-steady_state-` in a local variable.
ex:
```
anyscale_access_steadystate_policy_prefix = "anyscale-steadystate-policy-"
```
EOT
type = string
default = null
}
variable "anyscale_access_steadystate_policy_description" {
description = <<-EOT
(Optional) Anyscale steady state IAM policy description.
ex:
```
anyscale_access_steadystate_policy_description = "Anyscale Steady State IAM Policy which is used by the Anyscale IAM Access Role"
```
EOT
type = string
default = "Anyscale Steady State IAM Policy which is used by the Anyscale IAM Access Role"
}
variable "anyscale_access_servicesv2_policy_name" {
description = <<-EOT
(Optional) Name for the Anyscale default servicesv2 IAM policy.
If left `null`, will default to `anyscale_access_servicesv2_policy_prefix` or `general_prefix`.
If provided, overrides the `anyscale_access_servicesv2_policy_prefix` variable.
ex:
```
anyscale_access_servicesv2_policy_name = "anyscale-servicesv2-policy"
```
EOT
type = string
default = null
}
variable "anyscale_access_servicesv2_policy_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale default servicesv2 IAM policy.
If `anyscale_access_servicesv2_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-servicesv2-` in a local variable.
ex:
```
anyscale_access_servicesv2_policy_prefix = "anyscale-servicesv2-policy-"
```
EOT
type = string
default = null
}
variable "anyscale_access_servicesv2_policy_description" {
description = <<-EOT
(Optional) Anyscale servicesv2 IAM policy description.
ex:
```
anyscale_access_servicesv2_policy_description = "Anyscale Services v2 IAM Policy which is used by the Anyscale IAM Access Role"
```
EOT
type = string
default = "Anyscale Services v2 IAM Policy which is used by the Anyscale IAM Access Role"
}
# Anyscale Access Role Custom Policy
variable "anyscale_accessrole_custom_policy_name" {
description = <<-EOT
(Optional) Name for an Anyscale custom IAM policy.
If left `null`, will default to `anyscale_custom_policy_name_prefix` or `general_prefix`.
If provided, overrides the `anyscale_accessrole_custom_policy_name_prefix` variable.
ex:
```
anyscale_accessrole_custom_policy_name = "anyscale-custom-policy"
```
EOT
type = string
default = null
}
variable "anyscale_accessrole_custom_policy_name_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale custom IAM policy.
If `anyscale_accessrole_custom_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-crossacct-custom-policy-` in a local variable.
ex:
```
anyscale_accessrole_custom_policy_name_prefix = "anyscale-custom-policy-"
```
EOT
type = string
default = null
}
variable "anyscale_accessrole_custom_policy_description" {
description = <<-EOT
(Optional) Anyscale IAM custom policy description.
ex:
```
anyscale_accessrole_custom_policy_description = "Anyscale custom IAM policy"
```
EOT
type = string
default = "Anyscale custom IAM policy"
}
variable "anyscale_accessrole_custom_policy" {
description = <<-EOT
(Optional) Anyscale custom IAM policy.
This policy will be applied in addition to the default policies added to the Anyscale Access IAM Role.
Note: Any customizations to the IAM Role need to be carefully tested and Anyscale is not
responsible for any problems that may occur due to misconfiguring the policy and/or Anyscale Access Role.
Must be a valid IAM policy.
ex:
```
anyscale_accessrole_custom_policy = {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllActions",
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
EOT
type = string
default = null
}
# Cluster Node Role
variable "anyscale_iam_cluster_node_role_name" {
description = <<-EOT
(Optional, forces creation of new resource) The name of the Anyscale IAM cluster node role.
If left `null`, will default to `anyscale_iam_access_role_name_prefix` or `general_prefix`.
If provided, overrides the `anyscale_iam_cluster_node_role_name_prefix` variable.
ex:
```
anyscale_iam_cluster_node_role_name = "anyscale-cluster-node-role"
```
EOT
type = string
default = null
}
variable "anyscale_iam_cluster_node_role_name_prefix" {
description = <<-EOT
(Optional, forces creation of new resource) The prefix of the Anyscale Cluster Node IAM role.
If `anyscale_iam_cluster_node_role_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-cluster-node-` in a local variable.
ex:
```
anyscale_iam_cluster_node_role_name_prefix = "anyscale-cluster-node-role-"
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_role_description" {
description = <<-EOT
(Optional) The IAM Role description for the Anyscale Cluster Node Role.
This role is used by compute resources to access resources within an AWS account.
ex:
```
anyscale_cluster_node_role_description = "Anyscale cluster node role"
```
EOT
type = string
default = "Anyscale cluster node role"
}
variable "anyscale_cluster_node_custom_policy_name" {
description = <<-EOT
(Optional) Name for the Anyscale cluster node custom IAM policy.
If left `null`, will default to `anyscale_cluster_node_custom_policy_prefix` or `general_prefix`.
If provided, overrides the `anyscale_cluster_node_custom_policy_name_prefix` variable.
ex:
```
anyscale_cluster_node_custom_policy_name = "anyscale-clusternode-custom-policy"
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_custom_policy_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale cluster node custom IAM policy.
If `anyscale_cluster_node_custom_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-clusternode-custom-policy-` in a local variable.
ex:
```
anyscale_cluster_node_custom_policy_prefix = "anyscale-clusternode-custom-policy-"
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_custom_policy_description" {
description = <<-EOT
(Optional) Anyscale IAM cluster node custom policy description.
ex:
```
anyscale_cluster_node_custom_policy_description = "Anyscale cluster node custom IAM policy"
```
EOT
type = string
default = "Anyscale cluster node custom IAM policy"
}
variable "anyscale_cluster_node_custom_policy" {
description = <<-EOT
(Optional) Anyscale cluster node custom IAM policy.
This policy will be applied in addition to the default policies added to the Cluster Node Role.
Note: Any customizations to the IAM Role need to be carefully tested and Anyscale is not
responsible for any problems that may occur due to misconfiguring the policy and/or Cluster Role.
Must be a valid IAM policy.
ex:
```
anyscale_cluster_node_custom_policy = {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllActions",
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_managed_policy_arns" {
description = <<-EOT
(Optional) List of IAM policy ARNs to attach to the role.
This allows custom or managed policies to be attached to the Anyscale Cluster Role which can be used to grant additional permissions.
ex:
```
anyscale_cluster_node_managed_policy_arns = [
"arn:aws:iam::aws:policy/AmazonSQSReadOnlyAccess",
"arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
]
```
EOT
type = list(string)
default = []
}
variable "create_cluster_node_cloudwatch_policy" {
description = <<-EOT
(Optional) Create the Anyscale Cluster Node Cloudwatch Policy
Determines whether to create the CloudWatch IAM policy for the cluster node role.
ex:
```
create_cluster_node_cloudwatch_policy = true
```
EOT
type = bool
default = false
}
variable "anyscale_cluster_node_cloudwatch_policy_description" {
description = <<-EOT
(Optional)
Anyscale IAM cluster node CloudWatch policy description.
ex:
```
anyscale_cluster_node_cloudwatch_policy_description = "Anyscale cluster node CloudWatch IAM policy"
```
EOT
type = string
default = "Anyscale cluster node CloudWatch IAM policy"
}
variable "anyscale_cluster_node_cloudwatch_policy_name" {
description = <<-EOT
(Optional) Name for the Anyscale cluster node CloudWatch IAM policy.
If left `null`, will default to `anyscale_cluster_node_cloudwatch_policy_prefix` or `general_prefix`.
If provided, overrides the `anyscale_cluster_node_cloudwatch_policy_name_prefix` variable.
ex:
```
anyscale_cluster_node_cloudwatch_policy_name = "anyscale-cluster-node-cloudwatch-policy"
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_cloudwatch_policy_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale cluster node CloudWatch IAM policy.
If `anyscale_cluster_node_cloudwatch_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-cluster-node-cloudwatch-policy-` in a local variable.
ex:
```
anyscale_cluster_node_cloudwatch_policy_prefix = "anyscale-cluster-node-cloudwatch-policy-"
```
EOT
type = string
default = null
}
#- Secrets Manager Policy
variable "anyscale_cluster_node_byod_secrets_policy_name" {
description = <<-EOT
(Optional) Name for the Anyscale cluster node Secrets IAM policy.
If left `null`, will default to `anyscale_cluster_node_secrets_policy_prefix` or `general_prefix`.
If provided, overrides the `anyscale_cluster_node_secrets_policy_prefix` variable.
ex:
```
anyscale_cluster_node_secrets_policy_name = "anyscale-cluster-node-secrets-policy"
#checkov:skip=CKV_SECRET_6:Secret Policy is not a secret'
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_byod_secrets_policy_prefix" {
description = <<-EOT
(Optional) Name prefix for the Anyscale cluster node Secrets IAM policy.
If `anyscale_cluster_node_secrets_policy_name` is provided, it will override this variable.
The variable `general_prefix` is a fall-back prefix if this is not provided.
Default is `null` but is set to `anyscale-cluster-node-secrets-` in a local variable.
ex:
```
anyscale_cluster_node_secrets_policy_prefix = "anyscale-cluster-node-secrets-"
#checkov:skip=CKV_SECRET_6:Secret Name Prefix is not a secret'
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_byod_secrets_policy_description" {
description = <<-EOT
(Optional) Anyscale IAM cluster node Secrets policy description.
ex:
```
anyscale_cluster_node_secrets_policy_description = "Anyscale Cluster Node Secrets Policy"
```
EOT
type = string
default = "Anyscale Cluster Node Secrets Policy"
}
variable "anyscale_cluster_node_byod_secret_arns" {
description = <<-EOT
(Optional) A list of Secrets Manager ARNs.
The Secrets Manager secret ARNs that the cluster node role needs access to for BYOD clusters.
ex:
```
anyscale_cluster_node_secret_arns = [
"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-1",
"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-2",
]
```
EOT
type = list(string)
default = []
}
variable "anyscale_cluster_node_byod_secret_kms_arn" {
description = <<-EOT
(Optional) The KMS key ARN that the Secrets Manager secrets are encrypted with.
This is only used if `anyscale_cluster_node_byod_secret_arns` is also provided.
ex:
```
anyscale_cluster_node_secret_arns = [
"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-1",
"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-2",
]
anyscale_cluster_node_secret_kms_arn = "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"
# checkov:skip=CKV_SECRET_6
```
EOT
type = string
default = null
}
variable "anyscale_cluster_node_byod_custom_secrets_policy" {
description = <<-EOT
(Optional) A custom IAM policy to attach to the cluster node role with access to the Secrets Manager secrets.
If provided, this will be used instead of generating a policy automatically.
ex:
```
anyscale_cluster_node_byod_custom_secrets_policy = {
"Version": "2012-10-17",
"Statement": [
"Sid": "SecretsManagerGetSecretValue",
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": [
"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret-1",
]
}
EOT
type = string
default = null
}
variable "anyscale_cluster_node_custom_assume_role_policy" {
description = <<-EOT