frostmoln_security_group (Data Source)
Look up a security group by ID or name. Exactly one of id or name must be specified.
This is how a configuration reaches a security group that Terraform did not create — including the platform-managed group a managed database, cache, webserver or messaging instance attaches (search the tenant's list by name, or pass its id). A name lookup that matches NOTHING fails the read, and so does one that matches MORE THAN ONE group: the data source refuses to pick for you (the diagnostic names the colliding ids). The optional vpc_id narrows a name lookup (the vpcId filter rides the request) and is echoed back from the read.
There is no rules attribute here, on purpose: the rule listing is OWNED by the sibling data source frostmoln_security_group_rules (one collection, one owner), so this resolver's job is the id the rules data source is addressed by.
Example Usage
# Resolve a security group that Terraform did not create by NAME — including
# the platform-managed group a managed database, cache, webserver or messaging
# instance attaches. This resolver's job is the id.
data "frostmoln_security_group" "web" {
name = "web"
}
# The rules live with their own surface (one collection, one owner):
# frostmoln_security_group_rules reads the whole stored rule set of the group
# this lookup resolves.
data "frostmoln_security_group_rules" "web" {
security_group_id = data.frostmoln_security_group.web.id
}
# A lookup by id behaves identically for groups whose UUID is already known.
data "frostmoln_security_group" "by_id" {
id = data.frostmoln_security_group.web.id
}
# The optional vpc_id narrows a name lookup (sent as the vpcId filter) and is
# echoed back from the read.
data "frostmoln_security_group" "in_vpc" {
name = "web"
vpc_id = "vpc-1d2e3f4a-0000-0000-0000-000000000000"
}
# A name that matches nothing — or more than one security group — fails the
# read loudly rather than picking a group for you.Schema
Optional
id(String) The unique identifier of the security group. Exactly one of id or name must be specified.name(String) The name of the security group. Exactly one of id or name must be specified. A name is at most 234 characters (the resource's validators enforce the same limit). If two VPCs could both carry the name, passvpc_idas well — an ambiguous match fails the read.vpc_id(String) The VPC the security group belongs to. As an INPUT it narrows a name lookup (sent as the list'svpcIdfilter); in the result it is the observed VPC of the resolved group.
Read-Only
created_at(String) The timestamp when the security group was created.description(String) The description of the security group (at most 1024 characters — the limit the resource's own validators enforce), null when it has none.is_default(Boolean) Whether this is the default security group.tags(Map of String) The customer tags on the security group. Platform-reserved frostmoln_* keys are filtered, matching the resource read-back.tenant_id(String) The tenant ID that owns this security group.updated_at(String) The timestamp when the security group was last updated, null when the platform has not recorded one.