Skip to content

Commit f5765db

Browse files
feat: scc workload protection (#1010)
* feat: create/use existing SCC workload protection instance * feat: enable scc wp agent installation on vsis * refactor: move monitoring vars to locals for easier access * feat: switch to terraform-ibm-modules/scc-workload-protection module, remove support for existing scc workload protection instance * fix: improve playbook idempotence * fix: remove ibmcloud api key variable, it's no longer required * refactor: rename connect scc wp -> configure scc wp agent * fix: add line that triggers ansible playbook with vault * fix: process enable_scc_wp * fix: improve retries in playbook * chore: update catalog manifest * chore: update variable description * feat: scc workload protection in standard-extend * feat: scc workload protection in quickstart variation * refactor: move scc wp locals * docs: improve variable description * refactor: move scc wp locals * refactor: move variable validation to submodule to avoid duplicate code * fix: variable switch up * docs: update architecture diagrams * fix: split output values of scc wp * docs: monitoring * docs: scc wp * docs: mention scc wp and monitoring in introduction * docs: update readme * fix: var description and defaults (#1019) * fix: var description and defaults * fix: space * fix: plan * fix: output scc value * fix: output scc value for qs * chore: enable scc for tests * feat: upgrade terraform modules --------- Co-authored-by: surajsbharadwaj <101711050+surajsbharadwaj@users.noreply.github.com>
1 parent ce3c373 commit f5765db

31 files changed

+356
-75
lines changed

.secrets.baseline

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-11-26T11:58:55Z",
6+
"generated_at": "2025-02-20T13:46:36Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

ibm_catalog.json

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@
228228
"key": "enable_monitoring",
229229
"required": true
230230
},
231+
{
232+
"key": "enable_scc_wp",
233+
"required": true
234+
},
231235
{
232236
"key": "vpc_intel_images",
233237
"hidden": true
@@ -258,6 +262,11 @@
258262
"type": "multiline_secure_value"
259263
}
260264
},
265+
{
266+
"key": "ansible_vault_password",
267+
"type": "multiline_secure_value",
268+
"display_name": "Multiline secure value"
269+
},
261270
{
262271
"key": "transit_gateway_global"
263272
},
@@ -538,7 +547,7 @@
538547
{
539548
"diagram": {
540549
"caption": "Power Virtual Server with VPC landing zone 'Standard' variation",
541-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.5/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
550+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.2.0/reference-architectures/standard/deploy-arch-ibm-pvs-inf-standard.svg",
542551
"type": "image/svg+xml"
543552
},
544553
"description": "The Power Virtual Server with VPC landing zone as variation 'Create a new architecture' deploys VPC services and a Power Virtual Server workspace and interconnects them.\n \nRequired and optional management components are configured."
@@ -792,6 +801,10 @@
792801
"key": "enable_monitoring",
793802
"required": true
794803
},
804+
{
805+
"key": "enable_scc_wp",
806+
"required": true
807+
},
795808
{
796809
"key": "vpc_intel_images",
797810
"hidden": true
@@ -884,6 +897,11 @@
884897
"type": "json_editor"
885898
}
886899
},
900+
{
901+
"key": "ansible_vault_password",
902+
"type": "multiline_secure_value",
903+
"display_name": "Multiline secure value"
904+
},
887905
{
888906
"key": "configure_dns_forwarder"
889907
},
@@ -1174,7 +1192,7 @@
11741192
{
11751193
"diagram": {
11761194
"caption": "Power Virtual Server with VPC landing zone 'Quickstart' variation",
1177-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.5/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
1195+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.2.0/reference-architectures/standard-plus-vsi/deploy-arch-ibm-pvs-inf-standard-plus-vsi.svg",
11781196
"type": "image/svg+xml"
11791197
},
11801198
"description": "The Power Virtual Server with VPC landing zone as 'Quickstart' variation of 'Create a new architecture' option deploys VPC services and a Power Virtual Server workspace and interconnects them. It also creates one Power virtual server instance of chosen t-shirt size or custom configuration.\n \nRequired and optional management components are configured."
@@ -1500,7 +1518,7 @@
15001518
{
15011519
"diagram": {
15021520
"caption": "Power Virtual Server with VPC landing zone 'Import' variation",
1503-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.5/reference-architectures/import/deploy-arch-ibm-pvs-inf-import.svg",
1521+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.2.0/reference-architectures/import/deploy-arch-ibm-pvs-inf-import.svg",
15041522
"type": "image/svg+xml"
15051523
},
15061524
"description": "This solution helps to install the deployable architecture 'Power Virtual Server for SAP HANA' on top of a pre-existing Power Virtual Server(PowerVS) landscape. 'Power Virtual Server for SAP HANA' automation requires a schematics workspace id for installation. The 'Import' solution creates a schematics workspace by taking pre-existing VPC and PowerVS infrastructure resource details as inputs. The ID of this schematics workspace will be the pre-requisite workspace id required by 'Power Virtual Server for SAP HANA' to create and configure the PowerVS instances for SAP on top of the existing infrastructure.\n \nRequired and optional management components are configured."
@@ -1818,7 +1836,7 @@
18181836
{
18191837
"diagram": {
18201838
"caption": "Power Virtual Server with VPC landing zone 'Standard Extend' variation",
1821-
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.1.5/reference-architectures/standard-extend/deploy-arch-ibm-pvs-inf-standard-extend.svg",
1839+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/refs/tags/v8.2.0/reference-architectures/standard-extend/deploy-arch-ibm-pvs-inf-standard-extend.svg",
18221840
"type": "image/svg+xml"
18231841
},
18241842
"description": "The Power Virtual Server with VPC landing zone as variation 'Extend Power Virtual Server with VPC landing zone' creates an additional Power Virtual Server workspace and connects it with already created Power Virtual Server with VPC landing zone. It builds on existing Power Virtual Server with VPC landing zone deployed as a variation 'Create a new architecture'."

modules/powervs-vpc-landing-zone/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
109109
| <a name="module_client_to_site_vpn"></a> [client\_to\_site\_vpn](#module\_client\_to\_site\_vpn) | terraform-ibm-modules/client-to-site-vpn/ibm | 2.1.4 |
110110
| <a name="module_configure_monitoring_host"></a> [configure\_monitoring\_host](#module\_configure\_monitoring\_host) | ./submodules/ansible | n/a |
111111
| <a name="module_configure_network_services"></a> [configure\_network\_services](#module\_configure\_network\_services) | ./submodules/ansible | n/a |
112-
| <a name="module_landing_zone"></a> [landing\_zone](#module\_landing\_zone) | terraform-ibm-modules/landing-zone/ibm//patterns//vsi//module | 7.3.0 |
112+
| <a name="module_configure_scc_wp_agent"></a> [configure\_scc\_wp\_agent](#module\_configure\_scc\_wp\_agent) | ./submodules/ansible | n/a |
113+
| <a name="module_landing_zone"></a> [landing\_zone](#module\_landing\_zone) | terraform-ibm-modules/landing-zone/ibm//patterns//vsi//module | 7.3.1 |
113114
| <a name="module_powervs_workspace"></a> [powervs\_workspace](#module\_powervs\_workspace) | terraform-ibm-modules/powervs-workspace/ibm | 2.5.0 |
114115
| <a name="module_private_secret_engine"></a> [private\_secret\_engine](#module\_private\_secret\_engine) | terraform-ibm-modules/secrets-manager-private-cert-engine/ibm | 1.3.5 |
115-
| <a name="module_secrets_manager_group"></a> [secrets\_manager\_group](#module\_secrets\_manager\_group) | terraform-ibm-modules/secrets-manager-secret-group/ibm | 1.2.2 |
116+
| <a name="module_scc_wp_instance"></a> [scc\_wp\_instance](#module\_scc\_wp\_instance) | terraform-ibm-modules/scc-workload-protection/ibm | 1.4.3 |
117+
| <a name="module_secrets_manager_group"></a> [secrets\_manager\_group](#module\_secrets\_manager\_group) | terraform-ibm-modules/secrets-manager-secret-group/ibm | 1.2.3 |
116118
| <a name="module_secrets_manager_private_certificate"></a> [secrets\_manager\_private\_certificate](#module\_secrets\_manager\_private\_certificate) | terraform-ibm-modules/secrets-manager-private-cert/ibm | 1.3.2 |
117119
| <a name="module_vpc_file_share_alb"></a> [vpc\_file\_share\_alb](#module\_vpc\_file\_share\_alb) | ./submodules/fileshare-alb | n/a |
118120

@@ -129,13 +131,15 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
129131

130132
| Name | Description | Type | Default | Required |
131133
|------|-------------|------|---------|:--------:|
134+
| <a name="input_ansible_vault_password"></a> [ansible\_vault\_password](#input\_ansible\_vault\_password) | Vault password to encrypt ansible playbooks that contain sensitive information. Required when SCC workload Protection is enabled. Password requirements: 15-100 characters and at least one uppercase letter, one lowercase letter, one number, and one special character. Allowed characters: A-Z, a-z, 0-9, !#$%&()*+-.:;<=>?@[]\_{\|}~. | `string` | `null` | no |
132135
| <a name="input_certificate_template_name"></a> [certificate\_template\_name](#input\_certificate\_template\_name) | The name of the Certificate Template to create for a private\_cert secret engine. When `var.existing_sm_instance_guid` is not null, then it has to be the existing template name that exists in the private cert engine. | `string` | `"my-template"` | no |
133136
| <a name="input_client_to_site_vpn"></a> [client\_to\_site\_vpn](#input\_client\_to\_site\_vpn) | VPN configuration - the client ip pool and list of users email ids to access the environment. If enabled, then a Secret Manager instance is also provisioned with certificates generated. See optional parameters to reuse existing certificate from secrets manager instance. | <pre>object({<br/> enable = bool<br/> client_ip_pool = string<br/> vpn_client_access_group_users = list(string)<br/> })</pre> | <pre>{<br/> "client_ip_pool": "192.168.0.0/16",<br/> "enable": true,<br/> "vpn_client_access_group_users": []<br/>}</pre> | no |
134137
| <a name="input_configure_dns_forwarder"></a> [configure\_dns\_forwarder](#input\_configure\_dns\_forwarder) | Specify if DNS forwarder will be configured. This will allow you to use central DNS servers (e.g. IBM Cloud DNS servers) sitting outside of the created IBM PowerVS infrastructure. If yes, ensure 'dns\_forwarder\_config' optional variable is set properly. DNS forwarder will be installed on the network-services vsi. | `bool` | `false` | no |
135138
| <a name="input_configure_nfs_server"></a> [configure\_nfs\_server](#input\_configure\_nfs\_server) | Specify if NFS server will be configured. This will allow you easily to share files between PowerVS instances (e.g., SAP installation files). [File storage share and mount target](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-create&interface=ui) in VPC will be created.. If yes, ensure 'nfs\_server\_config' optional variable is set properly below. Default value is '200GB' which will be mounted on specified directory in network-service vsi. | `bool` | `false` | no |
136139
| <a name="input_configure_ntp_forwarder"></a> [configure\_ntp\_forwarder](#input\_configure\_ntp\_forwarder) | Specify if NTP forwarder will be configured. This will allow you to synchronize time between IBM PowerVS instances. NTP forwarder will be installed on the network-services vsi. | `bool` | `false` | no |
137140
| <a name="input_dns_forwarder_config"></a> [dns\_forwarder\_config](#input\_dns\_forwarder\_config) | Configuration for the DNS forwarder to a DNS service that is not reachable directly from PowerVS. | <pre>object({<br/> dns_servers = string<br/> })</pre> | <pre>{<br/> "dns_servers": "161.26.0.7; 161.26.0.8; 9.9.9.9;"<br/>}</pre> | no |
138141
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Specify whether Monitoring will be enabled. This includes the creation of an IBM Cloud Monitoring Instance and an Intel Monitoring Instance to host the services. If you already have an existing monitoring instance then specify in optional parameter 'existing\_monitoring\_instance\_crn'. | `bool` | `true` | no |
142+
| <a name="input_enable_scc_wp"></a> [enable\_scc\_wp](#input\_enable\_scc\_wp) | Set to true to enable SCC Workload Protection and install and configure the Sysdig agent on all VSIs and PowerVS instances in this deployment. | `bool` | `false` | no |
139143
| <a name="input_existing_monitoring_instance_crn"></a> [existing\_monitoring\_instance\_crn](#input\_existing\_monitoring\_instance\_crn) | Existing CRN of IBM Cloud Monitoring Instance. If value is null, then an IBM Cloud Monitoring Instance will not be created but an intel VSI instance will be created if 'enable\_monitoring' is true. | `string` | `null` | no |
140144
| <a name="input_existing_sm_instance_guid"></a> [existing\_sm\_instance\_guid](#input\_existing\_sm\_instance\_guid) | An existing Secrets Manager GUID. The existing Secret Manager instance must have private certificate engine configured. If not provided an new instance will be provisioned. | `string` | `null` | no |
141145
| <a name="input_existing_sm_instance_region"></a> [existing\_sm\_instance\_region](#input\_existing\_sm\_instance\_region) | Required if value is passed into `var.existing_sm_instance_guid`. | `string` | `null` | no |
@@ -150,7 +154,7 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
150154
| <a name="input_powervs_management_network"></a> [powervs\_management\_network](#input\_powervs\_management\_network) | Name of the IBM Cloud PowerVS management subnet and CIDR to create. | <pre>object({<br/> name = string<br/> cidr = string<br/> })</pre> | <pre>{<br/> "cidr": "10.51.0.0/24",<br/> "name": "mgmt_net"<br/>}</pre> | no |
151155
| <a name="input_powervs_resource_group_name"></a> [powervs\_resource\_group\_name](#input\_powervs\_resource\_group\_name) | Existing IBM Cloud resource group name. | `string` | n/a | yes |
152156
| <a name="input_powervs_zone"></a> [powervs\_zone](#input\_powervs\_zone) | IBM Cloud data center location where IBM PowerVS infrastructure will be created. | `string` | n/a | yes |
153-
| <a name="input_prefix"></a> [prefix](#input\_prefix) | A unique identifier for resources. Must begin with a lowercase letter and end with a lowercase letter or number. This prefix will be prepended to any resources provisioned by this template. Prefixes must be 16 or fewer characters. | `string` | n/a | yes |
157+
| <a name="input_prefix"></a> [prefix](#input\_prefix) | A unique identifier for resources. Must begin with a lowercase letter and end with a lowercase letter or number. This prefix will be prepended to any resources provisioned by this template. Prefixes must be 10 or fewer characters. | `string` | n/a | yes |
154158
| <a name="input_sm_service_plan"></a> [sm\_service\_plan](#input\_sm\_service\_plan) | The service/pricing plan to use when provisioning a new Secrets Manager instance. Allowed values: `standard` and `trial`. Only used if `existing_sm_instance_guid` is set to null. | `string` | `"standard"` | no |
155159
| <a name="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key) | Private SSH key (RSA format) to login to Intel VSIs to configure network management services (SQUID, NTP, DNS and ansible). Should match to public SSH key referenced by 'ssh\_public\_key'. The key is not uploaded or stored. For more information about SSH keys, see [SSH keys](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys). | `string` | n/a | yes |
156160
| <a name="input_ssh_public_key"></a> [ssh\_public\_key](#input\_ssh\_public\_key) | Public SSH Key for VSI creation. Must be an RSA key with a key size of either 2048 bits or 4096 bits (recommended). Must be a valid SSH key that does not already exist in the deployment region. | `string` | n/a | yes |
@@ -165,7 +169,7 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
165169
| <a name="output_access_host_or_ip"></a> [access\_host\_or\_ip](#output\_access\_host\_or\_ip) | Access host(jump/bastion) for created PowerVS infrastructure. |
166170
| <a name="output_ansible_host_or_ip"></a> [ansible\_host\_or\_ip](#output\_ansible\_host\_or\_ip) | Central Ansible node private IP address. |
167171
| <a name="output_dns_host_or_ip"></a> [dns\_host\_or\_ip](#output\_dns\_host\_or\_ip) | DNS forwarder host for created PowerVS infrastructure. |
168-
| <a name="output_monitoring_instance"></a> [monitoring\_instance](#output\_monitoring\_instance) | Details of the IBM Cloud Monitoring Instance: CRN, location, guid |
172+
| <a name="output_monitoring_instance"></a> [monitoring\_instance](#output\_monitoring\_instance) | Details of the IBM Cloud Monitoring Instance: CRN, location, guid, monitoring\_host\_ip. |
169173
| <a name="output_network_services_config"></a> [network\_services\_config](#output\_network\_services\_config) | Complete configuration of network management services. |
170174
| <a name="output_nfs_host_or_ip_path"></a> [nfs\_host\_or\_ip\_path](#output\_nfs\_host\_or\_ip\_path) | NFS host for created PowerVS infrastructure. |
171175
| <a name="output_ntp_host_or_ip"></a> [ntp\_host\_or\_ip](#output\_ntp\_host\_or\_ip) | NTP host for created PowerVS infrastructure. |
@@ -178,10 +182,11 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
178182
| <a name="output_powervs_workspace_id"></a> [powervs\_workspace\_id](#output\_powervs\_workspace\_id) | PowerVS infrastructure workspace id. The unique identifier of the new resource instance. |
179183
| <a name="output_powervs_workspace_name"></a> [powervs\_workspace\_name](#output\_powervs\_workspace\_name) | PowerVS infrastructure workspace name. |
180184
| <a name="output_powervs_zone"></a> [powervs\_zone](#output\_powervs\_zone) | Zone where PowerVS infrastructure is created. |
181-
| <a name="output_prefix"></a> [prefix](#output\_prefix) | The prefix that is associated with all resources |
185+
| <a name="output_prefix"></a> [prefix](#output\_prefix) | The prefix that is associated with all resources. |
182186
| <a name="output_proxy_host_or_ip_port"></a> [proxy\_host\_or\_ip\_port](#output\_proxy\_host\_or\_ip\_port) | Proxy host:port for created PowerVS infrastructure. |
183187
| <a name="output_resource_group_data"></a> [resource\_group\_data](#output\_resource\_group\_data) | List of resource groups data used within landing zone. |
184-
| <a name="output_ssh_public_key"></a> [ssh\_public\_key](#output\_ssh\_public\_key) | The string value of the ssh public key used when deploying VPC |
188+
| <a name="output_scc_wp_instance"></a> [scc\_wp\_instance](#output\_scc\_wp\_instance) | Details of the Security and Compliance Center Workload Protection Instance: guid, access key, api\_endpoint, ingestion\_endpoint. |
189+
| <a name="output_ssh_public_key"></a> [ssh\_public\_key](#output\_ssh\_public\_key) | The string value of the ssh public key used when deploying VPC. |
185190
| <a name="output_transit_gateway_global"></a> [transit\_gateway\_global](#output\_transit\_gateway\_global) | Connect to the networks outside the associated region. |
186191
| <a name="output_transit_gateway_id"></a> [transit\_gateway\_id](#output\_transit\_gateway\_id) | The ID of transit gateway. |
187192
| <a name="output_transit_gateway_name"></a> [transit\_gateway\_name](#output\_transit\_gateway\_name) | The name of the transit gateway. |

modules/powervs-vpc-landing-zone/client2sitevpn.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module "private_secret_engine" {
8989
# Create a secret group to place the certificate in
9090
module "secrets_manager_group" {
9191
source = "terraform-ibm-modules/secrets-manager-secret-group/ibm"
92-
version = "1.2.2"
92+
version = "1.2.3"
9393
providers = { ibm = ibm.ibm-sm }
9494
count = var.client_to_site_vpn.enable ? 1 : 0
9595

modules/powervs-vpc-landing-zone/locals.tf

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ locals {
2626
"wdc06" = "us-east"
2727
"wdc07" = "us-east"
2828
}
29-
30-
external_access_ip = var.external_access_ip != null && var.external_access_ip != "" ? length(regexall("/", var.external_access_ip)) > 0 ? var.external_access_ip : "${var.external_access_ip}/32" : ""
31-
override_json_string = templatefile("${path.module}/presets/slz-preset.json.tftpl",
32-
{
33-
external_access_ip = local.external_access_ip,
34-
rhel_image = var.vpc_intel_images.rhel_image,
35-
network_services_vsi_profile = var.network_services_vsi_profile,
36-
transit_gateway_global = var.transit_gateway_global,
37-
enable_monitoring = var.enable_monitoring,
38-
sles_image = var.vpc_intel_images.sles_image
39-
}
40-
)
4129
}
4230

4331
#####################################################

0 commit comments

Comments
 (0)