You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="(List) Service reference for the zone creation"
30
+
type=map(object({
31
+
serviceRef_location =optional(list(string), [])
32
+
}))
33
+
description="Provide a valid service reference with the location where the context-based restriction zones are created. If no value is specified for `serviceRef_location`, the zones are not scoped to any location."
34
+
default={
35
+
"cloud-object-storage"= {
36
+
serviceRef_location = ["syd", "au"]
37
+
},
38
+
"server-protect"= {
39
+
serviceRef_location = ["au"]
40
+
},
41
+
"directlink"= {}, # directlink does not support restriction per location, hence no value is specified for serviceRef_location.
42
+
"event-notifications"= {}
43
+
}
39
44
}
40
45
46
+
41
47
variable"endpoints" {
42
48
type=list(string)
43
49
description="List specific endpoint types for target services, valid values for endpoints are 'public', 'private' or 'direct'"
| <aname="input_endpoints"></a> [endpoints](#input\_endpoints)| List specific endpoint types for target services, valid values for endpoints are 'public', 'private' or 'direct' |`list(string)`| <pre>[<br> "private"<br>]</pre> | no |
52
-
| <aname="input_location"></a> [location](#input\_location)| The region in which the network zone is scoped |`string`| n/a | yes |
53
60
| <aname="input_prefix"></a> [prefix](#input\_prefix)| Prefix to append to all vpc\_zone\_list, service\_ref\_zone\_list and cbr\_rule\_description created by this submodule |`string`|`"serviceprofile"`| no |
54
61
| <aname="input_target_service_details"></a> [target\_service\_details](#input\_target\_service\_details)| (String) Details of the target service for which the rule has to be created | <pre>list(object({<br> target_service_name = string<br> target_rg = optional(string)<br> enforcement_mode = string<br> tags = optional(list(string))<br> }))</pre> | n/a | yes |
55
-
| <aname="input_zone_service_ref_list"></a> [zone\_service\_ref\_list](#input\_zone\_service\_ref\_list)|(List) Service reference for the zone creation |`list(string)`|`[]`| no|
62
+
| <aname="input_zone_service_ref_list"></a> [zone\_service\_ref\_list](#input\_zone\_service\_ref\_list)|Provide a valid service reference with the location where the context-based restriction zones are created. If no value is specified for `serviceRef_location`, the zones are not scoped to any location. | <pre>map(object({<br> serviceRef_location = optional(list(string), [])<br> }))</pre> | n/a | yes|
56
63
| <aname="input_zone_vpc_crn_list"></a> [zone\_vpc\_crn\_list](#input\_zone\_vpc\_crn\_list)| (List) VPC CRN for the zones |`list(string)`|`[]`| no |
Copy file name to clipboardExpand all lines: modules/cbr-service-profile/main.tf
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,12 @@ data "ibm_iam_account_settings" "iam_account_settings" {
11
11
locals {
12
12
# tflint-ignore: terraform_unused_declarations
13
13
validate_zone_inputs=((length(var.zone_vpc_crn_list) ==0) && (length(var.zone_service_ref_list) ==0)) ?tobool("Error: Provide a valid zone vpc and/or service references") :true
14
-
# tflint-ignore: terraform_unused_declarations
15
-
validate_location_and_service_name=(length(setintersection(["directlink", "globalcatalog-collection", "iam-groups", "user-management"], var.zone_service_ref_list)) >0&& var.location!=null) ?tobool("Error: The services 'directlink', 'globalcatalog-collection', 'iam-groups' and 'user-management' does not support location") :true
contains(keys(var.zone_service_ref_list), item) ?length(var.zone_service_ref_list[item].serviceRef_location) ==0?true:tobool("Error: The services 'directlink', 'globalcatalog-collection', 'iam-groups' and 'user-management' do not support location") :true
19
+
]
18
20
19
21
# Restrict and allow the api types as per the target service
description="Provide a valid service reference with the location where the context-based restriction zones are created. If no value is specified for `serviceRef_location`, the zones are not scoped to any location."
22
+
# Validation to restrict the target service name to be the list of supported targets only.
0 commit comments