From f9e5ef85db559ef1eed9db6da767ccbf0d8ed786 Mon Sep 17 00:00:00 2001 From: Aatreyee Mukherjee Date: Thu, 21 Nov 2024 16:05:20 +0530 Subject: [PATCH 1/2] fix:classic_access_deprecated --- main.tf | 1 - modules/management-vpc/main.tf | 1 - modules/management-vpc/variables.tf | 6 ------ modules/workload-vpc/main.tf | 1 - modules/workload-vpc/variables.tf | 7 ------- variables.tf | 6 ------ 6 files changed, 22 deletions(-) diff --git a/main.tf b/main.tf index 1dcf9e32..efe70e1a 100644 --- a/main.tf +++ b/main.tf @@ -71,7 +71,6 @@ resource "ibm_is_vpc" "vpc" { count = var.create_vpc == true ? 1 : 0 name = var.prefix != null ? "${var.prefix}-${var.name}-vpc" : var.name resource_group = var.resource_group_id - classic_access = var.classic_access # address prefix is set to auto only if no address prefixes NOR any subnet is passed as input address_prefix_management = (length([for prefix in values(coalesce(var.address_prefixes, {})) : prefix if prefix != null]) != 0) || (length([for subnet in values(coalesce(var.subnets, {})) : subnet if subnet != null]) != 0) ? "manual" : null default_network_acl_name = var.default_network_acl_name diff --git a/modules/management-vpc/main.tf b/modules/management-vpc/main.tf index 3323e9b2..06b7b78f 100644 --- a/modules/management-vpc/main.tf +++ b/modules/management-vpc/main.tf @@ -11,7 +11,6 @@ module "management_vpc" { region = var.region prefix = var.prefix network_cidrs = var.network_cidrs - classic_access = var.classic_access default_network_acl_name = var.default_network_acl_name default_security_group_name = var.default_security_group_name security_group_rules = var.default_security_group_rules == null ? [] : var.default_security_group_rules diff --git a/modules/management-vpc/variables.tf b/modules/management-vpc/variables.tf index fa038142..8ceacb0d 100644 --- a/modules/management-vpc/variables.tf +++ b/modules/management-vpc/variables.tf @@ -37,12 +37,6 @@ variable "network_cidrs" { default = ["10.0.0.0/8"] } -variable "classic_access" { - description = "Optionally allow VPC to access classic infrastructure network" - type = bool - default = null -} - variable "default_network_acl_name" { description = "Override default ACL name" type = string diff --git a/modules/workload-vpc/main.tf b/modules/workload-vpc/main.tf index 576ed327..9f0720d5 100644 --- a/modules/workload-vpc/main.tf +++ b/modules/workload-vpc/main.tf @@ -11,7 +11,6 @@ module "workload_vpc" { region = var.region prefix = var.prefix network_cidrs = var.network_cidrs - classic_access = var.classic_access default_network_acl_name = var.default_network_acl_name default_security_group_name = var.default_security_group_name security_group_rules = var.default_security_group_rules == null ? [] : var.default_security_group_rules diff --git a/modules/workload-vpc/variables.tf b/modules/workload-vpc/variables.tf index a914f785..914b9c38 100644 --- a/modules/workload-vpc/variables.tf +++ b/modules/workload-vpc/variables.tf @@ -37,13 +37,6 @@ variable "network_cidrs" { default = ["10.0.0.0/8"] } -variable "classic_access" { - description = "Optionally allow VPC to access classic infrastructure network" - type = bool - default = null -} - - variable "default_network_acl_name" { description = "Override default ACL name" type = string diff --git a/variables.tf b/variables.tf index ae46c2c3..ac7a8114 100644 --- a/variables.tf +++ b/variables.tf @@ -106,12 +106,6 @@ variable "network_cidrs" { default = ["10.0.0.0/8"] } -variable "classic_access" { - description = "OPTIONAL - Classic Access to the VPC" - type = bool - default = false -} - variable "default_network_acl_name" { description = "OPTIONAL - Name of the Default ACL. If null, a name will be automatically generated" type = string From 5f02c62541152acfb714e915d1c61b8523f55bc8 Mon Sep 17 00:00:00 2001 From: Aatreyee Mukherjee Date: Thu, 21 Nov 2024 16:43:28 +0530 Subject: [PATCH 2/2] fixed the pipeline error --- README.md | 1 - modules/management-vpc/README.md | 1 - modules/workload-vpc/README.md | 1 - 3 files changed, 3 deletions(-) diff --git a/README.md b/README.md index 04d83d33..12478eb6 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,6 @@ To attach access management tags to resources in this module, you need the follo |------|-------------|------|---------|:--------:| | [access\_tags](#input\_access\_tags) | A list of access tags to apply to the VPC resources created by the module. For more information, see https://cloud.ibm.com/docs/account?topic=account-access-tags-tutorial. | `list(string)` | `[]` | no | | [address\_prefixes](#input\_address\_prefixes) | OPTIONAL - IP range that will be defined for the VPC for a certain location. Use only with manual address prefixes |
object({
zone-1 = optional(list(string))
zone-2 = optional(list(string))
zone-3 = optional(list(string))
})
|
{
"zone-1": null,
"zone-2": null,
"zone-3": null
}
| no | -| [classic\_access](#input\_classic\_access) | OPTIONAL - Classic Access to the VPC | `bool` | `false` | no | | [clean\_default\_sg\_acl](#input\_clean\_default\_sg\_acl) | Remove all rules from the default VPC security group and VPC ACL (less permissive) | `bool` | `false` | no | | [create\_authorization\_policy\_vpc\_to\_cos](#input\_create\_authorization\_policy\_vpc\_to\_cos) | Create authorisation policy for VPC to access COS. Set as false if authorization policy exists already | `bool` | `false` | no | | [create\_subnets](#input\_create\_subnets) | Indicates whether user wants to use existing subnets or create new. Set it to true to create new subnets. | `bool` | `true` | no | diff --git a/modules/management-vpc/README.md b/modules/management-vpc/README.md index 5b66ae39..91dd3ba7 100644 --- a/modules/management-vpc/README.md +++ b/modules/management-vpc/README.md @@ -40,7 +40,6 @@ No resources. |------|-------------|------|---------|:--------:| | [access\_tags](#input\_access\_tags) | Optional list of access tags to add to the VPC resources that are created | `list(string)` | `[]` | no | | [address\_prefixes](#input\_address\_prefixes) | Use `address_prefixes` only if `use_manual_address_prefixes` is true otherwise prefixes will not be created. Use only if you need to manage prefixes manually. |
object({
zone-1 = optional(list(string))
zone-2 = optional(list(string))
zone-3 = optional(list(string))
})
| `null` | no | -| [classic\_access](#input\_classic\_access) | Optionally allow VPC to access classic infrastructure network | `bool` | `null` | no | | [clean\_default\_sg\_acl](#input\_clean\_default\_sg\_acl) | Remove all rules from the default VPC security group and VPC ACL (less permissive) | `bool` | `false` | no | | [create\_authorization\_policy\_vpc\_to\_cos](#input\_create\_authorization\_policy\_vpc\_to\_cos) | Set it to true if authorization policy is required for VPC to access COS | `bool` | `false` | no | | [default\_network\_acl\_name](#input\_default\_network\_acl\_name) | Override default ACL name | `string` | `null` | no | diff --git a/modules/workload-vpc/README.md b/modules/workload-vpc/README.md index 102a1297..0d0dd34f 100644 --- a/modules/workload-vpc/README.md +++ b/modules/workload-vpc/README.md @@ -40,7 +40,6 @@ No resources. |------|-------------|------|---------|:--------:| | [access\_tags](#input\_access\_tags) | Optional list of access tags to add to the VPC resources that are created | `list(string)` | `[]` | no | | [address\_prefixes](#input\_address\_prefixes) | Use `address_prefixes` only if `use_manual_address_prefixes` is true otherwise prefixes will not be created. Use only if you need to manage prefixes manually. |
object({
zone-1 = optional(list(string))
zone-2 = optional(list(string))
zone-3 = optional(list(string))
})
| `null` | no | -| [classic\_access](#input\_classic\_access) | Optionally allow VPC to access classic infrastructure network | `bool` | `null` | no | | [clean\_default\_sg\_acl](#input\_clean\_default\_sg\_acl) | Remove all rules from the default VPC security group and VPC ACL (less permissive) | `bool` | `false` | no | | [create\_authorization\_policy\_vpc\_to\_cos](#input\_create\_authorization\_policy\_vpc\_to\_cos) | Set it to true if authorization policy is required for VPC to access COS | `bool` | `false` | no | | [default\_network\_acl\_name](#input\_default\_network\_acl\_name) | Override default ACL name | `string` | `null` | no |