google_sql_user: Fixed import where host is an IPv4 CIDR #8028
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously it was not possible to import CloudSQL users for MySQL with
host
set to an IPv4 CIDR. The parsing ofID
failed ifhost
was a CIDR since it expected it to be on the form{project}/{instance}/{host}/{name}
and an error was returned if there where more than three slashes in theID
.With this fix if there are four slashes in the
ID
the third is considered part of thehost
argument.Acceptance test run:
Previously a import would fail with the message shown bellow. After the change this import succeeds with
host
set to10.0.0.0/24
.Derived from GoogleCloudPlatform/magic-modules#11523