diff --git a/automation-generators/ibm-cloud/vpc/templates/main.tf.j2 b/automation-generators/ibm-cloud/vpc/templates/main.tf.j2 index ca09c4975..b159f7fbf 100644 --- a/automation-generators/ibm-cloud/vpc/templates/main.tf.j2 +++ b/automation-generators/ibm-cloud/vpc/templates/main.tf.j2 @@ -8,6 +8,7 @@ resource "ibm_is_vpc" "{{generator.attributes.name | replace("-", "_") }}" { default_network_acl_name = "{{generator.attributes.name }}-acl-default" default_security_group_name = "{{generator.attributes.name }}-sg-default" default_routing_table_name = "{{generator.attributes.name }}-rt-default" + classic_access = "{[generator.attributes.classic_access | default('false') | lower}}" lifecycle { ignore_changes = [ resource_group ] } diff --git a/docs/src/30-reference/configuration/infrastructure.md b/docs/src/30-reference/configuration/infrastructure.md index 2ca84b51f..04d7585ee 100644 --- a/docs/src/30-reference/configuration/infrastructure.md +++ b/docs/src/30-reference/configuration/infrastructure.md @@ -105,6 +105,7 @@ Defines the virtual private cloud which groups the provisioned objects (includin vpc: - name: sample allow_inbound: ['ssh', 'https'] + classic_access: False ``` #### Property explanation @@ -114,6 +115,7 @@ vpc: | name | Name of the Virtual Private Cloud | Yes | | | managed | Controls whether the VPC is managed. The default is `True`. Only set to `False` if the VPC is not managed but only referenced by other objects such as transit gateways. | No | True (default), False | | allow_inbound | Security rules which are allowed for inbound traffic | No | Existing `security_rule` | +| classic_access| Connect VPC to IBM Cloud classic infratructure resources | No | False (default), True | ### IBM Cloud `address_prefix` diff --git a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-nfs.yaml b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-nfs.yaml index 5c97a62f9..06af729d2 100644 --- a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-nfs.yaml +++ b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-nfs.yaml @@ -26,6 +26,7 @@ security_rule: vpc: - name: "{{ env_id }}" allow_inbound: ['ssh'] + classic_access: False address_prefix: - name: "{{ env_id }}-zone" diff --git a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-ocs.yaml b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-ocs.yaml index 6938fbaa9..1fabdfc8e 100644 --- a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-ocs.yaml +++ b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-ocs.yaml @@ -22,6 +22,7 @@ security_rule: vpc: - name: "{{ env_id }}" allow_inbound: ['ssh'] + classic_access: False address_prefix: - name: "{{ env_id }}-zone-1" diff --git a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-portworx.yaml b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-portworx.yaml index 82561094d..10126c4be 100644 --- a/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-portworx.yaml +++ b/sample-configurations/sample-dynamic/config-samples/ocp-ibm-cloud-roks-portworx.yaml @@ -22,6 +22,7 @@ security_rule: vpc: - name: "{{ env_id }}" allow_inbound: ['ssh'] + classic_access: False address_prefix: - name: "{{ env_id }}-zone-1"