diff --git a/README.md b/README.md index 73a2e063..cbef2a5d 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ To attach access management tags to resources in this module, you need the follo | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.9.0 | -| [ibm](#requirement\_ibm) | >= 1.59.0, < 2.0.0 | +| [ibm](#requirement\_ibm) | >= 1.79.0, < 2.0.0 | | [time](#requirement\_time) | >= 0.9.1, < 1.0.0 | ### Modules diff --git a/common-dev-assets b/common-dev-assets index c93acc37..0c402797 160000 --- a/common-dev-assets +++ b/common-dev-assets @@ -1 +1 @@ -Subproject commit c93acc37a7fa412dafd72462635c3349b603fdda +Subproject commit 0c40279797e08625941fe062cff22e44e94a8e6d diff --git a/cra-config.yaml b/cra-config.yaml index ad2cad81..30560399 100644 --- a/cra-config.yaml +++ b/cra-config.yaml @@ -1,9 +1,9 @@ # More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml version: "v1" CRA_TARGETS: - - CRA_TARGET: "examples/default" # Target directory for CRA scan. If not provided, the CRA Scan will not be run. + - CRA_TARGET: "solutions/fully-configurable" # Target directory for CRA scan. If not provided, the CRA Scan will not be run. CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json" # CRA Ignore file to use. If not provided, it checks the repo root directory for `cra-tf-validate-ignore-rules.json` PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile). CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs. - TF_VAR_region: "us-south" - TF_VAR_prefix: "def-slz-vpc" + TF_VAR_provider_visibility: "public" + TF_VAR_prefix: "vpc-fc" diff --git a/examples/basic/version.tf b/examples/basic/version.tf index e147bd5e..f5d62ad6 100644 --- a/examples/basic/version.tf +++ b/examples/basic/version.tf @@ -5,7 +5,7 @@ terraform { # module's version.tf (basic), and 1 example that will always use the latest provider version. ibm = { source = "IBM-Cloud/ibm" - version = "1.59.0" + version = ">=1.59.0" } } } diff --git a/examples/specific-zone-only/version.tf b/examples/specific-zone-only/version.tf index b530fc18..482713d8 100644 --- a/examples/specific-zone-only/version.tf +++ b/examples/specific-zone-only/version.tf @@ -4,7 +4,7 @@ terraform { # Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works ibm = { source = "IBM-Cloud/ibm" - version = "1.59.0" + version = ">=1.59.0" } } } diff --git a/examples/vpc-with-dns/version.tf b/examples/vpc-with-dns/version.tf index b530fc18..482713d8 100644 --- a/examples/vpc-with-dns/version.tf +++ b/examples/vpc-with-dns/version.tf @@ -4,7 +4,7 @@ terraform { # Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works ibm = { source = "IBM-Cloud/ibm" - version = "1.59.0" + version = ">=1.59.0" } } } diff --git a/ibm_catalog.json b/ibm_catalog.json index 34d30751..1cd49f25 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -2,7 +2,7 @@ "products": [ { "name": "deploy-arch-ibm-vpc", - "label": "[Add-ons Beta] Cloud automation for VPC", + "label": "Cloud automation for VPC", "product_kind": "solution", "tags": [ "network", @@ -10,8 +10,7 @@ "ibm_created", "target_terraform", "terraform", - "solution", - "ibm_beta" + "solution" ], "keywords": [ "vpc", @@ -21,61 +20,61 @@ "solution" ], "short_description": "Automates VPC deployment on IBM Cloud, offering full configurability and flexibility for diverse workloads.", - "long_description": "The VPC deployable architecture deploys a Virtual Private Cloud (VPC) infrastructure without any compute resources, such as Virtual Server Instances (VSI) or Red Hat OpenShift clusters. This is an experimental tile and not suitable for production workloads. Stay here if you want to try an experimental version with the [Optional and swappable components](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-choose-plan-process#optional-swappable) capability.", + "long_description": "The Cloud automation for VPC sets up a foundational IBM Cloud [Virtual Private Cloud (VPC)](https://www.ibm.com/cloud/vpc) environment. It lays the groundwork for adding Virtual Servers Instances (VSI) or Red Hat OpenShift clusters and other advanced resources. This can be used as a base deployable architecture for many others deployable architectures like [Cloud automation for Red Hat OpenShift Container Platform on VPC](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-ocp-vpc-1728a4fd-f561-4cf9-82ef-2b1eeb5da1a8-global), [Cloud automation for Red Hat OpenShift AI](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-ocp-ai-ba708aed-bb8a-4ac0-83a7-53a066701db5-global), [Cloud automation for Virtual Servers for Virtual Private Cloud](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-vsi-vpc-28e2b12c-858f-4ae8-8717-60db8cec2e6e-global).
", "offering_docs_url": "https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/README.md", "offering_icon_url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/main/images/vpc_icon.svg", "provider_name": "IBM", "features": [ - { - "title": "VPC on IBM Cloud", - "description": "Creates and configures a VPC network on IBM Cloud." - }, { "title": "Subnets", - "description": "Creates and configures subnets for VPC." + "description": "Create [subnets](https://cloud.ibm.com/docs/vpc?topic=vpc-about-subnets-vpc) in three zones that divides your VPC into smaller, isolated networks across different availability zones. This helps you organize resources, improve availability, and control internal communication." }, { "title": "Network ACLs", - "description": "Creates and configures network ACLs." + "description": "Define rules for [Network Access Control Lists (ACLs)](https://cloud.ibm.com/docs/vpc?topic=vpc-using-acls) to allow or deny traffic to and from your subnets, providing an extra layer of network security." }, { "title": "Public gateways", - "description": "Create and configure public gateways." + "description": "Configures [public gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-about-public-gateways) to provide internet access to your VPC resources, acting as a bridge between private network components and the public internet." }, { "title": "VPN gateways", - "description": "Create and configure VPN gateways." + "description": "Create and configures [VPN gateways](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-overview) to enable secure, encrypted connections between your on-premises environment and IBM Cloud, ideal for hybrid cloud setups." }, { "title": "VPE gateways", - "description": "Create and configure VPE gateways." + "description": "Creates Virtual Private Endpoints (VPEs) gateways to allow private access to IBM Cloud services from within your VPC, avoiding public internet traffic. [Learn more](https://cloud.ibm.com/docs/vpc?topic=vpc-about-vpe)." }, { "title": "Security groups", - "description": "Create and configure security group rules." - }, - { - "title": "VPC flow logs", - "description": "VPC flow logs can be enabled." + "description": "Has the ability to configure security groups that works like virtual firewalls for your instances, defining rules that control allowed inbound and outbound traffic. [Learn more](https://cloud.ibm.com/docs/vpc?topic=vpc-using-security-groups)." }, { "title": "Address Prefixes", - "description": "Creates and configures address prefixes." + "description": "Attaches address prefixes to define the IP address ranges used by your subnets, helping with IP management and planning in your VPC." }, { "title": "Routing Table and routes", - "description": "Creates and configures routing table and customized routes." + "description": "Creates routing tables and custom routes to determine how traffic is directed within your VPC and to external networks. [Learn more](https://cloud.ibm.com/docs/vpc?topic=vpc-create-vpc-routing-table&interface=ui)." }, { - "title": "Object Storage bucket for VPC flow logs", - "description": "Creates and configures an Object Storage bucket required for VPC flow logs." + "title": "VPC flow logs", + "description": "Creates and configures [VPC flow logs]((https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs)) capture data about traffic moving through your network, helping with monitoring, auditing, and troubleshooting." + }, + { + "title": "Object Storage bucket for flow logs", + "description": "Creates and configures the Object storage bucket to store the network traffic data captured by VPC flow logs, enabling analysis and long-term storage." }, { "title": "KMS encryption", - "description": "Supports creating a new key, or using an existing one to encrypt the COS flow log bucket." + "description": "Supports Key Management Service (KMS) encryption for the Object Storage bucket where flow logs are stored, enhancing data security." + }, + { + "title": "Optional Integrations", + "description": "This solution can be integrated with [Cloud automation for Observability](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-observability-a3137d28-79e0-479d-8a24-758ebd5a0eab-global) that supports configuring resources for logging, monitoring and activity tracker event routing." } ], - "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-landing-zone-vpc/issues](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/issues). Please note this product is not supported via the IBM Cloud Support Center.", + "support_details": "This product is in the community registry, as such support is handled through the originated repository. If you experience issues, kindly open an issue [here](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/issues). Please note that this product is not currently supported through the IBM Cloud Support Center.", "flavors": [ { "label": "Fully configurable", @@ -94,103 +93,67 @@ "architecture": { "features": [ { - "title": "Create VPC", - "description": "Yes" - }, - { - "title": "Use existing VPC instance", - "description": "No" - }, - { - "title": "New resource group creation", - "description": "No" - }, - { - "title": "Create public gateways", - "description": "Yes" - }, - { - "title": "Create subnets", - "description": "Yes" - }, - { - "title": "Create network ACLs", - "description": "Yes" - }, - { - "title": "Create VPN gateways", - "description": "Yes" - }, - { - "title": "Create VPE gateways", - "description": "Yes" - }, - { - "title": "Create security groups rules", - "description": "Yes" - }, - { - "title": "Configure VPC flow logs", - "description": "Yes" - }, - { - "title": "Create COS instance", - "description": "No" - }, - { - "title": "Enforced KMS encryption", - "description": "No" - }, - { - "title": "Use existing KMS key", - "description": "Yes" + "title": "VPC instance", + "description": "Sets up nd configures a VPC with subnets across three zones and implements ACLs. The predefined ACLs allows traffic on ports 443, 80 and 22." }, { - "title": "KMS key ring and key creation", - "description": "Yes" - }, - { - "title": "Create custom routes", - "description": "Yes" + "title": "Public Gateway", + "description": "Configures a public gateway with one of the subnets." } ], "diagrams": [ { "diagram": { - "caption": "Architecture for provisioning and configuring fully configurable Virtual Private Cloud..", + "caption": "Virtual Private Cloud topology", "url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/main/reference-architecture/deployable-architecture-vpc.svg", "type": "image/svg+xml" }, - "description": "This architecture supports provisioning and configuring fully configurable Virtual Private Cloud." + "description": "This architecture supports provisioning and configuring a Virtual Private Cloud (VPC) environment. While the diagram illustrates a three-zone deployment, the VPC can also be provisioned in a single-zone or two-zone configuration, depending on your availability requirements.

The default configuration deploys a VPC with three zone subnets, configures the predefined ACLs, and attaches a public gateway with one of the subnets. Additional functionalities such as VPN gateway, VPE gateway, Flow Logs, security groups, etc., can be configured by providing the appropriate input values.

VPC Flow Logs are used to monitor and analyze traffic. To enable VPC Flow Logs, this solution automatically manages the following tasks:
- Provisions a Cloud Object Storage (COS) instance using the COS deployable architecture. Alternatively, you can provide an existing COS instance if available.
- Creates an object storage bucket to store flow logs in the provisioned or existing COS instance.
- Supports creation of keys for a Key Management Service (KMS) if a KMS-encrypted bucket is enabled for enhanced security. You can use an existing KMS instance or create a new Key Protect instance using the KMS deployable architecture.

In addition, you have an option to integrate with Observability services. [Cloud automation for Observability](https://cloud.ibm.com/catalog/7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3/architecture/deploy-arch-ibm-observability-a3137d28-79e0-479d-8a24-758ebd5a0eab-global) provides robust monitoring and logging capabilities to deliver deep operational insights into your VPC deployment. You can use IBM Cloud Activity Tracker Event Routing to monitor how users and applications interact with the VPC, supporting compliance and auditability. Cloud Logs can be enabled to collect, view, and analyze platform logs related to the VPC components. Furthermore, IBM Cloud Monitoring captures essential metrics such as CPU and memory utilization, helping you proactively monitor system performance and resource consumption.

This modular design provides flexibility and serves as a secure baseline for deploying compute workloads." } ] }, "iam_permissions": [ { + "role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"], + "service_name": "iam-identity", + "notes": "[Optional] Required if Cloud automation for account configuration is enabled." + }, + { + "role_crns": ["crn:v1:bluemix:public:iam::::role:Administrator"], + "service_name": "is.vpc", + "notes": "Required for creating Virtual Private Cloud(VPC)." + }, + { + "service_name": "cloud-object-storage", "role_crns": [ - "crn:v1:bluemix:public:iam::::role:Administrator" + "crn:v1:bluemix:public:iam::::serviceRole:Manager", + "crn:v1:bluemix:public:iam::::role:Editor" ], - "service_name": "iam-identity" + "notes": "[Optional] Required if you are enabling VPC flow logs." }, { + "service_name": "kms", "role_crns": [ - "crn:v1:bluemix:public:iam::::role:Administrator" + "crn:v1:bluemix:public:iam::::serviceRole:Manager", + "crn:v1:bluemix:public:iam::::role:Editor" ], - "service_name": "is.vpc" + "notes": "[Optional] Required if KMS encryption is enabled to encrypt the Object Storage bucket used for storing flow logs." }, { - "service_name": "cloud-object-storage", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" - ] + ], + "service_name": "sysdig-monitor", + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Cloud monitoring." }, { - "service_name": "kms", "role_crns": [ "crn:v1:bluemix:public:iam::::serviceRole:Manager", "crn:v1:bluemix:public:iam::::role:Editor" - ] + ], + "service_name": "logs", + "notes": "[Optional] Required if you are consuming Observability deployable architecture which sets up Cloud logs." } ], "configuration": [ @@ -215,7 +178,7 @@ }, { "key": "existing_resource_group_name", - "required": true, + "display_name": "resource_group", "custom_config": { "type": "resource_group", "grouping": "deployment", @@ -225,23 +188,6 @@ } } }, - { - "key": "provider_visibility", - "options": [ - { - "displayname": "private", - "value": "private" - }, - { - "displayname": "public", - "value": "public" - }, - { - "displayname": "public-and-private", - "value": "public-and-private" - } - ] - }, { "key": "vpc_name", "required": true @@ -255,9 +201,6 @@ { "key": "address_prefixes" }, - { - "key": "routes" - }, { "key": "security_group_rules" }, @@ -267,6 +210,9 @@ { "key": "vpn_gateways" }, + { + "key": "routes" + }, { "key": "vpe_gateway_cloud_services" }, @@ -347,6 +293,7 @@ }, { "key": "kms_endpoint_type", + "hidden": true, "options": [ { "displayname": "private", @@ -448,57 +395,63 @@ }, { "key": "flow_logs_cos_bucket_enable_permanent_retention" + }, + { + "key": "provider_visibility", + "hidden": true, + "options": [ + { + "displayname": "private", + "value": "private" + }, + { + "displayname": "public", + "value": "public" + }, + { + "displayname": "public-and-private", + "value": "public-and-private" + } + ] } ], "dependencies": [ { "name": "deploy-arch-ibm-account-infra-base", + "description": "Cloud automation for Account Configuration organizes your IBM Cloud account with a ready-made set of resource groups by default and when you enable the \"with Account Settings\" option, it also applies baseline security and governance settings. ", "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", "flavors": [ - "standard" + "resource-group-only", + "resource-groups-with-account-settings" ], + "default_flavor": "resource-group-only", "id": "63641cec-6093-4b4f-b7b0-98d2f4185cd6-global", - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ - { - "dependency_output": "workload_resource_group_name", - "version_input": "existing_resource_group_name" - }, { "dependency_input": "prefix", "version_input": "prefix", "reference_version": true + }, + { + "dependency_output": "workload_resource_group_name", + "version_input": "existing_resource_group_name" } ], "optional": true, - "on_by_default": true, - "version": "^v1.18.0" + "on_by_default": false, + "version": "v3.0.7" }, { - "name": "testing-deploy-arch-ibm-kms", - "id": "85fdbd7a-8c77-4abd-b716-653a31f3aba9-global", - "version": "^v1.2.1", - "flavors": [ - "standard" - ], + "name": "deploy-arch-ibm-kms", + "id": "2cad4789-fa90-4886-9c9e-857081c273ee-global", + "description": "Enable Cloud Automation for Key Protect to use customer-managed encryption keys (CMKs) for encrypting the Cloud Object Storage bucket used to store VPC Flow Logs. If disabled, IBM Cloud's default service-managed encryption will be used instead. Applicable only when VPC Flow logs are enabled. ", + "flavors": ["fully-configurable"], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", - "optional": true, - "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { "dependency_output": "kms_instance_crn", "version_input": "existing_kms_instance_crn" }, - { - "dependency_input": "resource_group_name", - "version_input": "existing_resource_group_name", - "reference_version": true - }, { "dependency_input": "prefix", "version_input": "prefix", @@ -510,32 +463,37 @@ "reference_version": true }, { - "dependency_input": "use_existing_resource_group", - "value": true, + "dependency_input": "kms_endpoint_type", + "version_input": "kms_endpoint_type", "reference_version": true }, { "version_input": "kms_encryption_enabled_bucket", "value": true + }, + { + "version_input": "enable_vpc_flow_logs", + "value": true } - ] + ], + "optional": true, + "on_by_default": true, + "version": "v5.1.4" }, { "name": "deploy-arch-ibm-cos", "id": "68921490-2778-4930-ac6d-bae7be6cd958-global", - "version": "^v8.20.1", - "flavors": [ - "instance" - ], + "description": "Enable to create an IBM Cloud Object Storage (COS) instance, where a bucket will be set up to store VPC flow logs as part of this deployment. ", + "flavors": ["instance"], "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", - "optional": true, - "on_by_default": true, - "ignore_auto_referencing": [ - "*" - ], "input_mapping": [ { - "dependency_output": "cos_instance_id", + "dependency_input": "resource_group_name", + "version_input": "existing_resource_group_name", + "reference_version": true + }, + { + "dependency_output": "cos_instance_crn", "version_input": "existing_cos_instance_crn" }, { @@ -544,23 +502,41 @@ "reference_version": true }, { - "dependency_input": "resource_group_name", - "version_input": "existing_resource_group_name", - "reference_version": true - }, + "version_input": "enable_vpc_flow_logs", + "value": true + } + ], + "optional": true, + "on_by_default": true, + "version": "v9.0.2" + }, + { + "name": "deploy-arch-ibm-observability", + "description": "Configure IBM Cloud Logs, Cloud Monitoring and Activity Tracker event routing for analysing logs and metrics generated by the VPC instance. ", + "id": "a3137d28-79e0-479d-8a24-758ebd5a0eab-global", + "version": "v3.0.3", + "flavors": [ + "instances" + ], + "catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3", + "optional": true, + "on_by_default": true, + "input_mapping": [ { - "dependency_input": "use_existing_resource_group", - "value": true, + "dependency_input": "prefix", + "version_input": "prefix", "reference_version": true }, { - "version_input": "enable_vpc_flow_logs", - "value": true + "dependency_input": "region", + "version_input": "region", + "reference_version": true } ] } ], - "dependency_version_2": true + "dependency_version_2": true, + "terraform_version": "1.10.5" } ] } diff --git a/images/vpc_icon.svg b/images/vpc_icon.svg index 6f06ea97..ded40e94 100644 --- a/images/vpc_icon.svg +++ b/images/vpc_icon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/reference-architecture/deployable-architecture-vpc.svg b/reference-architecture/deployable-architecture-vpc.svg index 4de4ed1c..4dd8db8c 100644 --- a/reference-architecture/deployable-architecture-vpc.svg +++ b/reference-architecture/deployable-architecture-vpc.svg @@ -1,4 +1,4 @@ -
ACL
locked
IBM Cloud
Region
Resource Group
Existing KMS
Key Ring
Root Key
Flow logs Bucket
Cloud Object Storage Instance
VPC
Subnet
Public Gateway (Optional)Virtual Private Endpoints(Optional)
Zone 2
VPN Gateway (Optional)
Subnet
Public Gateway (Optional)Virtual Private Endpoints(Optional)
Zone 1
VPN Gateway (Optional)
ACL
locked
Subnet
Public Gateway (Optional)Virtual Private Endpoints(Optional)
Zone 2
VPN Gateway (Optional)
\ No newline at end of file +
ACL
locked
IBM Cloud
Region
Resource GroupFlow Logs bucket
[Optional] Cloud Object Storage 
VPC
Zone 3
Zone 2
Zone 1
ACL
Subnet
  [Optional] Public Gateway[Optional] VPN Gateway     [Optional] Virtual Private Endpoints
