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

testcase: Adds a new test case for resource alicloud_nat_gateway #4272

Merged
merged 1 commit into from
Jan 8, 2022

Conversation

thisnihonglei
Copy link
Contributor

No description provided.

@@ -518,7 +518,7 @@ func resourceAlicloudNatGatewayDelete(d *schema.ResourceData, meta interface{})
return nil
})
if err != nil {
if IsExpectedErrors(err, []string{"INSTANCE_NOT_EXISTS", "IncorrectStatus.NatGateway", "InvalidNatGatewayId.NotFound", "InvalidRegionId.NotFound"}) {
if IsExpectedErrors(err, []string{"Forbidden.PrePaidNatGateway", "INSTANCE_NOT_EXISTS", "IncorrectStatus.NatGateway", "InvalidNatGatewayId.NotFound", "InvalidRegionId.NotFound"}) {
Copy link
Member

Choose a reason for hiding this comment

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

这个错误码不要增加,按照标准的预付费的删除逻辑写

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已去掉

Copy link
Member

Choose a reason for hiding this comment

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

光去掉不行,delete API中要增加对预付费的处理

Copy link
Member

Choose a reason for hiding this comment

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

并且在文档中要有说明

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已改

@thisnihonglei thisnihonglei force-pushed the natgateway branch 3 times, most recently from 6d168b6 to 8dda5d3 Compare December 9, 2021 05:54
@thisnihonglei thisnihonglei changed the title resource/alicloud_nat_gateway: Add optional parameter verification testcase: Adds a new test case for resource alicloud_nat_gateway Dec 9, 2021
@thisnihonglei thisnihonglei force-pushed the natgateway branch 3 times, most recently from 9aea2d7 to 768cdae Compare December 30, 2021 02:03
@@ -18,7 +18,8 @@ If you want to add public IP, you can use resource 'alicloud_eip_association' to

-> **NOTE:** From version 1.7.1, this resource has deprecated bandwidth packages.
But, in order to manage stock bandwidth packages, version 1.13.0 re-support configuring 'bandwidth_packages'.


-> **NOTE:** `PrePaid` VPC NAT Gateway cannot be destroyed and provider will remove it from the state file.
Copy link
Member

Choose a reason for hiding this comment

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

这个写清楚,当 payment_type 是 Subscription 或者 instance_charge_type 是prepaid 的时候是这样

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已改

@@ -18,7 +18,8 @@ If you want to add public IP, you can use resource 'alicloud_eip_association' to

-> **NOTE:** From version 1.7.1, this resource has deprecated bandwidth packages.
But, in order to manage stock bandwidth packages, version 1.13.0 re-support configuring 'bandwidth_packages'.


-> **NOTE:** The value of this attribute `payment_type` is `Subscription` or `Prepaid`, the VPC NAT Gateway cannot be destroyed and provider will remove it from the state file.
Copy link
Member

Choose a reason for hiding this comment

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

改成如下的内容,并且把如下的内容放在 ## Attributes Reference 上方
“### Deleting alicloud_nat_gateway or removing it from your configuration

The alicloud_nat_gateway resource allows you to manage payment_type = "Subscription" or instance_charge_type = "Prepaid" nat gateway, but Terraform cannot destroy it.
Deleting the subscription resource or removing it from your configuration
will remove it from your statefile and management, but will not destroy the Nat Gateway.
You can resume managing the subscription nat gateway via the AlibabaCloud Console. “

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已改

@CLAassistant
Copy link

CLAassistant commented Jan 8, 2022

CLA assistant check
All committers have signed the CLA.

@xiaozhu36 xiaozhu36 merged commit b3d4d6a into aliyun:master Jan 8, 2022
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

3 participants