File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ func (s *VPCClusterScope) GetResourceGroupID() (string, error) {
275
275
// If the Resource Group is not defined in Spec, we generate the name based on the cluster name.
276
276
resourceGroupName := s .IBMVPCCluster .Spec .ResourceGroup
277
277
if resourceGroupName == "" {
278
- resourceGroupName = s .IBMVPCCluster . Name
278
+ resourceGroupName = s .Name ()
279
279
}
280
280
281
281
// Retrieve the Resource Group based on the name.
@@ -486,7 +486,9 @@ func (s *VPCClusterScope) createVPC() (*vpcv1.VPC, error) {
486
486
} else if vpcDetails == nil {
487
487
return nil , fmt .Errorf ("no vpc details after creation" )
488
488
}
489
- if err = s .TagResource (s .IBMVPCCluster .Name , * vpcDetails .CRN ); err != nil {
489
+
490
+ // NOTE: This tagging is only attempted once. We may wish to refactor in case this single attempt fails.
491
+ if err = s .TagResource (s .Name (), * vpcDetails .CRN ); err != nil {
490
492
return nil , fmt .Errorf ("error tagging vpc: %w" , err )
491
493
}
492
494
You can’t perform that action at this time.
0 commit comments