* feat(iaas): security group min/max acc test * feat(iaas): image min/max acc test * feat(iaas): KeyPair min/max acc test * feat(iaas): Network area min/max acc test - fix: wrong atLeast-validator for `minimum_prefix_length` * feat(iaas): Network min/max acc test * feat(iaas): Volume min/max acc test - fix: volume update doesn't work if no name was defined - fix: volume.server_id can not be set - fix: error message volume.size returns value but was null * feat(iaas): Network interfaces min/max acc test * feat(iaas): Affinity groups acc test * feat(iaas): Server min/max acc test - stackit_server_volume_attach - stackit_server_network_interface_attach - stackit_server_service_account_attach * fix(iaas): acc test - image: fix read of Config.VirtioScsi - keypair: add missing RequiresReplace() for name - server: add missing UserData read in datasource and resource * feat(iaas): public ip acc test - fix: when a nic is assigned to a public ip, the field network_interface_id leads to recreation
72 lines
No EOL
1.8 KiB
HCL
72 lines
No EOL
1.8 KiB
HCL
variable "project_id" {}
|
|
|
|
variable "name" {}
|
|
variable "description" {}
|
|
variable "description_rule" {}
|
|
variable "label" {}
|
|
variable "stateful" {}
|
|
variable "direction" {}
|
|
variable "ether_type" {}
|
|
variable "ip_range" {}
|
|
variable "port" {}
|
|
variable "protocol" {}
|
|
variable "icmp_code" {}
|
|
variable "icmp_type" {}
|
|
variable "name_remote" {}
|
|
|
|
resource "stackit_security_group" "security_group" {
|
|
project_id = var.project_id
|
|
name = var.name
|
|
description = var.description
|
|
labels = {
|
|
"acc-test" : var.label
|
|
}
|
|
stateful = var.stateful
|
|
}
|
|
|
|
resource "stackit_security_group_rule" "security_group_rule" {
|
|
project_id = var.project_id
|
|
security_group_id = stackit_security_group.security_group.security_group_id
|
|
direction = var.direction
|
|
|
|
description = var.description_rule
|
|
ether_type = var.ether_type
|
|
port_range = {
|
|
min = var.port
|
|
max = var.port
|
|
}
|
|
protocol = {
|
|
name = var.protocol
|
|
}
|
|
ip_range = var.ip_range
|
|
}
|
|
|
|
resource "stackit_security_group_rule" "security_group_rule_icmp" {
|
|
project_id = var.project_id
|
|
security_group_id = stackit_security_group.security_group.security_group_id
|
|
direction = var.direction
|
|
|
|
description = var.description_rule
|
|
ether_type = var.ether_type
|
|
icmp_parameters = {
|
|
code = var.icmp_code
|
|
type = var.icmp_type
|
|
}
|
|
protocol = {
|
|
name = "icmp"
|
|
}
|
|
ip_range = var.ip_range
|
|
}
|
|
|
|
resource "stackit_security_group" "security_group_remote" {
|
|
project_id = var.project_id
|
|
name = var.name_remote
|
|
}
|
|
|
|
resource "stackit_security_group_rule" "security_group_rule_remote_security_group" {
|
|
project_id = var.project_id
|
|
security_group_id = stackit_security_group.security_group.security_group_id
|
|
direction = var.direction
|
|
|
|
remote_security_group_id = stackit_security_group.security_group_remote.security_group_id
|
|
} |