From cad3978e6ae0a64ba052d1bbb96ab61111f60e67 Mon Sep 17 00:00:00 2001 From: Rickard von Essen Date: Wed, 26 Jul 2017 21:11:01 +0200 Subject: [PATCH] cloudstack: Updated after review --- builder/cloudstack/step_create_security_group.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builder/cloudstack/step_create_security_group.go b/builder/cloudstack/step_create_security_group.go index 4bab0d4c7..1bf23100b 100644 --- a/builder/cloudstack/step_create_security_group.go +++ b/builder/cloudstack/step_create_security_group.go @@ -51,13 +51,13 @@ func (s *stepCreateSecurityGroup) Run(state multistep.StateBag) multistep.StepAc // Create Ingress rule i := client.SecurityGroup.NewAuthorizeSecurityGroupIngressParams() i.SetCidrlist(config.CIDRList) - if config.Project != "" { - i.SetProjectid(config.Project) - } i.SetProtocol("TCP") i.SetSecuritygroupid(sg.Id) i.SetStartport(config.Comm.Port()) i.SetEndport(config.Comm.Port()) + if config.Project != "" { + i.SetProjectid(config.Project) + } _, err = client.SecurityGroup.AuthorizeSecurityGroupIngress(i) if err != nil {