frostmoln_instance_port_security_groups (Resource)
Manages the security groups on a SINGLE network port of a multi-NIC compute instance, leaving the instance's other ports untouched. Use this when an instance's ports need DIFFERENT security-group sets; for one set applied uniformly across every port, set security_groups on the frostmoln_instance resource instead (the two are mutually exclusive ways to manage the same ports).
Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.
Enacted and reconciled — every configurable attribute not listed below: the platform applies it, and a refresh reads the truth back.
Create-immutable — instance_id, port_id: the resource is identified by its instance and port; changing one is a different attachment.
Example Usage
# Manage the security groups on a SINGLE port of a multi-NIC instance, leaving
# the instance's other ports untouched. Use this only when an instance's ports
# need DIFFERENT security-group sets; for one set applied to every port, use the
# security_groups attribute on frostmoln_instance instead.
resource "frostmoln_instance_port_security_groups" "frontend_nic" {
instance_id = frostmoln_instance.example.id
port_id = "b1e0f6c2-1234-4a5b-9c8d-abcdef012345" # port ID (see the instance's per-port SG breakdown)
security_groups = [
frostmoln_security_group.web.id,
frostmoln_security_group.ssh.id,
]
}Schema
Required
instance_id(String) The ID of the instance the port belongs to.port_id(String) The port ID to set security groups on. Port IDs are shown in the instance's per-port security-group breakdown (GET .../security-groups).security_groups(Set of String) The security-group IDs to set on the port (replace semantics — any security group not listed is removed from the port). An empty set clears all security groups on the port, leaving it on the VPC default-drop (typically no inbound access).
Optional
timeouts(Block, Optional) (see below for nested schema)
Read-Only
id(String) Composite identifier ({instance_id}/{port_id}).
Nested Schema for timeouts
Optional:
create(String) How long the provider waits for the create operation to converge before giving up (e.g. "45m", "2h").delete(String) How long the provider waits for the delete to complete before giving up (e.g. "30m").update(String) How long the provider waits for an update (resize, in-place change) to converge before giving up (e.g. "30m").
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import an instance port's security-group binding by {instance_id}/{port_id}.
terraform import frostmoln_instance_port_security_groups.frontend_nic "inst-abc123/b1e0f6c2-1234-4a5b-9c8d-abcdef012345"