Skip to content
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

[V2] Migrate all builders to hashicorp/go-azure-sdk #326

Merged
merged 15 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions builder/azure/arm/step_deploy_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func (s *StepDeployTemplate) Cleanup(state multistep.StateBag) {
"Name: %s\n"+
"Error: %s", imageName, err))
}
} else {
ui.Say(fmt.Sprintf("Skipping deletion -> %s : '%s' since 'keep_os_disk' is set to true", imageType, imageName))
}
ui.Say(fmt.Sprintf("Skipping deletion -> %s : '%s' since 'keep_os_disk' is set to true", imageType, imageName))

var dataDisks []string
if disks := state.Get(constants.ArmAdditionalDiskVhds); disks != nil {
dataDisks = disks.([]string)
Expand Down
6 changes: 1 addition & 5 deletions builder/azure/dtl/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook)
return nil, fmt.Errorf("the managed image named %s already exists in the resource group %s, use the -force option to automatically delete it.", b.config.ManagedImageName, b.config.ManagedImageResourceGroupName)
}
}

} else {
// User is not using Managed Images to build, warning message here that this path is being deprecated
ui.Error("Warning: You are using Azure Packer Builder to create VHDs which is being deprecated, consider using Managed Images. Learn more https://www.packer.io/docs/builders/azure/arm#azure-arm-builder-specific-options")
}
}

b.config.validateLocationZoneResiliency(ui.Say)

Expand Down
21 changes: 0 additions & 21 deletions docs/builders/arm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -526,27 +526,6 @@ prevent running afoul of Azure decency controls.
The password alphabet used for random values is
**0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ**.

### Deprecation Warning
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will post a longer clarification on the removal of the deprecation warning for VHDs in the release notes for v2.0.0


You may see a scary-looking deprecation warning when you run the Azure builder:

```
==> azure-arm: Warning: You are using Azure Packer Builder to create VHDs which
is being deprecated, consider using Managed Images. Learn more
http://aka.ms/packermanagedimage
```

Don't panic. Your build won't stop working next week.

Long-term, Azure wants everyone to move to using managed images and managed
disks because they hide the complexity with respect to storage account
performance. Managed disks can be exported to a VHD. If this is deprecated,
it will be done in a transparent process by the Microsoft team who help
maintain Packer.

In the future, Packer may remove VHD support but add a post-processor that can
automate the export to a storage account.

### Windows

The Windows implementation is very similar to the Linux build, with the
Expand Down