MagaluCloud / terraform-provider-mgc

Magalu Cloud terraform provider
https://docs.magalu.cloud/docs/terraform/overview
8 stars 1 forks source link

Error creating Security Group and Rules #17

Closed trunet closed 4 months ago

trunet commented 5 months ago

security.tf

resource "mgc_network_security_groups" "this" {
  name         = "my_security_group"
  description  = "My Security Group - From Terraform"
  wait         = true
}

resource "mgc_network_rules" "icmp_house" {
  security_group_id = mgc_network_security_groups.this.id
  direction         = "ingress"
  ethertype         = "IPv4"
  protocol          = "icmp"
  remote_ip_prefix  = "[REDACTED]/32"
}

resource "mgc_network_rules" "ssh_house" {
  security_group_id = mgc_network_security_groups.this.id
  direction         = "ingress"
  ethertype         = "IPv4"
  protocol          = "tcp"
  port_range_min    = 22
  port_range_max    = 22
  remote_ip_prefix  = "[REDACTED]/32"
}

terraform apply

│ Error: Unable to Convert Configuration
│
│   with mgc_network_rules.icmp_house,
│   on network.tf line 7, in resource "mgc_network_rules" "icmp_house":
│    7: resource "mgc_network_rules" "icmp_house" {
│
│ An unexpected error was encountered when converting the configuration from the protocol type. This is
│ always an issue in terraform-plugin-framework used to implement the provider and should be reported to the
│ provider developers.
│
│ Please report this to the provider developer:
│
│ Unable to unmarshal DynamicValue: unknown attribute "current_security_group_id"

terraform version

Terraform v1.9.0
on darwin_amd64
+ provider registry.terraform.io/magalucloud/mgc v0.19.3
lfpicoloto1 commented 4 months ago

Fixed in the new version #27