Skip to content

Commit

Permalink
Create security groups with given resource group
Browse files Browse the repository at this point in the history
...much as we do elsewhere, if the configuration specifies a resource
group, honor it and use it to create security group.
  • Loading branch information
rsrchboy committed Jan 4, 2023
1 parent 90914b4 commit 21443e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builder/ibmcloud/vpc/step_create_sec_group_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ func (s *stepCreateSecurityGroupRules) Run(_ context.Context, state multistep.St
})
options.SetName(config.SecurityGroupName)

if config.ResourceGroupID != "" {
options.ResourceGroup = &vpcv1.ResourceGroupIdentityByID{
ID: &config.ResourceGroupID,
}
}

SecurityGroupData, err := client.createSecurityGroup(state, *options)
if err != nil {
err := fmt.Errorf("[ERROR] Error creating a Temp Security Group: %s", err)
Expand Down

0 comments on commit 21443e9

Please sign in to comment.