generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK Migration - V2 Beta #306
Closed
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e141427
Rebasing entire ARM builder migration on top of main
JenGoldstrich fed4710
Remove some missed old SDK stuff, including the autorest To package f…
JenGoldstrich 52b86d7
Update oidc-example.json
JenGoldstrich 337b9d9
Pass SIG ID subscription through to state
JenGoldstrich 2161a3d
Use Hamilton MSGraph SDK to fetch Object ID for Windows builds
JenGoldstrich 841570a
Format and add comment
JenGoldstrich 64b5a43
commit generated code
JenGoldstrich 04a4a81
Switch AuthType back to private variable and use helper function to g…
JenGoldstrich a6971a6
Print MSgraph error again
JenGoldstrich 09e6211
Don't use Hamilton, get it from the Access Token
JenGoldstrich fdc53ce
fmt and pass in correct context on cleanup
JenGoldstrich 083f230
Mess with backoff time while testing to see if this can be a bit smoo…
JenGoldstrich 1cd9b80
Don't use context.TODOs in ARM Builder client calls
JenGoldstrich b8c600a
Update with newest cty fork
JenGoldstrich 994b7f4
Use hcl file in oidc test
JenGoldstrich a37cd44
Use Giovanni instead of Blob Container serivce
JenGoldstrich ffd128b
Implement new SDK environment logic
JenGoldstrich 2f80201
Address fmt
JenGoldstrich 015fabd
Remove unused function, go mod tidy
JenGoldstrich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,4 +368,4 @@ func getObjectIdFromToken(token string) (string, error) { | |
} | ||
return claims["oid"].(string), nil | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,11 +107,11 @@ func (s *StepDeployTemplate) Cleanup(state multistep.StateBag) { | |
// delete the disk as the image request will return a 404 | ||
computeName := state.Get(constants.ArmComputeName).(string) | ||
isManagedDisk := state.Get(constants.ArmIsManagedImage).(bool) | ||
imageType, imageName, err := s.disk(context.TODO(), subscriptionId, resourceGroupName, computeName) | ||
imageType, imageName, err := s.disk(ctx, subscriptionId, resourceGroupName, computeName) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch |
||
if err != nil { | ||
ui.Error(fmt.Sprintf("Could not retrieve OS Image details: %s", err)) | ||
} | ||
err = s.delete(context.TODO(), subscriptionId, deploymentName, resourceGroupName) | ||
err = s.delete(ctx, subscriptionId, deploymentName, resourceGroupName) | ||
if err != nil { | ||
s.reportIfError(err, resourceGroupName) | ||
} | ||
|
@@ -124,7 +124,7 @@ func (s *StepDeployTemplate) Cleanup(state multistep.StateBag) { | |
} | ||
if !state.Get(constants.ArmKeepOSDisk).(bool) { | ||
ui.Say(fmt.Sprintf(" Deleting -> %s : '%s'", imageType, imageName)) | ||
err = s.deleteDisk(context.TODO(), imageName, resourceGroupName, isManagedDisk, subscriptionId) | ||
err = s.deleteDisk(ctx, imageName, resourceGroupName, isManagedDisk, subscriptionId) | ||
if err != nil { | ||
ui.Error(fmt.Sprintf("Error deleting resource. Please delete manually.\n\n"+ | ||
"Name: %s\n"+ | ||
|
@@ -139,7 +139,7 @@ func (s *StepDeployTemplate) Cleanup(state multistep.StateBag) { | |
for i, additionaldisk := range dataDisks { | ||
s.say(fmt.Sprintf(" Deleting Additional Disk -> %d: '%s'", i+1, additionaldisk)) | ||
|
||
err := s.deleteImage(context.TODO(), additionaldisk, resourceGroupName, isManagedDisk, subscriptionId) | ||
err := s.deleteImage(ctx, additionaldisk, resourceGroupName, isManagedDisk, subscriptionId) | ||
if err != nil { | ||
s.say("Failed to delete the managed Additional Disk!") | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: superfluous empty line