Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow MYSQL_5_5 for database_version #8689

Closed

Conversation

EvyBongers
Copy link
Contributor

Per the GCP documentation, MYSQL_5_5 is a valid value for source representation instance. As such, terraform-provider-google should support this as well.

This is particularly useful when migrating from a legacy instance (hosted elsewhere) to a Cloud SQL instance of a newer version.

@ghost ghost added the size/xs label Mar 15, 2021
@ghost ghost requested a review from rileykarson March 15, 2021 14:13
@EvyBongers
Copy link
Contributor Author

@rileykarson Can you give an estimate when you will be able to look at this? This is currently a blocking issue for us.

Copy link
Collaborator

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in getting to this! Can you make the change here: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb

Additionally, want to just remove the ValidateFunc altogether? These values change frequently enough, let's just stop checking.

Co-authored-by: Riley Karson <[email protected]>
@EvyBongers
Copy link
Contributor Author

EvyBongers commented Mar 21, 2021

Sorry for the delay in getting to this! Can you make the change here: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb

Sure! Should the list be updated here like in this PR, or should the validation be removed altogether, should that be the decision here?

Additionally, want to just remove the ValidateFunc altogether? These values change frequently enough, let's just stop checking.

Either would be fine for me, though I feel a descriptive error message is important. Should this validation be removed, what kind of error message would be returned to the user when the API doesn't support the value entered?

@EvyBongers
Copy link
Contributor Author

Sorry for the delay in getting to this! Can you make the change here: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/third_party/terraform/resources/resource_sql_database_instance.go.erb

Sure! Should the list be updated here like in this PR, or should the validation be removed altogether, should that be the decision here?

On second thought, this looks like it's applicable to the Cloud SQL instance, rather than the SQL source representation. Unless I'm mistaken, this should remain as is, as MySQL 5.5 is not supported by Cloud SQL.

@rileykarson
Copy link
Collaborator

Sorry! Wrong place on my part.

The change you'll want to make is here: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/products/sql/api.yaml#L702-L710

I think you can change it to the following to make an equivalent change:

      - !ruby/object:Api::Type::String
        name: 'databaseVersion'
        description: |
          The MySQL version running on your source database server. Possible values include the following `MYSQL_5_5`, `MYSQL_5_6`, `MYSQL_5_7`, and `MYSQL_8_0`.
        required: true

@EvyBongers
Copy link
Contributor Author

Hi @rileykarson,

Considering #8806, it seems this PR can be closed now?

@rileykarson
Copy link
Collaborator

Thanks! Yep

@ghost
Copy link

ghost commented May 1, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants