Skip to content

Commit 1db7833

Browse files
author
akocbek
committed
fix: improve DA user experience
1 parent a3890eb commit 1db7833

File tree

6 files changed

+37
-98
lines changed

6 files changed

+37
-98
lines changed

ibm_catalog.json

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,30 @@
2222
"solution"
2323
],
2424
"short_description": "Creates and configures IBM Security and Compliance Center Workload Protection resources",
25-
"long_description": "Use [IBM Cloud® Security and Compliance Center Workload Protection](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-getting-started) to find and prioritize software vulnerabilities, detect and respond to threats, and manage configurations, permissions, and compliance from source to run. This Terraform-based automation is part of a broader suite of IBM-maintained Infrastructure as Code (IaC) asset collection, each following the naming pattern \"Cloud automation for *servicename*\" and focusing on single IBM Cloud service. These single-service deployable architectures can be used on their own to streamline and automate service deployments through an [IaC approach](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understanding-projects), or assembled together into a broader [automated IaC stack](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-config-stack) to automate the deployment of an end-to-end solution architecture.",
25+
"long_description": "Use [IBM Cloud Security and Compliance Center Workload Protection](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-getting-started) to find and prioritize software vulnerabilities, detect and respond to threats, and manage configurations, permissions, and compliance from source to run.\n\nℹ️ This Terraform-based automation is part of a broader suite of IBM-maintained Infrastructure as Code (IaC) assets, each following the naming pattern \"Cloud automation for *servicename*\" and focusing on single IBM Cloud service. These single-service deployable architectures can be used on their own to streamline and automate service deployments through an [IaC approach](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-understanding-projects), or assembled together into a broader [automated IaC stack](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-config-stack) to automate the deployment of an end-to-end solution architecture.",
2626
"offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/blob/main/solutions/fully-configurable/README.md",
2727
"offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/main/images/scc-icon.svg",
2828
"provider_name": "IBM",
2929
"features": [
30-
{
31-
"title": "IBM Cloud Security and Compliance Center Workload Protection instance",
32-
"description": "Creates and configures a Security and Compliance Center Workload Protection instance."
33-
},
3430
{
3531
"title": "Cloud Security Posture Management (CSPM)",
3632
"description": "Creates and configures required resources to enable [Cloud Security Posture Management](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-about)."
3733
},
3834
{
3935
"title": "Context-based restrictions",
4036
"description": "Optionally create and configure [Context-based restrictions](https://cloud.ibm.com/docs/account?topic=account-context-restrictions-whatis)."
37+
},
38+
{
39+
"title": "Monitoring",
40+
"description": "Gain real-time insights into your workloads by seamlessly observing workload data directly within your existing [IBM Cloud Monitoring environment](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started)."
4141
}
4242
],
4343
"support_details": "This product is in the community registry, as such support is handled through the originated repo. If you experience issues please open an issue in that repository [https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/issues](https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/issues). Please note this product is not supported via the IBM Cloud Support Center.",
4444
"flavors": [
4545
{
4646
"label": "Fully configurable",
4747
"name": "fully-configurable",
48+
"index": 1,
4849
"working_directory": "solutions/fully-configurable",
4950
"install_type": "fullstack",
5051
"dependency_version_2": true,
@@ -400,10 +401,23 @@
400401
"key": "scc_workload_protection_trusted_profile_name"
401402
},
402403
{
403-
"key": "cbr_rules"
404+
"key": "cbr_rules",
405+
"type": "array",
406+
"custom_config": {
407+
"type": "textarea",
408+
"grouping": "deployment",
409+
"original_grouping": "deployment"
410+
}
404411
}
405412
],
406413
"iam_permissions": [
414+
{
415+
"role_crns": [
416+
"crn:v1:bluemix:public:iam::::role:Viewer"
417+
],
418+
"service_name": "Resource group only",
419+
"notes": "Viewer access is required in the resource group you want to provision in."
420+
},
407421
{
408422
"service_name": "sysdig-secure",
409423
"role_crns": [
@@ -415,16 +429,8 @@
415429
"architecture": {
416430
"features": [
417431
{
418-
"title": "IBM Cloud Security and Compliance Center Workload Protection instance",
419-
"description": "Creates and configures a Security and Compliance Center Workload Protection instance."
420-
},
421-
{
422-
"title": "Cloud Security Posture Management (CSPM)",
423-
"description": "Creates and configures required resources to enable Cloud Security Posture Management."
424-
},
425-
{
426-
"title": "Context-based restrictions",
427-
"description": "Optionally create and configure context-based restrictions."
432+
"title": " ",
433+
"description": "Configured to use IBM secure by default standards, but can be edited to fit your use case."
428434
}
429435
],
430436
"diagrams": [

reference-architecture/scc.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,3 @@
1-
# Cloud automation for Security and Compliance Center Workload Protection
2-
3-
This solution supports provisioning and configuring the following infrastructure:
4-
5-
- A Security and Compliance Center Workload Protection instance.
1+
# Cloud automation for Security and Compliance Center Workload Protection (Fully configurable)
62

73
:exclamation: **Important:** This solution is not intended to be called by other modules because it contains a provider configuration and is not compatible with the `for_each`, `count`, and `depends_on` arguments. For more information, see [Providers Within Modules](https://developer.hashicorp.com/terraform/language/modules/develop/providers).
8-
9-
![Workload Protection](./reference-architecture/scc.svg)
10-
11-
### Known issues
12-
#### restapi_object.enable_cspm resource always identified for creation
13-
There is currently a [known issue](https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/issues/243) where you will always see the `restapi_object.enable_cspm` resource included in the terraform plan for creation, even after it has already been applied. It is safe to proceed with this apply and will be a no-op if the resource has already been applied.
14-
15-
<!-- Below content is automatically populated via pre-commit hook -->
16-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
17-
### Requirements
18-
19-
| Name | Version |
20-
|------|---------|
21-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |
22-
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | 1.79.2 |
23-
| <a name="requirement_restapi"></a> [restapi](#requirement\_restapi) | 2.0.1 |
24-
25-
### Modules
26-
27-
| Name | Source | Version |
28-
|------|--------|---------|
29-
| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | terraform-ibm-modules/resource-group/ibm | 1.2.1 |
30-
| <a name="module_scc_wp"></a> [scc\_wp](#module\_scc\_wp) | ../.. | n/a |
31-
32-
### Resources
33-
34-
| Name | Type |
35-
|------|------|
36-
| [ibm_iam_auth_token.auth_token](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.79.2/docs/data-sources/iam_auth_token) | data source |
37-
38-
### Inputs
39-
40-
| Name | Description | Type | Default | Required |
41-
|------|-------------|------|---------|:--------:|
42-
| <a name="input_app_config_crn"></a> [app\_config\_crn](#input\_app\_config\_crn) | The CRN of an existing App Config instance to use with the SCC Workload Protection instance. Required if `cspm_enabled` is true. NOTE: Ensure the App Config instance has configuration aggregator enabled. | `string` | `null` | no |
43-
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | The list of context-based restriction rules to create for the instance.[Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/blob/main/solutions/fully-configurable/cbr-rules.md) | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> tags = optional(list(object({<br/> name = string<br/> value = string<br/> })), [])<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |
44-
| <a name="input_cspm_enabled"></a> [cspm\_enabled](#input\_cspm\_enabled) | Enable Cloud Security Posture Management (CSPM) for the Workload Protection instance. This will create a trusted profile associated with the SCC Workload Protection instance that has viewer / reader access to the App Config service and viewer access to the Enterprise service. [Learn more](https://cloud.ibm.com/docs/workload-protection?topic=workload-protection-about). | `bool` | `true` | no |
45-
| <a name="input_existing_monitoring_crn"></a> [existing\_monitoring\_crn](#input\_existing\_monitoring\_crn) | The CRN of an IBM Cloud Monitoring instance to to send Workload Protection data. If no value passed, metrics are sent to the instance associated to the container's location unless otherwise specified in the Metrics Router service configuration. | `string` | `null` | no |
46-
| <a name="input_existing_resource_group_name"></a> [existing\_resource\_group\_name](#input\_existing\_resource\_group\_name) | The name of a an existing resource group in which to provision resources to. | `string` | `"Default"` | no |
47-
| <a name="input_ibmcloud_api_key"></a> [ibmcloud\_api\_key](#input\_ibmcloud\_api\_key) | The IBM Cloud API key to deploy resources. | `string` | n/a | yes |
48-
| <a name="input_ibmcloud_resource_controller_api_endpoint"></a> [ibmcloud\_resource\_controller\_api\_endpoint](#input\_ibmcloud\_resource\_controller\_api\_endpoint) | The IBM Cloud [resource controller endpoint](https://cloud.ibm.com/apidocs/resource-controller/resource-controller#endpoint-url) to use. This is used to update the Workload Protection instance to enable CSPM once the trusted profiles have been created. | `string` | `"https://private.us-south.resource-controller.cloud.ibm.com"` | no |
49-
| <a name="input_prefix"></a> [prefix](#input\_prefix) | The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: prod-scc-wp. | `string` | n/a | yes |
50-
| <a name="input_provider_visibility"></a> [provider\_visibility](#input\_provider\_visibility) | Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints). | `string` | `"private"` | no |
51-
| <a name="input_region"></a> [region](#input\_region) | The region to provision Security and Compliance Center Workload Protection resources in. | `string` | `"us-south"` | no |
52-
| <a name="input_scc_workload_protection_access_tags"></a> [scc\_workload\_protection\_access\_tags](#input\_scc\_workload\_protection\_access\_tags) | A list of access tags to apply to the Workload Protection instance. Maximum length: 128 characters. Possible characters are A-Z, 0-9, spaces, underscores, hyphens, periods, and colons. [Learn more](https://cloud.ibm.com/docs/account?topic=account-tag&interface=ui#limits). | `list(string)` | `[]` | no |
53-
| <a name="input_scc_workload_protection_instance_name"></a> [scc\_workload\_protection\_instance\_name](#input\_scc\_workload\_protection\_instance\_name) | The name for the Workload Protection instance that is created by this solution. Must begin with a letter. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format. | `string` | `"scc-workload-protection"` | no |
54-
| <a name="input_scc_workload_protection_instance_tags"></a> [scc\_workload\_protection\_instance\_tags](#input\_scc\_workload\_protection\_instance\_tags) | The list of tags to add to the Workload Protection instance. | `list(string)` | `[]` | no |
55-
| <a name="input_scc_workload_protection_resource_key_tags"></a> [scc\_workload\_protection\_resource\_key\_tags](#input\_scc\_workload\_protection\_resource\_key\_tags) | The tags associated with the Workload Protection resource key. | `list(string)` | `[]` | no |
56-
| <a name="input_scc_workload_protection_service_plan"></a> [scc\_workload\_protection\_service\_plan](#input\_scc\_workload\_protection\_service\_plan) | The pricing plan for the Workload Protection instance service. Possible values: `free-trial`, `graduated-tier`. | `string` | `"graduated-tier"` | no |
57-
| <a name="input_scc_workload_protection_trusted_profile_name"></a> [scc\_workload\_protection\_trusted\_profile\_name](#input\_scc\_workload\_protection\_trusted\_profile\_name) | The name to give the trusted profile that is created by this module if `cspm_enabled` is `true. Must begin with a letter. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format.` | `string` | `"workload-protection-trusted-profile"` | no |
58-
59-
### Outputs
60-
61-
| Name | Description |
62-
|------|-------------|
63-
| <a name="output_resource_group_id"></a> [resource\_group\_id](#output\_resource\_group\_id) | Resource group ID |
64-
| <a name="output_resource_group_name"></a> [resource\_group\_name](#output\_resource\_group\_name) | Resource group name |
65-
| <a name="output_scc_workload_protection_access_key"></a> [scc\_workload\_protection\_access\_key](#output\_scc\_workload\_protection\_access\_key) | SCC Workload Protection access key |
66-
| <a name="output_scc_workload_protection_api_endpoint"></a> [scc\_workload\_protection\_api\_endpoint](#output\_scc\_workload\_protection\_api\_endpoint) | SCC Workload Protection API endpoint |
67-
| <a name="output_scc_workload_protection_crn"></a> [scc\_workload\_protection\_crn](#output\_scc\_workload\_protection\_crn) | SCC Workload Protection instance CRN |
68-
| <a name="output_scc_workload_protection_id"></a> [scc\_workload\_protection\_id](#output\_scc\_workload\_protection\_id) | SCC Workload Protection instance ID |
69-
| <a name="output_scc_workload_protection_ingestion_endpoint"></a> [scc\_workload\_protection\_ingestion\_endpoint](#output\_scc\_workload\_protection\_ingestion\_endpoint) | SCC Workload Protection instance ingestion endpoint |
70-
| <a name="output_scc_workload_protection_name"></a> [scc\_workload\_protection\_name](#output\_scc\_workload\_protection\_name) | SCC Workload Protection instance name |
71-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

solutions/fully-configurable/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
#######################################################################################################################
44

55
locals {
6-
prefix_is_valid = var.prefix != null || trimspace(var.prefix) != "" ? true : false
6+
prefix = var.prefix != null ? trimspace(var.prefix) != "" ? "${var.prefix}-" : "" : ""
77

88
# Compute names for SCC Workload Protection instance and trusted profile
9-
scc_workload_protection_instance_name = local.prefix_is_valid ? "${var.prefix}-${var.scc_workload_protection_instance_name}" : var.scc_workload_protection_instance_name
10-
scc_workload_protection_resource_key_name = local.prefix_is_valid ? "${var.prefix}-${var.scc_workload_protection_instance_name}-key" : "${var.scc_workload_protection_instance_name}-key"
11-
scc_workload_protection_trusted_profile_name = local.prefix_is_valid ? "${var.prefix}-${var.scc_workload_protection_trusted_profile_name}" : var.scc_workload_protection_trusted_profile_name
9+
scc_workload_protection_instance_name = "${local.prefix}${var.scc_workload_protection_instance_name}"
10+
scc_workload_protection_resource_key_name = "${local.prefix}${var.scc_workload_protection_instance_name}-key"
11+
scc_workload_protection_trusted_profile_name = "${local.prefix}${var.scc_workload_protection_trusted_profile_name}"
1212
}
1313

1414
#######################################################################################################################

solutions/fully-configurable/provider.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
########################################################################################################################
44

55
provider "ibm" {
6-
ibmcloud_api_key = var.ibmcloud_api_key
7-
region = var.region
8-
visibility = var.provider_visibility
6+
ibmcloud_api_key = var.ibmcloud_api_key
7+
region = var.region
8+
visibility = var.provider_visibility
9+
private_endpoint_type = (var.provider_visibility == "private" && var.region == "ca-mon") ? "vpe" : null
910
}
1011

1112
data "ibm_iam_auth_token" "auth_token" {}

0 commit comments

Comments
 (0)