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

New vpc channel resource support #1273

Merged
merged 3 commits into from
Jul 14, 2021
Merged

New vpc channel resource support #1273

merged 3 commits into from
Jul 14, 2021

Conversation

Lance52259
Copy link
Collaborator

What this PR does / why we need it:
The API web backend and policy need vpc channel configuration.

Which issue this PR fixes:
reference #1249

Special notes for your reviewer:

Release note:

1. new vpc channel resoruce support.
2. new acc test for each parameters.
3. new document.

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

test for ECS member type

make testacc TEST='./huaweicloud/services/acceptance/apig' TESTARGS='-run=TestAccApigVpcChannelV2_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run=TestAccApigVpcChannelV2_basic -timeout 360m -parallel 4
=== RUN   TestAccApigVpcChannelV2_basic
=== PAUSE TestAccApigVpcChannelV2_basic
=== CONT  TestAccApigVpcChannelV2_basic
--- PASS: TestAccApigVpcChannelV2_basic (546.90s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig      547.017s

test for EIP member type

make testacc TEST='./huaweicloud/services/acceptance/apig' TESTARGS='-run=TestAccApigVpcChannelV2_withEipMembers'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run=TestAccApigVpcChannelV2_withEipMembers -timeout 360m -parallel 4
=== RUN   TestAccApigVpcChannelV2_withEipMembers
=== PAUSE TestAccApigVpcChannelV2_withEipMembers
=== CONT  TestAccApigVpcChannelV2_withEipMembers
--- PASS: TestAccApigVpcChannelV2_withEipMembers (540.80s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig540.868s

@Lance52259 Lance52259 changed the title feat: new vpc channel resource of APIG service New vpc channel resource support Jul 12, 2021
Comment on lines 209 to 212
ecsClient, err := config.ComputeV1Client(config.GetRegion(d))
if err != nil {
return result, fmtp.Errorf("Error creating HuaweiCloud ECS v1 client: %s", err)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggest to put those outside of the for loop.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


members {
id = huaweicloud_compute_instance.test.id
weight = 30
Copy link
Collaborator

Choose a reason for hiding this comment

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

format error

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adjusted


The following arguments are supported:

* `region` - (Optional, String, ForceNew) Specifies the region in which to create the APIG application resource.
Copy link
Collaborator

Choose a reason for hiding this comment

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

the description is wrong

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This description has been updated

}
}

resource "huaweicloud_compute_eip_associate" "test" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it necessary to associate the eip to an ecs instance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thx, this is unnecessary and has been removed

@ShiChangkuo ShiChangkuo merged commit a8b4b01 into huaweicloud:master Jul 14, 2021
@Lance52259 Lance52259 deleted the br_apig_vpc_channel_active branch July 15, 2021 11:13
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.

2 participants