File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ module "cbr_account_level" {
87
87
" enforcement_mode" = " enabled"
88
88
" global_deny" = false # mandatory to set 'global_deny = false' when no scope is defined
89
89
}
90
+ " databases-for-postgresql" = {
91
+ " enforcement_mode" = " enabled"
92
+ " target_rg" = module.resource_group.resource_group_id
93
+ }
90
94
" messagehub" = {
91
95
# As the service is scoped, a new global rule will also get created
92
96
" enforcement_mode" = " enabled"
Original file line number Diff line number Diff line change @@ -448,7 +448,17 @@ module "global_deny_cbr_rule" {
448
448
rule_description = try (each. value . description , null ) != null ? each. value . description : " ${ var . prefix } -${ each . key } -global-deny-rule"
449
449
enforcement_mode = each. value . enforcement_mode
450
450
rule_contexts = []
451
-
451
+ operations = (length (lookup (local. operations_apitype_val , each. key , [])) > 0 ) ? [{
452
+ api_types = [
453
+ # lookup the map for the target service name, if empty then pass default value
454
+ for apitype in lookup (local. operations_apitype_val , each. key , []) : {
455
+ api_type_id = apitype
456
+ }]
457
+ }] : [{
458
+ api_types = [{
459
+ api_type_id = " crn:v1:bluemix:public:context-based-restrictions::::api-type:"
460
+ }]
461
+ }]
452
462
resources = [{
453
463
tags = try (each. value . tags , null ) != null ? [for tag in each . value . tags : {
454
464
name = split (" :" , tag)[0 ]
You can’t perform that action at this time.
0 commit comments