Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid type specification on .terraform/modules/aks/variables.tf line 67, in variable "agents_pool_linux_os_configs": #337

Closed
1 task done
sfozz opened this issue Mar 27, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@sfozz
Copy link

sfozz commented Mar 27, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

greenfield

Terraform Version

1.2.9

Module Version

6.7.0

AzureRM Provider Version

3.49.0

Affected Resource(s)/Data Source(s)

na

Terraform Configuration Files

Using the example from examples/startup/main.tf

tfvars variables values

defaults

Debug Output/Panic Output

~/bin/terraform_1.2.9 init
Initializing modules...
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
╷
│ Error: Invalid type specification
│
│   on .terraform/modules/aks/variables.tf line 67, in variable "agents_pool_linux_os_configs":
│   67:     sysctl_configs = optional(list(object({
│   68:       fs_aio_max_nr                      = optional(number)
│   69:       fs_file_max                        = optional(number)
│   70:       fs_inotify_max_user_watches        = optional(number)
│   71:       fs_nr_open                         = optional(number)
│   72:       kernel_threads_max                 = optional(number)
│   73:       net_core_netdev_max_backlog        = optional(number)
│   74:       net_core_optmem_max                = optional(number)
│   75:       net_core_rmem_default              = optional(number)
│   76:       net_core_rmem_max                  = optional(number)
│   77:       net_core_somaxconn                 = optional(number)
│   78:       net_core_wmem_default              = optional(number)
│   79:       net_core_wmem_max                  = optional(number)
│   80:       net_ipv4_ip_local_port_range_min   = optional(number)
│   81:       net_ipv4_ip_local_port_range_max   = optional(number)
│   82:       net_ipv4_neigh_default_gc_thresh1  = optional(number)
│   83:       net_ipv4_neigh_default_gc_thresh2  = optional(number)
│   84:       net_ipv4_neigh_default_gc_thresh3  = optional(number)
│   85:       net_ipv4_tcp_fin_timeout           = optional(number)
│   86:       net_ipv4_tcp_keepalive_intvl       = optional(number)
│   87:       net_ipv4_tcp_keepalive_probes      = optional(number)
│   88:       net_ipv4_tcp_keepalive_time        = optional(number)
│   89:       net_ipv4_tcp_max_syn_backlog       = optional(number)
│   90:       net_ipv4_tcp_max_tw_buckets        = optional(number)
│   91:       net_ipv4_tcp_tw_reuse              = optional(bool)
│   92:       net_netfilter_nf_conntrack_buckets = optional(number)
│   93:       net_netfilter_nf_conntrack_max     = optional(number)
│   94:       vm_max_map_count                   = optional(number)
│   95:       vm_swappiness                      = optional(number)
│   96:       vm_vfs_cache_pressure              = optional(number)
│   97:     })), [])
│
│ Optional attribute modifier expects only one argument: the attribute type.
╵

Expected Behaviour

terraform should initialise

Actual Behaviour

error

Steps to Reproduce

  1. terraform init

Important Factoids

No response

References

No response

@sfozz sfozz added the bug Something isn't working label Mar 27, 2023
@lonegunmanb
Copy link
Member

Hi @sfozz thanks for reporting this issue, a short answer is, optional object field was introduced by Terraform 1.3. The current required version of Terraform is obsolete. I'll open a pr to fix this issue, meanwhile you can upgrade your Terraform version to >= 1.3 as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants