feat(iaas): min/max acc tests (#811)
* 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
This commit is contained in:
parent
b5f955124a
commit
c7c64a5806
28 changed files with 3494 additions and 995 deletions
54
stackit/internal/services/iaas/testdata/resource-network-interface-max.tf
vendored
Normal file
54
stackit/internal/services/iaas/testdata/resource-network-interface-max.tf
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
variable "project_id" {}
|
||||
variable "name" {}
|
||||
variable "allowed_address" {}
|
||||
variable "ipv4" {}
|
||||
variable "ipv4_prefix" {}
|
||||
variable "security" {}
|
||||
variable "label" {}
|
||||
|
||||
resource "stackit_network" "network" {
|
||||
project_id = var.project_id
|
||||
name = var.name
|
||||
ipv4_prefix = var.ipv4_prefix
|
||||
}
|
||||
|
||||
resource "stackit_network_interface" "network_interface" {
|
||||
project_id = var.project_id
|
||||
network_id = stackit_network.network.network_id
|
||||
name = var.name
|
||||
allowed_addresses = var.security ? [var.allowed_address] : null
|
||||
ipv4 = var.ipv4
|
||||
security = var.security
|
||||
security_group_ids = var.security ? [stackit_security_group.security_group.security_group_id] : null
|
||||
labels = {
|
||||
"acc-test" : var.label
|
||||
}
|
||||
}
|
||||
|
||||
resource "stackit_public_ip" "public_ip" {
|
||||
project_id = var.project_id
|
||||
network_interface_id = stackit_network_interface.network_interface.network_interface_id
|
||||
labels = {
|
||||
"acc-test" : var.label
|
||||
}
|
||||
}
|
||||
|
||||
resource "stackit_network_interface" "network_interface_simple" {
|
||||
project_id = var.project_id
|
||||
network_id = stackit_network.network.network_id
|
||||
}
|
||||
|
||||
resource "stackit_public_ip" "public_ip_simple" {
|
||||
project_id = var.project_id
|
||||
}
|
||||
|
||||
resource "stackit_public_ip_associate" "nic_public_ip_attach" {
|
||||
project_id = var.project_id
|
||||
network_interface_id = stackit_network_interface.network_interface_simple.network_interface_id
|
||||
public_ip_id = stackit_public_ip.public_ip_simple.public_ip_id
|
||||
}
|
||||
|
||||
resource "stackit_security_group" "security_group" {
|
||||
project_id = var.project_id
|
||||
name = var.name
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue