Skip to content

Commit 81fec02

Browse files
authored
feat: added latest serviceRef (#433)
1 parent 803c097 commit 81fec02

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

modules/cbr-service-profile/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ locals {
1212
# tflint-ignore: terraform_unused_declarations
1313
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
1414
# tflint-ignore: terraform_unused_declarations
15-
validate_location_and_service_name = (length(setintersection(["compliance", "directlink", "iam-groups", "containers-kubernetes", "user-management"], var.zone_service_ref_list)) > 0 && var.location != null) ? tobool("Error: The services 'compliance','directlink','iam-groups','containers-kubernetes','user-management' does not support location") : true
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
1616

1717

1818

modules/cbr-service-profile/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ variable "zone_service_ref_list" {
2626
"databases-for-redis", "directlink",
2727
"iam-groups", "is", "messagehub",
2828
"messages-for-rabbitmq", "schematics", "secrets-manager", "server-protect", "user-management",
29-
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat"],
30-
service_ref)
29+
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat",
30+
"cloudantnosqldb", "globalcatalog-collection", "sysdig-monitor", "sysdig-secure", "toolchain"], service_ref)
3131
])
3232
error_message = "Provide a valid service reference for zone creation"
3333
}

modules/fscloud/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The module also pre-create CBR zone for each service in the account as a best pr
2525
Important: In order to avoid unexpected breakage in the account against which this module is executed, the CBR rule enforcement mode is set to 'report' (or 'disabled' for services not supporting 'report' mode) by default. It is recommended to test out this module first with these default, and then use the `target_service_details` variable to set the enforcement mode to "enabled" gradually by service. The [usage example](../../examples/fscloud/) demonstrates how to set the enforcement mode to 'enabled' for the key protect ("kms") service.
2626

2727
## Note
28-
The services 'compliance', 'directlink', 'iam-groups', 'containers-kubernetes', 'user-management' does not support restriction per location.
28+
The services 'directlink', 'globalcatalog-collection', 'iam-groups' and 'user-management' does not support restriction per location.
2929

3030
### Usage
3131

