Back to Terraform Provider Aws

Caps List

names/caps.md

6.43.05.5 KB
Original Source

Caps List

<!-- Copyright IBM Corp. 2014, 2026 --> <!-- SPDX-License-Identifier: MPL-2.0 --> <!-- # Generated by internal/generate/namescapslist/main.go; DO NOT EDIT. -->

In Terraform AWS Provider code, we have two guiding principles for capitalization in function, constant, and variable names:

  1. We use Go-idiomatic MixedCaps, with idiomatic treatment of initialisms.
  2. We follow AWS's preferred capitalization for service names (e.g., "SageMaker" rather than "Sagemaker").

For principle 1, the golang/go Go Code Review Comments are instructive:

Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". As an example: ServeHTTP not ServeHttp. For identifiers with multiple initialized "words", use for example "xmlHTTPRequest" or "XMLHTTPRequest".

This rule also applies to "ID" when it is short for "identifier" (which is pretty much all cases when it's not the "id" as in "ego", "superego"), so write "appID" instead of "appId".

For principle 2, take a look at the AWS website for a service to see the capitalization that AWS prefers. For example, GameLift rather than "Gamelift".

To help enforce these principles, we are using semgrep rules. Below, you will find a list of the specific caps cases we look for currently. This list is generated from the same source as the semgrep rules.

NOTE: Please do NOT add "Id" to the list. Use "ID" or "id", never "Id", but we have found linter enforcement of this initialism to be too error prone because of the number of false positives for "Id" (e.g., "Identifier").

NOTE: Capitalization rules are all found in the ".semgrep-caps-aws-ec2.yml" configuration file are named <Test#>-in-func-name, <Test#>-in-var-name, or <Test#>-in-const-name, where Test# comes from the table below.

NOTE: The Test# order is wonky because we need to match on longer names first. In the future, with an option to automatically correct problems, fixing the longest possible initialism first is important (e.g., HTTPS needs to be fixed before HTTP to avoid something like HTTPs).

The caps enforced are as follows:

WrongRightTest#
AclACLcaps1
AcmACMcaps1
AcmPcaACMPCAcaps0
AcmpcaACMPCAcaps0
AmiAMIcaps1
ApiAPIcaps1
ApiGatewayAPIGatewaycaps0
AppconfigAppConfigcaps0
AppmeshAppMeshcaps0
AppsyncAppSynccaps0
ArnARNcaps1
AsgASGcaps2
AsnASNcaps2
AutoscalingAutoScalingcaps0
BgpBGPcaps2
ByoipBYOIPcaps0
CidrCIDRcaps1
CloudformationCloudFormationcaps0
CloudfrontCloudFrontcaps0
CloudwatchCloudWatchcaps0
CmkCMKcaps2
CnameCNAMEcaps0
CoipCoIPcaps1
CpuCPUcaps2
CssCSScaps2
CsvCSVcaps2
DaxDAXcaps2
DbDBcaps3
DhcpDHCPcaps1
DkimDKIMcaps1
DlmDLMcaps2
DmsDMScaps2
DnsDNScaps2
DnssecDNSSECcaps0
DocDbDocDBcaps0
DocdbDocDBcaps0
DynamoDbDynamoDBcaps0
DynamodbDynamoDBcaps0
EbsEBScaps2
Ec2EC2caps2
EcmpECMPcaps1
EcrECRcaps2
EcsECScaps2
EfsEFScaps2
EipEIPcaps2
EksEKScaps2
ElasticacheElastiCachecaps0
ElasticSearchElasticsearchcaps0
ElbELBcaps2
EmrEMRcaps2
FifoFIFOcaps1
FmsFMScaps2
FqdnsFQDNScaps0
FSXFSxcaps2
FsxFSxcaps2
GameliftGameLiftcaps0
GcmGCMcaps2
Gp2GP2caps2
Gp3GP3caps2
GraphqlGraphQLcaps0
GrpcGRPCcaps1
GuarddutyGuardDutycaps0
HaproxyHAProxycaps0
HsmHSMcaps2
HttpHTTPcaps1
HttpsHTTPScaps0
HvmHVMcaps2
IamIAMcaps2
IotIoTcaps2
IpIPcaps3
IpamIPAMcaps1
IpsetIPSetcaps1
IscsiiSCSIcaps1
JdbcJDBCcaps1
JsonJSONcaps1
KmsKMScaps2
MfaMFAcaps3
MskMSKcaps3
MwaaMWAAcaps1
MysqlMySQLcaps1
NfsNFScaps3
OauthOAuthcaps1
OidcOIDCcaps1
OpsworksOpsWorkscaps0
PhpPHPcaps3
PitrPITRcaps1
PosixPOSIXcaps1
PrecheckPreCheckcaps0
QldbQLDBcaps1
RabbitmqRabbitMQcaps0
RdsRDScaps3
RfcRFCcaps3
SagemakerSageMakercaps0
SaslSASLcaps1
SdkSDKcaps3
SfnSFNcaps3
SmbSMBcaps3
SmsSMScaps3
SmtpSMTPcaps1
SnsSNScaps3
SqlSQLcaps3
SqsSQScaps3
SshSSHcaps3
SslSSLcaps3
SsmSSMcaps3
SsoSSOcaps3
StsSTScaps3
SwfSWFcaps3
TcpTCPcaps3
TlsTLScaps3
TtlTTLcaps3
UriURIcaps3
UrlURLcaps3
VgwVGWcaps3
VoipVoIPcaps1
VpcVPCcaps3
VpnVPNcaps3
WafWAFcaps3
Wafv2WAFV2caps1
WorklinkWorkLinkcaps0
WorkspacesWorkSpacescaps0
XrayXRaycaps1
XssXSScaps3
YamlYAMLcaps1