hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.21k forks source link

Rename inconsistent resource/data source names #19999

Open YakDriver opened 3 years ago

YakDriver commented 3 years ago

Community Note

Description - TL;DR

The AWS Provider exists in service to AWS. Maintaining consistency with AWS in resource naming projects professionalism and clarity. Imagine a practitioner trying to find the part of the AWS Console, documentation, or CLI dedicated to the aws_cloudwatch_event_bus resource. Just from the resource name, they will be lost. This looks shoddy.

Service Name Rules

Resource names should align with the AWS CLI commands and Go SDK package names, with exceptions made for clarity and consistency:

Why?

  1. Professionalism and Clarity: Consistency in naming reflects professionalism and enhances clarity.
  2. Practitioner Considerations: We can implement changes without causing disruption by offering new resources alongside deprecated resources.
  3. Long-term Impact: By transitioning to correctly named resources, we prevent perpetuating naming issues in future developments.
  4. Maintaining Standards: Upholding consistency influences contributors to submit higher-quality work and sets positive examples for future contributions.
  5. Avoiding Inconsistencies: Providing clear naming conventions ensures contributors choose good examples, reducing the likelihood of inconsistent contributions.

New or Affected Resource(s)

Wrong Correct
aws_prometheus* aws_amp*
aws_api_gateway* aws_apigateway*
aws_appautoscaling* aws_applicationautoscaling*
aws_cloudcontrolapi* aws_cloudcontrol*
aws_cloudhsm_v2* aws_cloudhsmv2*
aws_cognito_identity* aws_cognitoidentity*
aws_cognito* aws_cognitoidp*
aws_codedeploy* aws_deploy*
aws_dx* aws_directconnect*
aws_directory_service* aws_ds*
(many) aws_ec2*
aws_elastic_beanstalk* aws_elasticbeanstalk*
(many) aws_elb*
(many) aws_elbv2*
aws_elasticsearch* aws_es*
aws_cloudwatch_event* aws_events*
aws_kinesis_firehose* aws_firehose*
aws_msk* aws_kafka*
aws_mskconnect* aws_kafkaconnect*
aws_kinesis_analytics* aws_kinesisanalytics*
awx_lex* aws_lexmodels*
aws_cloudwatch_log* aws_logs*
aws_media_convert* aws_mediaconvert*
aws_media_package* aws_mediapackage*
aws_media_store* aws_mediastore*
aws_resourcegroupstaggingapi* aws_resourcegroupstagging*
aws_simpledb* awssdb*
aws_serverlessapplicationrepository* aws_serverlessrepo*
aws_service_discovery* aws_servicediscovery*
aws_caller_identity aws_sts*

References

github-actions[bot] commented 1 year ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] commented 11 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

YakDriver commented 7 months ago

Let's prioritize aligning these resources, as it's essential to maintain a polished and consistent experience. Using an outdated name like aws_cloudwatch_event_bus doesn't just look shoddy—it can also lead to confusion for practitioners navigating AWS documentation and the console. By updating the resource name to match the current terminology used by AWS, we ensure clarity and professionalism across our infrastructure.

The approach used by other providers is to create a new resource with the correct name and deprecate the old resource with the wrong name. When the major version arrives, they dispatch the old resource.