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

resource/alicloud_ga_accelerator: Added the time limit of the field duration. #4426

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

Wanghx0991
Copy link
Contributor

No description provided.

@@ -105,3 +115,329 @@ var AlicloudGaAcceleratorMap = map[string]string{
func AlicloudGaAcceleratorBasicDependence(name string) string {
return ""
}

func TestAccAlicloudGaAccelerator_unit(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

96.8%

request["Duration"] = duration
} else if duration > 9 && duration <= 36 {
request["PricingCycle"] = "Year"
request["Duration"] = duration / 12
Copy link
Member

Choose a reason for hiding this comment

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

直接把 PricingCycle 暴露出来吧

Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"Month", "Year"}, false),
},
Copy link
Member

Choose a reason for hiding this comment

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

这个属于非兼容变更,改成 optional,然后在代码中设置一个默认值 Month,这个设置为 Computed

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

Successfully merging this pull request may close these issues.

None yet

2 participants