Skip to content

Conversation

bm-stackit
Copy link
Contributor

@bm-stackit bm-stackit commented Sep 8, 2025

Description

#923 (comment)
#923 (comment)

It was requested that we add the security group id to the tests and change machine_type to non deprecated ones.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@bm-stackit bm-stackit requested a review from a team as a code owner September 8, 2025 14:34
@bm-stackit bm-stackit changed the title Fork/msk stackit/main Added Security_group_id to tests Sep 8, 2025
@bm-stackit bm-stackit changed the title Added Security_group_id to tests Added Security_group_id to tests and added non deprecated machine_type Sep 8, 2025
@rubenhoenle rubenhoenle self-assigned this Sep 10, 2025
@rubenhoenle
Copy link
Member

Acc tests are failing, see below

➜  terraform-provider-stackit git:(58de58f8) TF_ACC=1 go test -timeout=90m ./stackit/internal/services/loadbalancer/loadbalancer_acc_test.go
No load balancers found for project
--- FAIL: TestAccLoadBalancerResourceMin (180.32s)
    loadbalancer_acc_test.go:100: Step 1/4 error: After applying this test step, the refresh plan was not empty.
        stdout


        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place

        Terraform will perform the following actions:

          # stackit_network_interface.network_interface will be updated in-place
          ~ resource "stackit_network_interface" "network_interface" {
                id                   = "66b03760-125b-4c63-9624-741e8a418c02,de811328-b8c7-4d48-83ef-9449214f3ae2,8acec57f-dc95-4bdf-a5b6-e9bcda97ba60"
                name                 = "name"
              ~ security_group_ids   = [
                  - "bfd2de46-a802-41d9-b246-8c0e0b615226",
                ]
                # (8 unchanged attributes hidden)
            }

        Plan: 0 to add, 1 to change, 0 to destroy.
No load balancers found for project
--- FAIL: TestAccLoadBalancerResourceMax (190.23s)
    loadbalancer_acc_test.go:218: Step 1/4 error: Check failed: Check 17/41 error: stackit_loadbalancer.loadbalancer: Attribute 'security_group_id' expected "123abc-a123-123a-1234-abc123def456", got "95cfd576-131a-457b-8f18-037b3e25d264"
FAIL
FAIL    command-line-arguments  190.234s
FAIL

@rubenhoenle rubenhoenle added the needs-work PR needs changes by the author. label Sep 10, 2025
@bm-stackit
Copy link
Contributor Author

bm-stackit commented Sep 10, 2025

Acc tests are failing, see below

➜  terraform-provider-stackit git:(58de58f8) TF_ACC=1 go test -timeout=90m ./stackit/internal/services/loadbalancer/loadbalancer_acc_test.go
No load balancers found for project
--- FAIL: TestAccLoadBalancerResourceMin (180.32s)
    loadbalancer_acc_test.go:100: Step 1/4 error: After applying this test step, the refresh plan was not empty.
        stdout


        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place

        Terraform will perform the following actions:

          # stackit_network_interface.network_interface will be updated in-place
          ~ resource "stackit_network_interface" "network_interface" {
                id                   = "66b03760-125b-4c63-9624-741e8a418c02,de811328-b8c7-4d48-83ef-9449214f3ae2,8acec57f-dc95-4bdf-a5b6-e9bcda97ba60"
                name                 = "name"
              ~ security_group_ids   = [
                  - "bfd2de46-a802-41d9-b246-8c0e0b615226",
                ]
                # (8 unchanged attributes hidden)
            }

        Plan: 0 to add, 1 to change, 0 to destroy.
No load balancers found for project
--- FAIL: TestAccLoadBalancerResourceMax (190.23s)
    loadbalancer_acc_test.go:218: Step 1/4 error: Check failed: Check 17/41 error: stackit_loadbalancer.loadbalancer: Attribute 'security_group_id' expected "123abc-a123-123a-1234-abc123def456", got "95cfd576-131a-457b-8f18-037b3e25d264"
FAIL
FAIL    command-line-arguments  190.234s
FAIL

If the acc tests are still failing and the security_group_Id changed again I will do another PR. That one will only check if the attribute is set since its being computated. Unless there is a way to check for the actual computated security_group_id?

Copy link
Member

@rubenhoenle rubenhoenle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acc tests are still failing

➜  terraform-provider-stackit git:(6ca2e58a) TF_ACC=1 go test -timeout=30m ./stackit/internal/services/loadbalancer/loadbalancer_acc_test.go
--- FAIL: TestAccLoadBalancerResourceMin (170.28s)
    loadbalancer_acc_test.go:100: Step 1/4 error: Check failed: Check 19/24 error: stackit_loadbalancer.loadbalancer: Attribute 'security_group_id' found when not expected
No load balancers found for project
FAIL
FAIL    command-line-arguments  200.412s
FAIL

rubenhoenle
rubenhoenle previously approved these changes Sep 12, 2025
… the load balancer resource. This allows disabling the automatic assignment of a security group to the targets.
This allows users to reference the ID in security group rules for targets in other networks, enabling cross-network traffic.
This allows users to reference the ID in security group rules for targets in other networks, enabling cross-network traffic.
…es ready if disabletargetsecuritygroupassignment is true
@rubenhoenle rubenhoenle enabled auto-merge (squash) September 12, 2025 15:19
@rubenhoenle rubenhoenle merged commit b1e97e9 into stackitcloud:main Sep 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-work PR needs changes by the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants