@@ -23,7 +23,7 @@ func List(ctx context.Context, cloud common.Cloud) ([]common.Identifier, error)
2323}
2424
2525func New (ctx context.Context , cloud common.Cloud , identifier common.Identifier , task common.Task ) (* Task , error ) {
26- client , err := client .New (ctx , cloud , task .Tags )
26+ client , err := client .New (ctx , cloud , cloud .Tags )
2727 if err != nil {
2828 return nil , err
2929 }
@@ -137,10 +137,10 @@ func (t *Task) Create(ctx context.Context) error {
137137 }}
138138 if t .Attributes .Environment .Directory != "" {
139139 steps = append (steps , common.Step {
140- Description : "Uploading Directory..." ,
141- Action : func (ctx context.Context ) error {
140+ Description : "Uploading Directory..." ,
141+ Action : func (ctx context.Context ) error {
142142 return t .Push (ctx , t .Attributes .Environment .Directory )
143- },
143+ },
144144 })
145145 }
146146 steps = append (steps , common.Step {
@@ -201,8 +201,8 @@ func (t *Task) Delete(ctx context.Context) error {
201201 if t .Read (ctx ) == nil {
202202 if t .Attributes .Environment .DirectoryOut != "" {
203203 steps = []common.Step {{
204- Description : "Downloading Directory..." ,
205- Action : func (ctx context.Context )error {
204+ Description : "Downloading Directory..." ,
205+ Action : func (ctx context.Context ) error {
206206 err := t .Pull (ctx , t .Attributes .Environment .Directory , t .Attributes .Environment .DirectoryOut )
207207 if err != nil && err != common .NotFoundError {
208208 return err
@@ -211,36 +211,37 @@ func (t *Task) Delete(ctx context.Context) error {
211211 },
212212 }, {
213213 Description : "Emptying Bucket..." ,
214- Action : func (ctx context.Context )error {
214+ Action : func (ctx context.Context ) error {
215215 err := machine .Delete (ctx , t .DataSources .Credentials .Resource ["RCLONE_REMOTE" ])
216216 if err != nil && err != common .NotFoundError {
217217 return err
218218 }
219219 return nil
220220 },
221221 }}
222- }}
222+ }
223+ }
223224 steps = append (steps , []common.Step {{
224225 Description : "Deleting VirtualMachineScaleSet..." ,
225- Action : t .Resources .VirtualMachineScaleSet .Delete ,
226- },{
226+ Action : t .Resources .VirtualMachineScaleSet .Delete ,
227+ }, {
227228 Description : "Deleting Subnet..." ,
228- Action : t .Resources .Subnet .Delete ,
229+ Action : t .Resources .Subnet .Delete ,
229230 }, {
230231 Description : "Deleting SecurityGroup..." ,
231- Action : t .Resources .SecurityGroup .Delete ,
232+ Action : t .Resources .SecurityGroup .Delete ,
232233 }, {
233234 Description : "Deleting VirtualNetwork..." ,
234- Action : t .Resources .VirtualNetwork .Delete ,
235+ Action : t .Resources .VirtualNetwork .Delete ,
235236 }, {
236237 Description : "Deleting BlobContainer..." ,
237- Action : t .Resources .BlobContainer .Delete ,
238+ Action : t .Resources .BlobContainer .Delete ,
238239 }, {
239240 Description : "Deleting StorageAccount..." ,
240- Action : t .Resources .StorageAccount .Delete ,
241+ Action : t .Resources .StorageAccount .Delete ,
241242 }, {
242243 Description : "Deleting ResourceGroup..." ,
243- Action : t .Resources .ResourceGroup .Delete ,
244+ Action : t .Resources .ResourceGroup .Delete ,
244245 }}... )
245246 if err := common .RunSteps (ctx , steps ); err != nil {
246247 return err
0 commit comments