terraform-google-modules / terraform-docs-samples

Terraform samples intended for inclusion in cloud.google.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: Request for Clean for Cloud SQL folder samples

msampathkumar opened this issue · comments

TL;DR

feat: Request for Clean for Cloud SQL folder samples

This is clean up is not related to modification of code but related to re-organising of some cloud sql samples locations and their folders.

The following is the list of samples need these clean up

  1. cloud_sql/database_basic/main.tf
  2. cloud_sql/database_instance_my_sql/main.tf
  3. cloud_sql/database_instance_postgres/main.tf
  4. cloud_sql/database_instance_sqlserver/main.tf
  5. cloud_sql/instance_cmek/main.tf
  6. cloud_sql/instance_ha/main.tf
  7. cloud_sql/instance_iam_condition/main.tf
  8. cloud_sql/instance_labels/main.tf
  9. cloud_sql/instance_pitr/main.tf
  10. cloud_sql/instance_ssl_cert/main.tf

Clean up tasks (What to do?)

Common issues

  1. Unlike the other samples in cloud_sql, these folder don't have prefixes like mysql, postgres_ & sqlserver_
  2. Many of these samples like instance_*/main.tf, have snippet mysql, postgres_ & sqlserver_. Such file should be split up into multiple files.

Example instance_ha should be split into mysql_instance_ha, postgres_instance_ha & sqlserver_instance_ha

The following require folder rename change

  1. database_instance_my_sql to mysql_database_instance
  2. database_instance_postgres to postgres_database_instance
  3. database_instance_sqlserver to sqlserver_database_instance

Why

As a user when I open cloudsql folder, I find the samples related to mysql db, have a prefix of mysql. This is easy to spot and use, but folders that being with instance and database does not provide this benefit.

Terraform Resources

No response

Detailed design

No response

Additional information

No response

Update: PR for re-organising the content is completed by @betsy-lichtenberg at #443

After updating Google Cloud docs, the pending cleanup will be completed!

Update: Mostly completed. A few minor cleanup tasks are on-going now.

PR is completed! Marking this as closed for now.