sbercloud-terraform / terraform-provider-sbercloud

Terraform SberCloud Provider
https://registry.terraform.io/providers/sbercloud-terraform/sbercloud/latest/docs
Mozilla Public License 2.0
34 stars 21 forks source link

unsupported parameters sbercloud_networking_secgroup_rule #320

Open J0hnZ0idberg opened 1 month ago

J0hnZ0idberg commented 1 month ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v1.5.7

Affected Resource(s)

Terraform Configuration Files

terraform {
  required_providers {
    sbercloud = {
      source  = "sbercloud-terraform/sbercloud"
      version = "1.12.3"
    }
  }
}

Resource config

resource "sbercloud_networking_secgroup_rule" "sg_source_sg" {
  for_each          = local.sg_rules
  security_group_id = data.sbercloud_networking_secgroup.secgroup_id.id
  description       = each.value.description
  direction         = lookup(each.value, "direction", "ingress")
  ethertype         = "IPv4"
  protocol          = each.value.protocol
  ports             = each.value.port
  remote_address_group_id = data.sbercloud_networking_secgroup.remote_secgroup_id[each.key].id
  depends_on = [ sbercloud_networking_secgroup.secgroup ]
}

Expected Behavior

Должны быть создана security group у которой в качестве source указана другая security group

Actual Behavior

Ошибка https://gist.github.com/J0hnZ0idberg/6d2b67c60dd3872e48f5fb63b63190b4

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

При использовании в качестве source другой секьюрити группы нужно указывать параметры ports и remote_address_group_id. Однако, api говорит что их использовать нельзя.

andreygf89 commented 1 month ago

Trouble Такая же ошибка при указании remote_address_group_id и с пустыми ports