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

Dev #784

Open
wants to merge 36 commits into
base: dev
Choose a base branch
from
Open

Dev #784

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
971b500
modify listener max health_timeout and health_interval
xiaozhu36 Nov 16, 2017
707eb26
Merge pull request #276 from xiaozhu36/slb
demonwy Nov 16, 2017
a6dd6d3
fix slb listener diff can be run when change listener health parameters
xiaozhu36 Nov 17, 2017
6c9d5c7
Merge branch 'dev' into slb
xiaozhu36 Nov 17, 2017
6bfaab6
Merge branch 'dev' into slb
xiaozhu36 Nov 17, 2017
6ac8b31
Merge pull request #278 from xiaozhu36/slb
demonwy Nov 17, 2017
a6bc4be
fix creating multiple route entry bug
xiaozhu36 Nov 30, 2017
3c79b9e
Merge branch 'dev' into entry
xiaozhu36 Nov 30, 2017
9bc7615
Merge branch 'dev' into entry
xiaozhu36 Nov 30, 2017
802ac5b
Merge pull request #286 from xiaozhu36/entry
demonwy Nov 30, 2017
88b8c65
fix slb listener diff can be run when change listener health parameters
xiaozhu36 Nov 17, 2017
71bb107
modify validators
xiaozhu36 Nov 24, 2017
787d0a1
fix conflict
xiaozhu36 Dec 6, 2017
8e1cb51
add new resource alicloud_slb_listener
xiaozhu36 Dec 6, 2017
7c4a535
Merge branch 'dev' into slb
xiaozhu36 Dec 6, 2017
3fc6601
Merge branch 'dev' into slb
xiaozhu36 Dec 6, 2017
5525754
Merge pull request #290 from xiaozhu36/slb
demonwy Dec 6, 2017
3d4c2ed
fix creating multiple route entry bug
xiaozhu36 Nov 30, 2017
30d78e0
fix slb attachment bug
xiaozhu36 Dec 7, 2017
90f0642
Merge branch 'dev' into slb
xiaozhu36 Dec 7, 2017
6a126e6
Merge branch 'dev' into slb
xiaozhu36 Dec 7, 2017
bac44b9
Merge pull request #296 from xiaozhu36/slb
demonwy Dec 7, 2017
5130694
match sdk changes
xiaozhu36 Dec 8, 2017
7dc18f2
Merge branch 'dev' into slb
xiaozhu36 Dec 8, 2017
b277602
Merge branch 'dev' into slb
xiaozhu36 Dec 8, 2017
f6b8edd
Merge pull request #300 from xiaozhu36/slb
demonwy Dec 8, 2017
290e852
fix compilation error (#302)
xiaozhu36 Dec 8, 2017
638014e
Merge branch 'master' into dev
xiaozhu36 Dec 8, 2017
ab320b7
fix ess attaching slb bug
xiaozhu36 Dec 13, 2017
8dc51fc
fix ess attaching slb bug
xiaozhu36 Dec 13, 2017
0c9edf0
fix conflict
xiaozhu36 Dec 13, 2017
a2bf96b
Merge pull request #308 from xiaozhu36/master
demonwy Dec 13, 2017
0639a0d
wait for SLB active before return back
xiaozhu36 Dec 13, 2017
a328517
Merge branch 'dev' into master
xiaozhu36 Dec 14, 2017
29905a4
Merge branch 'dev' into master
xiaozhu36 Dec 14, 2017
224abd7
Merge pull request #311 from xiaozhu36/master
demonwy Dec 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
## 1.6.0 (unreleased)

## 1.3.3 (December 14, 2017)

IMPROVMENTS:
* wait for SLB active before return back ([#310](https://github.com/alibaba/terraform-provider/pull/310))

## 1.3.2 (December 13, 2017)

IMPROVMENTS:
* deprecated ram_alias and add ram_account_alias ([#305](https://github.com/alibaba/terraform-provider/pull/305))
* deprecated dns_domain_groups and add dns_groups ([#305](https://github.com/alibaba/terraform-provider/pull/305))
* deprecated dns_domain_records and add dns_records ([#305](https://github.com/alibaba/terraform-provider/pull/305))
* add slb listener importing test ([#305](https://github.com/alibaba/terraform-provider/pull/305))

BUG FIXES:
* fix dns records bug ([#305](https://github.com/alibaba/terraform-provider/pull/305))
* fix ESS bind SLB failed bug ([#308](https://github.com/alibaba/terraform-provider/pull/308))
* fix security group not found bug ([#308](https://github.com/alibaba/terraform-provider/pull/308))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ terraform get
# set the creds
export ALICLOUD_ACCESS_KEY="***"
export ALICLOUD_SECRET_KEY="***"
export ALICLOUD_REGION="***"

# you're good to start rocking
# alicloud.tf contains the default example
Expand Down
7 changes: 5 additions & 2 deletions alicloud/resource_alicloud_security_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func resourceAliyunSecurityGroupRuleRead(d *schema.ResourceData, meta interface{

rule, err := client.DescribeSecurityGroupRule(sgId, direction, parts[2], parts[3], parts[4], parts[5], policy, priority)
if err != nil {
if IsExceptedError(err, InvalidSecurityGroupIdNotFound) {
if NotFoundError(err) || IsExceptedError(err, InvalidSecurityGroupIdNotFound) {
d.SetId("")
return nil
}
Expand Down Expand Up @@ -240,12 +240,15 @@ func resourceAliyunSecurityGroupRuleDelete(d *schema.ResourceData, meta interfac
err := deleteSecurityGroupRule(d, meta)

if err != nil {
if NotFoundError(err) || IsExceptedError(err, InvalidSecurityGroupIdNotFound) {
return nil
}
resource.RetryableError(fmt.Errorf("Security group rule in use - trying again while it is deleted."))
}

_, err = client.DescribeSecurityGroupRule(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], policy, priority)
if err != nil {
if IsExceptedError(err, InvalidSecurityGroupIdNotFound) {
if NotFoundError(err) || IsExceptedError(err, InvalidSecurityGroupIdNotFound) {
return nil
}
return resource.NonRetryableError(err)
Expand Down
8 changes: 6 additions & 2 deletions alicloud/resource_alicloud_slb.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,16 @@ func resourceAliyunSlbCreate(d *schema.ResourceData, meta interface{}) error {
if v, ok := d.GetOk("vswitch_id"); ok {
slbArgs.VSwitchId = v.(string)
}
slb, err := slbconn.CreateLoadBalancer(slbArgs)
lb, err := slbconn.CreateLoadBalancer(slbArgs)
if err != nil {
return err
}

d.SetId(slb.LoadBalancerId)
d.SetId(lb.LoadBalancerId)

if err := slbconn.WaitForLoadBalancerAsyn(lb.LoadBalancerId, slb.ActiveStatus, defaultTimeout); err != nil {
return fmt.Errorf("WaitForListener %s got error: %#v", slb.ActiveStatus, err)
}

return resourceAliyunSlbUpdate(d, meta)
}
Expand Down
36 changes: 0 additions & 36 deletions alicloud/resource_alicloud_slb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,42 +130,6 @@ func testAccCheckSlbExists(n string, slb *slb.LoadBalancerType) resource.TestChe
}
}

func testAccCheckListenersExists(n string, slb *slb.LoadBalancerType, p string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]
if !ok {
return fmt.Errorf("Not found: %s", n)
}

if rs.Primary.ID == "" {
return fmt.Errorf("No SLB ID is set")
}

client := testAccProvider.Meta().(*AliyunClient)
instance, err := client.DescribeLoadBalancerAttribute(rs.Primary.ID)

if err != nil {
return err
}
if instance == nil {
return fmt.Errorf("SLB not found")
}

exist := false
for _, listener := range instance.ListenerPortsAndProtocol.ListenerPortAndProtocol {
if listener.ListenerProtocol == p {
exist = true
break
}
}

if !exist {
return fmt.Errorf("The %s protocol Listener not found.", p)
}
return nil
}
}

func testAccCheckSlbDestroy(s *terraform.State) error {
client := testAccProvider.Meta().(*AliyunClient)

Expand Down