Skip to content

Commit

Permalink
Merge pull request #9347 from terraform-providers/d-contributing-reso…
Browse files Browse the repository at this point in the history
…urce-naming

docs/provider: Clarify Resource Naming guidelines in Contributing Guide
  • Loading branch information
bflad authored Jul 16, 2019
2 parents 7ef3f74 + 03b4382 commit 551251e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,22 @@ guidelines.
covering their behavior. See [Writing Acceptance
Tests](#writing-acceptance-tests) below for a detailed guide on how to
approach these.
- [ ] __Naming__: Resources should be named `aws_<service>_<name>` where
`service` is the AWS short service name and `name` is a short, preferably
single word, description of the resource. Use `_` as a separator.
- [ ] __Resource Naming__: Resources should be named `aws_<service>_<name>`,
using underscores (`_`) as the separator. Resources are namespaced with the
service name to allow easier searching of related resources, to align
the resource naming with the service for [Customizing Endpoints](https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html#available-endpoint-customizations),
and to prevent future conflicts with new AWS services/resources.
For reference:

- `service` is the AWS short service name that matches the entry in
`endpointServiceNames` (created via the [New Service](#new-service)
section)
- `name` represents the conceptual infrastructure represented by the
create, read, update, and delete methods of the service API. It should
be a singular noun. For example, in an API that has methods such as
`CreateThing`, `DeleteThing`, `DescribeThing`, and `ModifyThing` the name
of the resource would end in `_thing`.

- [ ] __Arguments_and_Attributes__: The HCL for arguments and attributes should
mimic the types and structs presented by the AWS API. API arguments should be
converted from `CamelCase` to `camel_case`.
Expand Down

0 comments on commit 551251e

Please sign in to comment.