dtcloud_security_groups (Data Source)
Lists the security groups visible to the caller.
The list endpoint reports an id, a name and a description, and nothing else. Rules would be one more
call per group, so read a group with dtcloud_security_group when you need them.
Example Usage
data "dtcloud_security_groups" "all" {}
data "dtcloud_security_groups" "named_web" {
name = "web-tier"
}
Schema
Optional
name(String) Only return security groups with this exact name. Names are not unique, so this can still match several.
Read-Only
id(String) The ID of this resource.ids(List of String) Just the ids, for the common case of filling a VM interface'ssecurity_groups, which takes ids.security_groups(List of Object) The security groups that matched. (see below for nested schema)
Nested Schema for security_groups
Read-Only:
description(String)id(String)name(String)
Behaviour worth knowing
nameis applied by the provider, since the list route takes no query parameters, and it can still match several groups.idsfollows the order ofsecurity_groups. For one specific group, look it up with thedtcloud_security_groupdata source rather than indexing into the list.