Skip to content

Conversation

bm-stackit
Copy link
Contributor

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

Description

The attribute of the actual loadbalancer security group wasnt in the provider yet and is now added.

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 25, 2025 13:42
@bm-stackit
Copy link
Contributor Author

bm-stackit commented Sep 25, 2025

Gonna add the acceptance tests as well

@bm-stackit bm-stackit force-pushed the bm-terraform-provider-stackit branch from 794612c to 83d2356 Compare September 25, 2025 14:51
@bm-stackit bm-stackit force-pushed the bm-terraform-provider-stackit branch from 83d2356 to 81ec910 Compare September 25, 2025 14:59
Description: descriptions["security_group_id"],
Computed: true,
},
"load_balancer_security_group_id": schema.StringAttribute{
Copy link
Member

Choose a reason for hiding this comment

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

So you came here 2 weeks ago and introduced the security_group field to this resource (#986). Now you want to introduce a second one.

I don't quite get it yet. What's the other security group id for now?

Copy link
Contributor Author

@bm-stackit bm-stackit Sep 25, 2025

Choose a reason for hiding this comment

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

Since I took this one over from a colleague that is no longer in our team we realized a bit too late, that he missed adding the other crucial security group attribute that is on the loadbalancer vm itself which is needed to do the actual routing. The Load_balancer_security_group_id is the security group of the LB VM and the other security_group_id is the one that we create but do not assign. Load_balancer_security_group_id is being put into the remote_security_group_id of the backend security group which in return allows communication of the LB and the Backend target.

Copy link
Member

Choose a reason for hiding this comment

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

You were so speeding with your last PR, now we have the mess. Anyways, lets break it down:


We have the new load_balancer_security_group_id field now which relates to this field in the API docs right?

https://docs.api.stackit.cloud/documentation/load-balancer/version/v2#tag/Load-Balancer/operation/APIService_GetLoadBalancer

image

And then there is the "old" security_group_id attribute which relates to this field in the API docs, right?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your observations are correct. The Load_balancer_security_group_id(loadBalanerSecurityGroup) is important for loadbalancers across different Projects in 1 SNA. And the security_group_id (targetSecurityGroup) is useful for load balancers with targets in the same project but different networks.

Copy link
Member

Choose a reason for hiding this comment

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

So I would say the security_group_id field be named target_security_group_id field instead. Which isn't possible now that easily because we have a deprecation time of 6 months...

Copy link
Contributor Author

@bm-stackit bm-stackit Sep 25, 2025

Choose a reason for hiding this comment

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

That is not a problem, leave it as is.

Copy link
Member

Choose a reason for hiding this comment

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

That is not a problem, leave it as is.

Maybe for you but I care about our users. IMO the security_group_id field must be deprecated and a new field target_security_group_id should be added.

@bm-stackit
Copy link
Contributor Author

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants