func (r *ResourceGroup) Actual(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error) {
	logger.Debug("resourcegroup.Actual")
	newResource := &ResourceGroup{
		Shared: Shared{
			Name:       r.Name,
			Tags:       r.Tags,
			Identifier: immutable.ProviderConfig().GroupIdentifier,
		},
		Location: r.Location,
	}

	if r.Identifier != "" {
		group, err := Sdk.ResourceGroup.Get(immutable.Name)
		if err != nil {
			return nil, nil, err
		}
		newResource.Location = *group.Location
		newResource.Name = *group.Name
		newResource.Identifier = *group.ID
	}

	newCluster := r.immutableRender(newResource, immutable)
	return newCluster, newResource, nil
}
func (r *ResourceGroup) Actual(immutable *cluster.Cluster) (*cluster.Cluster, cloud.Resource, error) {
	logger.Debug("resourcegroup.Actual")
	newResource := &ResourceGroup{
		Shared: Shared{
			Name:       r.Name,
			Tags:       r.Tags,
			Identifier: immutable.ProviderConfig().GroupIdentifier,
		},
		Location: r.Location,
	}

	if r.Identifier != "" {
		group, err := Sdk.ResourceGroup.Get(immutable.Name)
		if err != nil {
			return nil, nil, err
		}
		newResource.Location = *group.Location
		newResource.Name = *group.Name
		newResource.Identifier = *group.ID
	}

	newCluster := r.immutableRender(newResource, immutable)
	return newCluster, newResource, nil
}
func ( r * ResourceGroup ) Actual ( immutable * cluster . Cluster ) ( * cluster . Cluster , cloud . Resource , error ) { logger . Debug ( " " ) newResource := & ResourceGroup { Shared : Shared { Name : r . Name , Tags : r . Tags , Identifier : immutable . ProviderConfig ( ) . GroupIdentifier , } , Location : r . Location , } if r . Identifier != " " { group , err := Sdk . ResourceGroup . Get ( immutable . Name ) if err != nil { return nil , nil , err } newResource . Location = * group . Location newResource . Name = * group . Name newResource . Identifier = * group . ID } newCluster := r . immutableRender ( newResource , immutable ) return newCluster , newResource , nil }
// Actual returns the actual resource group in Azure if it exists.
Actual returns the actual resource group in Azure if it exists .