@@ -108,7 +108,7 @@ module "cbr_fscloud" {
108108
| <a name="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` | n/a | yes |
109109
| <a name="input_skip_specific_services_for_zone_creation"></a> [skip\_specific\_services\_for\_zone\_creation](#input\_skip\_specific\_services\_for\_zone\_creation) | Provide a list of service references for which zone creation is not required | `list(string)` | `[]` | no |
110110
| <a name="input_target_service_details"></a> [target\_service\_details](#input\_target\_service\_details) | Details of the target service for which a rule is created. The key is the service name. | <pre>map(object({<br> description = optional(string)<br> target_rg = optional(string)<br> instance_id = optional(string)<br> enforcement_mode = string<br> tags = optional(list(string))<br> region = optional(string)<br> global_deny = optional(bool, true)<br> }))</pre> | `{}` | no |
111-
| <a name="input_zone_service_ref_list"></a> [zone\_service\_ref\_list](#input\_zone\_service\_ref\_list) | (Optional) Customized name of the zone for the service reference. If not provided, default zone name with the prefix will be created. | <pre>object({<br> cloud-object-storage = optional(string)<br> codeengine = optional(string)<br> containers-kubernetes = optional(string)<br> databases-for-cassandra = optional(string)<br> databases-for-elasticsearch = optional(string)<br> databases-for-enterprisedb = optional(string)<br> databases-for-etcd = optional(string)<br> databases-for-mongodb = optional(string)<br> databases-for-mysql = optional(string)<br> databases-for-postgresql = optional(string)<br> databases-for-redis = optional(string)<br> directlink = optional(string)<br> iam-groups = optional(string)<br> is = optional(string)<br> messagehub = optional(string)<br> messages-for-rabbitmq = optional(string)<br> schematics = optional(string)<br> secrets-manager = optional(string)<br> server-protect = optional(string)<br> user-management = optional(string)<br> apprapp = optional(string)<br> compliance = optional(string)<br> event-notifications = optional(string)<br> logdna = optional(string)<br> logdnaat = optional(string)<br> })</pre> | <pre>{<br> "apprapp": null,<br> "cloud-object-storage": null,<br> "codeengine": null,<br> "compliance": null,<br> "containers-kubernetes": null,<br> "databases-for-cassandra": null,<br> "databases-for-elasticsearch": null,<br> "databases-for-enterprisedb": null,<br> "databases-for-etcd": null,<br> "databases-for-mongodb": null,<br> "databases-for-mysql": null,<br> "databases-for-postgresql": null,<br> "databases-for-redis": null,<br> "directlink": null,<br> "event-notifications": null,<br> "iam-groups": null,<br> "is": null,<br> "logdna": null,<br> "logdnaat": null,<br> "messagehub": null,<br> "messages-for-rabbitmq": null,<br> "schematics": null,<br> "secrets-manager": null,<br> "server-protect": null,<br> "user-management": null<br>}</pre> | no |
111+
| <a name="input_zone_service_ref_list"></a> [zone\_service\_ref\_list](#input\_zone\_service\_ref\_list) | (Optional) Customized name of the zone for the service reference. If not provided, default zone name with the prefix will be created. | <pre>object({<br> cloud-object-storage = optional(string)<br> codeengine = optional(string)<br> containers-kubernetes = optional(string)<br> databases-for-cassandra = optional(string)<br> databases-for-elasticsearch = optional(string)<br> databases-for-enterprisedb = optional(string)<br> databases-for-etcd = optional(string)<br> databases-for-mongodb = optional(string)<br> databases-for-mysql = optional(string)<br> databases-for-postgresql = optional(string)<br> databases-for-redis = optional(string)<br> directlink = optional(string)<br> iam-groups = optional(string)<br> is = optional(string)<br> messagehub = optional(string)<br> messages-for-rabbitmq = optional(string)<br> schematics = optional(string)<br> secrets-manager = optional(string)<br> server-protect = optional(string)<br> user-management = optional(string)<br> apprapp = optional(string)<br> compliance = optional(string)<br> event-notifications = optional(string)<br> logdna = optional(string)<br> logdnaat = optional(string)<br> cloudantnosqldb = optional(string)<br> globalcatalog-collection = optional(string)<br> sysdig-monitor = optional(string)<br> sysdig-secure = optional(string)<br> toolchain = optional(string)<br> })</pre> | <pre>{<br> "apprapp": null,<br> "cloud-object-storage": null,<br> "cloudantnosqldb": null,<br> "codeengine": null,<br> "compliance": null,<br> "containers-kubernetes": null,<br> "databases-for-cassandra": null,<br> "databases-for-elasticsearch": null,<br> "databases-for-enterprisedb": null,<br> "databases-for-etcd": null,<br> "databases-for-mongodb": null,<br> "databases-for-mysql": null,<br> "databases-for-postgresql": null,<br> "databases-for-redis": null,<br> "directlink": null,<br> "event-notifications": null,<br> "globalcatalog-collection": null,<br> "iam-groups": null,<br> "is": null,<br> "logdna": null,<br> "logdnaat": null,<br> "messagehub": null,<br> "messages-for-rabbitmq": null,<br> "schematics": null,<br> "secrets-manager": null,<br> "server-protect": null,<br> "sysdig-monitor": null,<br> "sysdig-secure": null,<br> "toolchain": null,<br> "user-management": null<br>}</pre> | no |
112112
| <a name="input_zone_vpc_crn_list"></a> [zone\_vpc\_crn\_list](#input\_zone\_vpc\_crn\_list) | (List) VPC CRN for the zones | `list(string)` | n/a | yes |
113113

114114
### Outputs

modules/fscloud/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ locals {
147147
ref = {
148148
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
149149
service_name = service_ref
150-
location = (service_ref == "compliance" || service_ref == "directlink" || service_ref == "iam-groups" || service_ref == "user-management" || service_ref == "containers-kubernetes") ? null : var.location
150+
location = (service_ref == "directlink" || service_ref == "globalcatalog-collection" || service_ref == "user-management" || service_ref == "iam-groups") ? null : var.location
151151
}
152152
}
153153
]

modules/fscloud/variables.tf

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ variable "zone_service_ref_list" {
9595
event-notifications = optional(string)
9696
logdna = optional(string)
9797
logdnaat = optional(string)
98+
cloudantnosqldb = optional(string)
99+
globalcatalog-collection = optional(string)
100+
sysdig-monitor = optional(string)
101+
sysdig-secure = optional(string)
102+
toolchain = optional(string)
98103
})
99104
default = {
100105
cloud-object-storage = null
@@ -122,6 +127,11 @@ variable "zone_service_ref_list" {
122127
event-notifications = null
123128
logdna = null
124129
logdnaat = null
130+
cloudantnosqldb = null
131+
globalcatalog-collection = null
132+
sysdig-monitor = null
133+
sysdig-secure = null
134+
toolchain = null
125135
}
126136
validation {
127137
condition = alltrue([
@@ -133,8 +143,8 @@ variable "zone_service_ref_list" {
133143
"databases-for-redis", "directlink",
134144
"iam-groups", "is", "messagehub",
135145
"messages-for-rabbitmq", "schematics", "secrets-manager", "server-protect", "user-management",
136-
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat"],
137-
service_ref)
146+
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat",
147+
"cloudantnosqldb", "globalcatalog-collection", "sysdig-monitor", "sysdig-secure", "toolchain"], service_ref)
138148
])
139149
error_message = "Provide a valid service reference for zone creation"
140150
}
@@ -165,9 +175,9 @@ variable "custom_rule_contexts_by_service" {
165175
"databases-for-redis", "directlink",
166176
"iam-groups", "is", "messagehub",
167177
"messages-for-rabbitmq", "schematics", "secrets-manager", "server-protect", "user-management",
168-
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat"],
178+
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat",
179+
"cloudantnosqldb", "globalcatalog-collection", "sysdig-monitor", "sysdig-secure", "toolchain"],
169180
ref)]]
170-
171181
]))
172182
error_message = "Provide a valid service reference for zone creation"
173183
}
@@ -236,7 +246,8 @@ variable "existing_serviceref_zone" {
236246
"databases-for-redis", "directlink",
237247
"iam-groups", "is", "messagehub",
238248
"messages-for-rabbitmq", "schematics", "secrets-manager", "server-protect", "user-management",
239-
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat"], key)
249+
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat",
250+
"cloudantnosqldb", "globalcatalog-collection", "sysdig-monitor", "sysdig-secure", "toolchain"], key)
240251
])
241252
error_message = "Provide a valid service reference"
242253
}
@@ -269,8 +280,8 @@ variable "skip_specific_services_for_zone_creation" {
269280
"databases-for-redis", "directlink",
270281
"iam-groups", "is", "messagehub",
271282
"messages-for-rabbitmq", "schematics", "secrets-manager", "server-protect", "user-management",
272-
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat"],
273-
service_ref)
283+
"apprapp", "compliance", "event-notifications", "logdna", "logdnaat",
284+
"cloudantnosqldb", "globalcatalog-collection", "sysdig-monitor", "sysdig-secure", "toolchain"], service_ref)
274285
])
275286
error_message = "Provide a valid service reference for zone creation"
276287
}

0 commit comments

Comments
 (0)