terraform-provider-vyos icon indicating copy to clipboard operation
terraform-provider-vyos copied to clipboard

Support for setting keys with no value

Open TGNThump opened this issue 2 years ago • 0 comments

Some configuration keys, such as service dhcp-server hostfile-update, have no values and therefore cannot be managed with the existing resources.

The following doesn't work at all:

resource "vyos_config" "dhcp_service_config" {
  key   = "service dhcp-server host-decl-name"
  value = ""
}
resource "vyos_config_block" "dhcp_service_config" {
  path    = "service dhcp-server host-decl-name"
  configs = {}
}
resource "vyos_config_block_tree" "dhcp_service_config" {
  path    = "service dhcp-server host-decl-name"
  configs = {}
}

The following work on apply but the read doesn't work properly:

resource "vyos_config_block" "dhcp_service_config" {
  path    = "service dhcp-server"
  configs = {
    "hostfile-update" = ""
  }
}
resource "vyos_config_block_tree" "dhcp_service_config" {
  path    = "service dhcp-server"
  configs = {
    "hostfile-update" = ""
  }
}

TGNThump avatar Oct 30 '22 15:10 TGNThump