[Optional] KMS
Key Ring
flow-log-bucket-key
Cloud logs
Observability
[Optional]
Cloud Monitoring
\ No newline at end of file diff --git a/solutions/fully-configurable/README.md b/solutions/fully-configurable/README.md index 78d17d90..33e60759 100644 --- a/solutions/fully-configurable/README.md +++ b/solutions/fully-configurable/README.md @@ -36,7 +36,7 @@ This solution supports provisioning and configuring the following infrastructure | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.9.0 | -| [ibm](#requirement\_ibm) | 1.78.4 | +| [ibm](#requirement\_ibm) | 1.79.0 | | [time](#requirement\_time) | 0.13.1 | ### Modules @@ -56,7 +56,7 @@ This solution supports provisioning and configuring the following infrastructure | Name | Type | |------|------| -| [ibm_iam_authorization_policy.cos_kms_policy](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.78.4/docs/resources/iam_authorization_policy) | resource | +| [ibm_iam_authorization_policy.cos_kms_policy](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.79.0/docs/resources/iam_authorization_policy) | resource | | [time_sleep.wait_for_cross_account_authorization_policy](https://registry.terraform.io/providers/hashicorp/time/0.13.1/docs/resources/sleep) | resource | ### Inputs @@ -94,7 +94,7 @@ This solution supports provisioning and configuring the following infrastructure | [kms\_key\_ring\_name](#input\_kms\_key\_ring\_name) | The name of the key ring to create for the Cloud Object Storage bucket key. If an existing key is used, this variable is not required. If the prefix input variable is passed, the name of the key ring is prefixed to the value in the `-value` format. | `string` | `"flow-logs-cos-key-ring"` | no | | [management\_endpoint\_type\_for\_bucket](#input\_management\_endpoint\_type\_for\_bucket) | The type of endpoint for the IBM Terraform provider to use to manage Cloud Object Storage buckets (`public`, `private`, or `direct`). If you are using a private endpoint, make sure that you enable virtual routing and forwarding (VRF) in your account, and that the Terraform runtime can access the IBM Cloud Private network. | `string` | `"direct"` | no | | [network\_acls](#input\_network\_acls) | The list of ACLs to create. Provide at least one rule for each ACL. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#network-acls-). |
list(
object({
name = string
add_ibm_cloud_internal_rules = optional(bool)
add_vpc_connectivity_rules = optional(bool)
prepend_ibm_rules = optional(bool)
rules = list(
object({
name = string
action = string
destination = string
direction = string
source = string
tcp = optional(
object({
port_max = optional(number)
port_min = optional(number)
source_port_max = optional(number)
source_port_min = optional(number)
})
)
udp = optional(
object({
port_max = optional(number)
port_min = optional(number)
source_port_max = optional(number)
source_port_min = optional(number)
})
)
icmp = optional(
object({
type = optional(number)
code = optional(number)
})
)
})
)
})
)
|
[
{
"add_ibm_cloud_internal_rules": true,
"add_vpc_connectivity_rules": true,
"name": "vpc-acl",
"prepend_ibm_rules": true,
"rules": [
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "inbound",
"name": "allow-all-443-inbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 443,
"port_min": 443,
"source_port_max": 443,
"source_port_min": 443
}
},
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "inbound",
"name": "allow-all-80-inbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 80,
"port_min": 80,
"source_port_max": 80,
"source_port_min": 80
}
},
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "inbound",
"name": "allow-all-22-inbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 22,
"port_min": 22,
"source_port_max": 22,
"source_port_min": 22
}
},
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "outbound",
"name": "allow-all-443-outbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 443,
"port_min": 443,
"source_port_max": 443,
"source_port_min": 443
}
},
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "outbound",
"name": "allow-all-80-outbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 80,
"port_min": 80,
"source_port_max": 80,
"source_port_min": 80
}
},
{
"action": "allow",
"destination": "0.0.0.0/0",
"direction": "outbound",
"name": "allow-all-22-outbound",
"source": "0.0.0.0/0",
"tcp": {
"port_max": 22,
"port_min": 22,
"source_port_max": 22,
"source_port_min": 22
}
}
]
}
]
| no | -| [prefix](#input\_prefix) | Prefix to add to all the resources created by this solution. To not use any prefix value, you can set this value to `null` or an empty string. | `string` | n/a | yes | +| [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-0205-vpc. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix). | `string` | n/a | yes | | [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 | | [region](#input\_region) | Region to deploy the VPC. | `string` | `"us-south"` | no | | [resource\_tags](#input\_resource\_tags) | The list of tags to add to the VPC instance. | `list(string)` | `[]` | no | @@ -102,7 +102,7 @@ This solution supports provisioning and configuring the following infrastructure | [security\_group\_rules](#input\_security\_group\_rules) | A list of security group rules to be added to the default vpc security group (default empty). [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#security-group-rules-). |
list(
object({
name = string
direction = string
remote = optional(string)
tcp = optional(
object({
port_max = optional(number)
port_min = optional(number)
})
)
udp = optional(
object({
port_max = optional(number)
port_min = optional(number)
})
)
icmp = optional(
object({
type = optional(number)
code = optional(number)
})
)
})
)
| `[]` | no | | [skip\_cos\_kms\_iam\_auth\_policy](#input\_skip\_cos\_kms\_iam\_auth\_policy) | To skip creating an IAM authorization policy that allows Cloud Object Storage(COS) to access KMS key. | `bool` | `false` | no | | [skip\_vpc\_cos\_iam\_auth\_policy](#input\_skip\_vpc\_cos\_iam\_auth\_policy) | To skip creating an IAM authorization policy that allows the VPC to access the Cloud Object Storage, set this variable to `true`. Required only if `enable_vpc_flow_logs` is set to true. | `bool` | `false` | no | -| [subnets](#input\_subnets) | List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addressess. Public gateways will be enabled only in zones where a gateway has been created. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#subnets-). |
object({
zone-1 = list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
}))
zone-2 = optional(list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
})))
zone-3 = optional(list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
})))
})
|
{
"zone-1": [
{
"acl_name": "vpc-acl",
"cidr": "10.10.10.0/24",
"name": "subnet-a",
"no_addr_prefix": false,
"public_gateway": true
}
]
}
| no | +| [subnets](#input\_subnets) | List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addressess. Public gateways will be enabled only in zones where a gateway has been created. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#subnets-). |
object({
zone-1 = list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
}))
zone-2 = optional(list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
})))
zone-3 = optional(list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
no_addr_prefix = optional(bool, false) # do not automatically add address prefix for subnet, overrides other conditions if set to true
subnet_tags = optional(list(string), [])
})))
})
|
{
"zone-1": [
{
"acl_name": "vpc-acl",
"cidr": "10.10.10.0/24",
"name": "subnet-a",
"no_addr_prefix": false,
"public_gateway": true
}
],
"zone-2": [
{
"acl_name": "vpc-acl",
"cidr": "10.20.10.0/24",
"name": "subnet-b",
"no_addr_prefix": false,
"public_gateway": false
}
],
"zone-3": [
{
"acl_name": "vpc-acl",
"cidr": "10.30.10.0/24",
"name": "subnet-c",
"no_addr_prefix": false,
"public_gateway": false
}
]
}
| no | | [vpc\_name](#input\_vpc\_name) | Name of the VPC. If a prefix input variable is specified, the prefix is added to the name in the `-` format. | `string` | `"vpc"` | no | | [vpe\_gateway\_cloud\_service\_by\_crn](#input\_vpe\_gateway\_cloud\_service\_by\_crn) | The list of cloud service CRNs used to create endpoint gateways. Use this list to identify services that are not supported by service name in the `cloud_services` variable. For a list of supported services, see [VPE-enabled services](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-supported-services). If `service_name` is not specified, the CRN is used to find the name. If `vpe_name` is not specified in the list, VPE names are created in the format `--`. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#vpe-gateway-cloud-service-by-crn-). |
set(
object({
crn = string
vpe_name = optional(string) # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
service_name = optional(string) # Name of the service used to compute the name of the VPE. If not specified, the service name will be obtained from the crn.
allow_dns_resolution_binding = optional(bool, true)
})
)
| `[]` | no | | [vpe\_gateway\_cloud\_services](#input\_vpe\_gateway\_cloud\_services) | The list of cloud services used to create endpoint gateways. If `vpe_name` is not specified in the list, VPE names are created in the format `--`. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#vpe-gateway-cloud-services-). |
set(object({
service_name = string
vpe_name = optional(string), # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
allow_dns_resolution_binding = optional(bool, false)
}))
| `[]` | no | diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index bef9415d..4e110a6c 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -27,17 +27,20 @@ variable "existing_resource_group_name" { variable "prefix" { type = string - nullable = true - description = "Prefix to add to all the resources created by this solution. To not use any prefix value, you can set this value to `null` or an empty string." + description = "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-0205-vpc. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix)." validation { - condition = (var.prefix == null ? true : + condition = (var.prefix == null || var.prefix == "" ? true : alltrue([ - can(regex("^[a-z]{0,1}[-a-z0-9]{0,14}[a-z0-9]{0,1}$", var.prefix)), - length(regexall("^.*--.*", var.prefix)) == 0 + can(regex("^[a-z][-a-z0-9]*[a-z0-9]$", var.prefix)), + length(regexall("--", var.prefix)) == 0 ]) ) - error_message = "Prefix must begin with a lowercase letter, contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 16 or fewer characters." + error_message = "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--')." + } + validation { + condition = length(var.prefix) <= 16 + error_message = "Prefix must not exceed 16 characters." } } @@ -107,6 +110,24 @@ variable "subnets" { acl_name = "vpc-acl" no_addr_prefix = false } + ], + zone-2 = [ + { + name = "subnet-b" + cidr = "10.20.10.0/24" + public_gateway = false + acl_name = "vpc-acl" + no_addr_prefix = false + } + ], + zone-3 = [ + { + name = "subnet-c" + cidr = "10.30.10.0/24" + public_gateway = false + acl_name = "vpc-acl" + no_addr_prefix = false + } ] } diff --git a/solutions/fully-configurable/version.tf b/solutions/fully-configurable/version.tf index cafc2209..760eda18 100644 --- a/solutions/fully-configurable/version.tf +++ b/solutions/fully-configurable/version.tf @@ -4,7 +4,7 @@ terraform { # Lock DA into an exact provider version - renovate automation will keep it updated ibm = { source = "IBM-Cloud/ibm" - version = "1.78.4" + version = "1.79.0" } time = { source = "hashicorp/time" diff --git a/tests/existing-resources/version.tf b/tests/existing-resources/version.tf index b530fc18..40558767 100644 --- a/tests/existing-resources/version.tf +++ b/tests/existing-resources/version.tf @@ -4,7 +4,7 @@ terraform { # Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works ibm = { source = "IBM-Cloud/ibm" - version = "1.59.0" + version = "1.79.0" } } } diff --git a/version.tf b/version.tf index 2dda7827..84174b95 100644 --- a/version.tf +++ b/version.tf @@ -4,7 +4,7 @@ terraform { # Use "greater than or equal to" range in modules ibm = { source = "IBM-Cloud/ibm" - version = ">= 1.59.0, < 2.0.0" + version = ">= 1.79.0, < 2.0.0" } time = { source = "hashicorp/time"