Description
An error occurs when creating a security group rule with a port range of 1-65535.
Steps to reproduce
resource "stackit_security_group" "sg0" {
project_id = var.project_id
name = "${var.country}-sg0"
stateful = true
}
resource "stackit_security_group_rule" "sg0-rule0" {
project_id = var.project_id
security_group_id = stackit_security_group.sg0.security_group_id
direction = "ingress"
ether_type = "IPv4"
description = "${var.country}-allow-all-from-admin"
ip_range = "172.16.0.96/27"
protocol = {
name = "tcp"
}
port_range = {
min = 1
max = 65535
}
}
Actual behavior
Error: Provider produced inconsistent result after apply
When applying changes to stackit_security_group_rule.sg0-rule0, provider "provider[\"registry.terraform.io/stackitcloud/stackit\"]" produced an unexpected new value:
.port_range: was cty.ObjectVal(map[string]cty.Value{"max":cty.NumberIntVal(65535), "min":cty.NumberIntVal(1)}), but now null.
This is a bug in the provider, which should be reported in the provider's own issue tracker.
The resource has been actually created and is visible in the portal with Start-port: Any / End-port: Any.
However, an error is reported, and Terraform attempts to recreate it every time I run terraform apply.
If I change the configuration to:
port_range = {
min = 2
max = 65535
}
or comment the block above, everything works as expected.
While it may not be the most critical feature, it is worth reporting.
Environment
- OS:
Ubuntu 22.04.5 LTS
- Terraform version:
v1.11.3
- Version of the STACKIT Terraform provider:
v0.50.0
Description
An error occurs when creating a security group rule with a port range of 1-65535.
Steps to reproduce
Actual behavior
The resource has been actually created and is visible in the portal with
Start-port: Any/End-port: Any.However, an error is reported, and Terraform attempts to recreate it every time I run
terraform apply.If I change the configuration to:
or comment the block above, everything works as expected.
While it may not be the most critical feature, it is worth reporting.
Environment
Ubuntu 22.04.5 LTSv1.11.3v0.50.0