From debf88f57d33f4f03492d8898017e1e91a617eee Mon Sep 17 00:00:00 2001 From: Letha Date: Mon, 13 Nov 2023 11:33:06 -0800 Subject: [PATCH] Doc improvements S through V (#2567) --- providers/slack/resources/slack.lr | 87 +++++++++++----------- providers/terraform/resources/terraform.lr | 81 ++++++++++---------- providers/vcd/resources/vcd.lr | 72 +++++++++--------- providers/vsphere/resources/vsphere.lr | 32 ++++---- 4 files changed, 137 insertions(+), 135 deletions(-) diff --git a/providers/slack/resources/slack.lr b/providers/slack/resources/slack.lr index f4a8d2ebf5..07467cc3b3 100644 --- a/providers/slack/resources/slack.lr +++ b/providers/slack/resources/slack.lr @@ -6,7 +6,7 @@ option go_package = "go.mondoo.com/cnquery/v9/providers/slack/resources" // Slack slack { - // Slack Access Logs + // Slack access logs accessLogs() []slack.login // List of Slack user groups userGroups() []slack.userGroup @@ -14,7 +14,7 @@ slack { conversations() []slack.conversation } -// Slack Team +// Slack team slack.team @defaults("id domain") { // ID of the team id string @@ -26,30 +26,30 @@ slack.team @defaults("id domain") { emailDomain string } - // Slack Users + // Slack users slack.users { []slack.user - // Filter bot users + // Bot users bots() []slack.user - // Filter members of workspace + // Members of the workspace members() []slack.user - // Filter admins of workspace + // Admins of the workspace admins() []slack.user - // Filter owner of workspace + // Owner of the workspace owners() []slack.user } -// Slack User +// Slack user slack.user @defaults("id name") { - // Identifier for workspace user + // ID of the workspace user id string // User name name string // Slack workspace ID teamId string - // Indicates if the user has been deactivated + // Whether the user has been deactivated deleted bool - // Special username color. + // Special user color color string // User's first and last name realName string @@ -59,28 +59,29 @@ slack.user @defaults("id name") { timeZoneLabel string // Number of seconds to offset UTC time timeZoneOffset int - // Indicates whether the user is actually a bot user + // Whether the user is a bot isBot bool - // Indicates whether the user is an Admin of the current workspace + // Whether the user is an admin of the current workspace isAdmin bool - // Indicates whether the user is an Owner of the current workspace + // Whether the user is an owner of the current workspace isOwner bool - // Indicates whether the user is the Primary Owner of the current workspace + // Whether the user is the primary owner of the current workspace isPrimaryOwner bool - // Indicates whether or not the user is a guest user + // Whether the user is a guest user isRestricted bool - // Indicates whether or not the user is a single-channel guest + // Whether the user is a single-channel guest isUltraRestricted bool - // Indicates if the user belongs to a different workspace + // Whether the user belongs to a different workspace isStranger bool + // Whether the user is an app bot isAppUser bool - // Indicates whether a user has been invited but has not yet signed in + // Whether a user has been invited but has not yet signed in isInvitedUser bool - // Indicates whether two-factor authentication is enabled for this user + // Whether two-factor authentication is enabled for the user has2FA bool - // Indicates the type of two-factor authentication in use + // Type of two-factor authentication the user is using twoFactorType string - // Indicates whether the user own files + // Whether the user owns files hasFiles bool // Presence of the user presence string @@ -88,11 +89,11 @@ slack.user @defaults("id name") { locale string // User profile profile dict - // related Slack Enterprise Grid user + // Related Slack Enterprise Grid user enterpriseUser slack.enterpriseUser } -// Slack Enterprise Grid User +// Slack Enterprise Grid user slack.enterpriseUser { // Enterprise user ID id string @@ -100,13 +101,13 @@ slack.enterpriseUser { enterpriseId string // Name for the Enterprise Grid organization. enterpriseName string - // Indicates whether the user is an Admin of the Enterprise Grid organization + // Whether the user is an admin of the Enterprise Grid organization isAdmin bool - // Indicates whether the user is an Owner of the Enterprise Grid organization + // Whether the user is an owner of the Enterprise Grid organization isOwner bool } -// Slack User Groups +// Slack user groups slack.userGroup @defaults("handle") { // Group ID id string @@ -118,7 +119,7 @@ slack.userGroup @defaults("handle") { description string // Value used to notify group members handle string - // Indicates whether the group is external + // Whether the group is external isExternal bool // Timestamp when the group was created created time @@ -152,9 +153,9 @@ slack.login @defaults("userID") { userAgent string // Best guess at the internet service provider isp string - // Best guesses on where the access originated, based on the IP address + // Best guesses at where the access originated, based on the IP address country string - // Best guesses on where the access originated, based on the IP address + // Best guesses at where the access originated, based on the IP address region string // First access log entry for user, IP address, and user agent combination dateFirst time @@ -162,15 +163,15 @@ slack.login @defaults("userID") { dateLast time } -// Slack Conversation +// Slack conversation slack.conversation @defaults("id name") { // Conversation ID id string - // Name of the channel-like thing + // Name of the conversation name string - // User the member that created this conversation + // User that created this conversation creator slack.user - // Timestamp of when the conversation was + // Timestamp of when the conversation was created created time // IETF language code that represents chosen language locale string @@ -182,23 +183,23 @@ slack.conversation @defaults("id name") { isArchived bool // Indicates that the conversation is open isOpen bool - // Conversation is privileged between two or more members + // Whether the conversation is privileged between two or more members isPrivate bool - // Indicates whether this is a direct message + // Whether the conversation is a direct message isIM bool - // Indicates whether this private conversation between multiple users + // Whether the conversation is private between multiple users isMpim bool - // Indicates a private channel created before March 2021 + // WHether the conversation is a private channel created before March 2021 isGroup bool - // Indicates whether a conversation is a channel + // Whether a conversation is a channel isChannel bool - // Indicates whether conversation is in some way shared between multiple workspaces + // Whether the conversation is in some way shared between multiple workspaces isShared bool - // Indicates whether a conversation is part of a Shared Channel with a remote organization + // Whether the conversation is part of a shared channel with a remote organization isExtShared bool - // Indicates whether a conversation is going to be shared with a remote organization + // Whether the conversation is to be shared with a remote organization isPendingExtShared bool - // Indicates whether this shared channel is shared between Enterprise Grid workspaces + // Whether the channel is shared between Enterprise Grid workspaces isOrgShared bool // Priority of the conversation priority float diff --git a/providers/terraform/resources/terraform.lr b/providers/terraform/resources/terraform.lr index 2a21722be0..ebd8a663f1 100644 --- a/providers/terraform/resources/terraform.lr +++ b/providers/terraform/resources/terraform.lr @@ -4,13 +4,13 @@ option provider = "go.mondoo.com/cnquery/v9/providers/terraform" option go_package = "go.mondoo.com/cnquery/v9/providers/terraform/resources" -// Terraform Configuration Files +// Terraform configuration files terraform { // Access to individual files including .tf and .tf.json files files() []terraform.file // The attributes defined in .tfvars and .tfvars.json tfvars() dict - // List all referenced terraform modules + // All referenced Terraform modules modules() []terraform.module // Raw HCL blocks blocks() []terraform.block @@ -18,7 +18,7 @@ terraform { providers() []terraform.block // Data sources blocks datasources() []terraform.block - // All blocks with type resource + // All blocks with the type resource resources() []terraform.block // Variable blocks variables() []terraform.block @@ -26,75 +26,76 @@ terraform { outputs() []terraform.block } -// Terraform Configuration File represents a .tf or .tf.json file +// Terraform configuration file (.tf or .tf.json file) terraform.file { - // tf or tf.json file + // Terraform (.tf or tf.json file) path string // All blocks within the file blocks() []terraform.block } -// Position of the Terraform configuration block in file +// Position of the Terraform configuration block in the file terraform.fileposition { - // File path to Terraform configuration file + // File path to the Terraform configuration file path string // Line of the block line int - // Column of the Block + // Column of the block column int + // Size of the file byte int } -// Terraform Resource Block +// Terraform resource block terraform.block @defaults("type labels") { // Block type type string // Block Labels labels []string - // Block Name Label + // Block name label nameLabel() string - // Block Start Position + // Block start position start terraform.fileposition - // Block End Position + // Block end position end terraform.fileposition - // Block Arguments + // Block arguments arguments() dict - // Raw Block Attributes + // Raw block attributes attributes() dict - // Child Blocks + // Child blocks blocks() []terraform.block // Related blocks related() []terraform.block - // Block Snippet + // Block snippet snippet string } -// Terraform Module Block +// Terraform module block terraform.module @defaults("key") { - // Unique identifier for this particular module + // Unique identifier for the module key string - // Source indicates where the modules was loaded from + // Source from which the module was loaded source string - // Module Version + // Module version version string // Path to the directory where the module is stored dir string - // returns the block including the configuration + // Block (including the configuration) block() terraform.block } -// Terraform Settings +// Terraform settings terraform.settings { - // Settings Block + // Settings block block terraform.block - // Provider Requirements + // Provider requirements requiredProviders dict // Backend configuration backend dict } -// Terraform State +// Terraform state terraform.state { // Terraform state format version formatVersion string @@ -110,12 +111,12 @@ terraform.state { resources() []terraform.state.resource } -// Terraform State Output Values +// Terraform state output values terraform.state.output { init(identifier string) // Output identifier identifier string - // Flag that indicates if the output is sensitive + // Whether the output is sensitive sensitive bool // Output value value() dict @@ -123,22 +124,22 @@ terraform.state.output { type() dict } -// Terraform State Module +// Terraform state module terraform.state.module @defaults("address") { init(identifier string) // Module identifier address address string // Resources that describe infrastructure objects resources() []terraform.state.resource - // Child Modules that are being called from this module + // Child modules called from this module childModules() []terraform.state.module } -// Terraform State Resource +// Terraform state resource terraform.state.resource @defaults("name") { // Address is the absolute resource address address string - // Mode can be "managed" or "data" + // Mode: managed or data mode string // Resource type type string @@ -146,19 +147,19 @@ terraform.state.resource @defaults("name") { name string // Terraform provider providerName string - // SchemaVersion indicates which version of the resource type schema the "values" property conforms to. + // Which version of the resource type schema the `values` property conforms to schemaVersion int // Attribute values values dict - // DependsOn contains a list of the resource's dependencies. + // List of the resource's dependencies dependsOn []string - // Tainted is true if the resource is tainted in terraform state. + // Whether the resource is tainted in the Terraform state tainted bool - // Deposed is set if the resource is deposed in terraform state. + // Whether the resource is deposed in the Terraform state deposedKey string } -// Terraform Plan +// Terraform plan terraform.plan { // Terraform plan format version formatVersion string @@ -176,7 +177,7 @@ terraform.plan.configuration { resources() []dict } -// Terraform Plan Resource Change +// Terraform plan resource change terraform.plan.resourceChange @defaults("type name") { // Resource address address string @@ -192,15 +193,15 @@ terraform.plan.resourceChange @defaults("type name") { name string // Provider name providerName string - // Indicates that this action applies to a "deposed" object + // Whether the action applies to a deposed object deposed string - // Change that will be made to this object + // Change to make to this object change terraform.plan.proposedChange // Resource action reason actionReason string } -// Terraform Plan Proposed Change +// Terraform plan proposed change terraform.plan.proposedChange @defaults("actions after") { // Resource address address string diff --git a/providers/vcd/resources/vcd.lr b/providers/vcd/resources/vcd.lr index 55c1ad0c53..467ad55c9d 100644 --- a/providers/vcd/resources/vcd.lr +++ b/providers/vcd/resources/vcd.lr @@ -26,7 +26,7 @@ vcd.organization @defaults("name") { name string // Organization full name fullName string - // Indicates if this organization is enabled + // Whether this organization is enabled isEnabled bool // Organization description description string @@ -34,7 +34,7 @@ vcd.organization @defaults("name") { vms() []vcd.vm // Rights rights() []vcd.right - // Virtual Data Centers (VDCs) + // Virtual data centers (VDCs) vdcs() []vcd.vdc // VDC groups vdcGroups() []vcd.vdcGroup @@ -46,13 +46,13 @@ vcd.organization @defaults("name") { ldapConfiguration() vcd.organization.ldapSettings } -// VMware Cloud Director LDAP Setting resource +// VMware Cloud Director LDAP setting vcd.organization.ldapSettings { // URI of the entity id string - // LDAP attribute=value pair to use for OU (organizational unit) + // LDAP attribute-value pair to use for the OU (organizational unit) customUsersOu string - // Indicates if this organization is connected to an LDAP service + // Whether the organization is connected to an LDAP service orgLdapMode string // Hostname of the LDAP server hostname string @@ -62,17 +62,17 @@ vcd.organization.ldapSettings { realm string } -// VMware Cloud Director Provider VDC +// VMware Cloud Director provider VDC private vcd.vdcProvider @defaults("name") { // Name of the provider VDC name string // Status of the provider VDC status string - // Indicates if this provider VDC is busy + // Whether the provider VDC is busy isBusy bool - // Indicates if this provider VDC is deleted + // Whether the provider VDC is deleted isDeleted bool - // Indicates if this provider VDC is enabled + // Whether the provider VDC is enabled isEnabled bool // CPU allocation in MHz cpuAllocationMhz int @@ -104,23 +104,23 @@ private vcd.vdcProvider @defaults("name") { storageOverheadMB int // Memory overhead in MB memoryOverheadMB int - // Key and value pairs for provider VDC metadata + // Key-value pairs for provider VDC metadata metadata() map[string]string } -// VMware Cloud Director Network Pools +// VMware Cloud Director network pools vcd.networkPool { // Network pool name name string - // Indicates if this network pool is busy + // Whether the network pool is busy isBusy bool // Type of network pool (0=Vlan backed network pool; 1=vNI backed network pool;2=Portgroup backed network pool) networkPoolType int } -// VMware Cloud Director External Network +// VMware Cloud Director external network private vcd.externalNetwork @defaults("name") { - // URN of the network. Deprecated: Please use the urn field instead. + // Deprecated; use urn instead id string // Unique name for the network name string @@ -146,7 +146,7 @@ private vcd.vm @defaults("name") { ownerId string // Owner name of the VM ownerName string - // Indicates if this entity is deleted + // Whether the entity is deleted isDeleted bool // Guest operating system guestOs string @@ -160,11 +160,11 @@ private vcd.vm @defaults("name") { networkName string // IP Address of the VM on the primary network ipAddress string - // Indicates if this VM is busty + // Whether the VM is busy isBusy bool - // Indicates if this VM is deployed + // Whether the VM is deployed isDeployed bool - // Indicates if this VM is in a published catalog + // Whether the VM is in a published catalog isPublished bool // Catalog name catalogName string @@ -172,21 +172,21 @@ private vcd.vm @defaults("name") { hardwareVersion int // VM tools status vmToolsStatus string - // Indicates if this VM is in maintenance mode + // Whether the VM is in maintenance mode isInMaintenanceMode bool - // Indicates if the parent vApp is a managed vApp + // Whether the parent vApp is a managed vApp isAutoNature bool // Storage profile name storageProfileName string // GC status of this VM gcStatus string - // Indicates if VM is compliant with the Compute Policy + // Whether the VM is compliant with the compute policy isComputePolicyCompliant bool - // Indicates if VM is encrypted + // Whether the VM is encrypted encrypted bool // Total storage allocation in MB totalStorageAllocatedMb int - // Indicates if VMs storage lease has expired + // Whether the VM's storage lease has expired isExpired bool // ESXi host for this VM hostName string @@ -208,7 +208,7 @@ vcd.serverInstance { status string // User name to connect to the server userName string - // Version of the vCenter server. + // Version of the vCenter server vcVersion string // Instance UUID of the vCenter server uuid string @@ -216,7 +216,7 @@ vcd.serverInstance { vsmIP string } -// VMware Cloud Director Available Rights +// VMware Cloud Director available rights vcd.right { // Right ID id string @@ -234,21 +234,21 @@ vcd.right { rightType string } -// VMware Cloud Director Role +// VMware Cloud Director role vcd.role @defaults("name") { - // ID of role + // ID of the role id string - // Name of role + // Name of the role name string // Optional description description string } -// VMware Cloud Director Organization VDC resource +// VMware Cloud Director organization VDC resource vcd.vdc { - // ID of VDC + // ID of the VDC id string - // Name of VDC + // Name of the VDC name string // Creation status of the VDC (0=creating, 1=ready, -1=error) status int @@ -260,9 +260,9 @@ vcd.vdc { nicQuota int // Maximum number of network objects allowed (0=unlimited) networkQuota int - // Number of networks in use for/by this VDC. + // Number of networks in use for/by this VDC usedNetworkCount int - // The quota of VMs that can be created in this VDC + // Quota of VMs that can be created in this VDC vmQuota int // Indicates if VDC is enabled for use isEnabled bool @@ -274,14 +274,14 @@ vcd.vdcGroup { name string // Description of the VDC group description string - // Indicates if local egress is enabled for a universal router belonging to a universal VDC group + // Whether local egress is enabled for a universal router belonging to a universal VDC group localEgress bool // Status of the VDC group status string // VDC group type (LOCAL or UNIVERSAL) type string - // Indicates if a VDC group router has been created + // Whether a VDC group router has been created universalNetworkingEnabled bool - // Indicates if distributed firewall is enabled for this VDC group + // Whether distributed firewall is enabled for the VDC group dfwEnabled bool } diff --git a/providers/vsphere/resources/vsphere.lr b/providers/vsphere/resources/vsphere.lr index 4d2d2e28be..b1700f227e 100644 --- a/providers/vsphere/resources/vsphere.lr +++ b/providers/vsphere/resources/vsphere.lr @@ -38,9 +38,9 @@ private vsphere.license @defaults("name") { // VMware ESXi resource esxi { - // Current Targeted ESXi Host + // Current targeted ESXi host host() vsphere.host - // Current Targeted Virtual Machine + // Current targeted virtual machine vm() vsphere.vm } @@ -52,11 +52,11 @@ private vsphere.datacenter @defaults("moid name") { name string // vSphere inventory path inventoryPath string - // Hosts in datacenter + // Hosts in the datacenter hosts() []vsphere.host - // VMs in datacenter + // VMs in the datacenter vms() []vsphere.vm - // Clusters in datacenter + // Clusters in the datacenter clusters() []vsphere.cluster } @@ -70,7 +70,7 @@ private vsphere.cluster @defaults("moid name") { inventoryPath string // Cluster properties properties dict - // ESXi hosts running in cluster + // ESXi hosts running in the cluster hosts() []vsphere.host } @@ -78,21 +78,21 @@ private vsphere.cluster @defaults("moid name") { private vsphere.host @defaults("moid name") { // vSphere managed object ID moid string - // vSphere Resource Name + // vSphere resource name name string // vSphere inventory path inventoryPath string // ESXi properties properties dict - // Lists of standard virtual switches + // Standard virtual switches standardSwitch() []vsphere.vswitch.standard - // Lists of distributed virtual switches + // Distributed virtual switches distributedSwitch() []vsphere.vswitch.dvs - // Lists physical NICs currently installed and loaded on the system + // Physical NICs currently installed and loaded on the system adapters() []vsphere.vmnic - // Lists of virtual network interface that is used by the VMKernel + // Virtual network interface that is used by the VMKernel vmknics() []vsphere.vmknic - // Lists all VIBs installed on your ESXi host + // All VIBs installed on your ESXi host packages() []esxi.vib // Host-level VIB acceptance level acceptanceLevel() string @@ -183,7 +183,7 @@ esxi.command { inventoryPath string // Raw command command string - // Command Result + // Command result result() []dict } @@ -239,11 +239,11 @@ private esxi.service @defaults("key label") { label string // Flag indicating whether the service is required and cannot be disabled required bool - // Deprecated: This flag is unimplemented and will always be set to false + // Deprecated; always set to false uninstallable bool // Flag indicating whether the service is currently running running bool - // List of firewall rulesets used by this service + // Firewall rulesets used by this service ruleset []string // Service activation policy policy string @@ -253,7 +253,7 @@ private esxi.service @defaults("key label") { private esxi.timezone @defaults("key name") { // Identifier for the time zone key string - // Time zone name. + // Time zone name name string // Description of the time zone description string