Skip to content

fix(postgresql): [117252443] support params db_major_version create resource #2618

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

Merged
merged 9 commits into from
Jun 5, 2024

Conversation

SevenEarth
Copy link
Collaborator

add

@SevenEarth SevenEarth requested review from hellertang and andrew-tx May 6, 2024 08:00
@SevenEarth SevenEarth changed the title fix(postgresql): [] support params db_major_version create resource fix(postgresql): [117252443] support params db_major_version create resource May 6, 2024
@SevenEarth SevenEarth added the run check run check label May 6, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels May 6, 2024
Optional: true,
Default: "10.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里去掉 default 会有不兼容变更问题吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

如果用户engine_version和db_major_version都不填写 会在代码中手动设置engine_version:10.4

@@ -438,8 +442,8 @@ func resourceTencentCloudPostgresqlInstanceCreate(d *schema.ResourceData, meta i
return outErr
}

if specVersion == "" {
return fmt.Errorf(`The "engine_version" value: "%s" is invalid, Valid values are one of: "%s"`, dbVersion, strings.Join(allowVersion, `", "`))
if majorVersion == "" && specVersion == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

majorVersion 和 specVersion 参数必须传一个是吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

必须传一个或者都传入

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

majorVersion和specVersion参数主要对应的是客户传入的engine_version和db_major_version

@andrew-tx andrew-tx changed the title fix(postgresql): [117252443] support params db_major_version create resource [WIP]fix(postgresql): [117252443] support params db_major_version create resource May 10, 2024
@SevenEarth SevenEarth changed the title [WIP]fix(postgresql): [117252443] support params db_major_version create resource fix(postgresql): [117252443] support params db_major_version create resource May 11, 2024
@SevenEarth SevenEarth changed the title fix(postgresql): [117252443] support params db_major_version create resource [WIP]fix(postgresql): [117252443] support params db_major_version create resource May 11, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels Jun 5, 2024
@SevenEarth SevenEarth changed the title [WIP]fix(postgresql): [117252443] support params db_major_version create resource fix(postgresql): [117252443] support params db_major_version create resource Jun 5, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels Jun 5, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels Jun 5, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels Jun 5, 2024
Copy link
Collaborator

@andrew-tx andrew-tx left a comment

Choose a reason for hiding this comment

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

LGTM

@SevenEarth
Copy link
Collaborator Author

create:
image
import:
image
destroy:
image

Copy link
Collaborator

@andrew-tx andrew-tx left a comment

Choose a reason for hiding this comment

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

LGTM

@andrew-tx andrew-tx merged commit 0a13f3d into master Jun 5, 2024
8 of 9 checks passed
@andrew-tx andrew-tx deleted the fix/postgresql branch June 5, 2024 14:24
SevenEarth added a commit that referenced this pull request Jun 12, 2024
… resource (#2618)

* add

* add

* add

* add

* add

* add

* add

* add

* add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run check run check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants