// Run applies the resource specific configuration.
Run applies the resource specific configuration.
// Run applies the resource specific configuration .
func (r *Resource) Run() error {
	if err := r.Config.apply(); err != nil {
		return err
	}
	r.Record.SrcImage.AmiFilters = r.Config.Source.AmiFilters
	r.Record.SrcImage.Account = awscommon.AccountMeta{
		ID:    r.Config.SrcAmiInfo.AccountID,
		Alias: r.Config.SrcAmiInfo.AccountAlias,
	}
	r.Record.TargetAccountsImages = make(map[*string]AccountImage)
	for account, accountImage := range r.Config.SrcAmiInfo.AccountRecord {
		r.Record.TargetAccountsImages[account] = accountImage
	}
	return nil
}
func ( r * Resource ) Run ( ) error { if err := r . Config . apply ( ) ; err != nil { return err } r . Record . SrcImage . AmiFilters = r . Config . Source . AmiFilters r . Record . SrcImage . Account = awscommon . AccountMeta { ID : r . Config . SrcAmiInfo . AccountID , Alias : r . Config . SrcAmiInfo . AccountAlias , } r . Record . TargetAccountsImages = make ( map [ * string ] AccountImage ) for account , accountImage := range r . Config . SrcAmiInfo . AccountRecord { r . Record . TargetAccountsImages [ account ] = accountImage } return nil }
Run applies the resource specific configuration.
Run applies the resource specific configuration .