Documentation ¶
Index ¶
- Constants
- Variables
- func GetVirtualMachineDeployment(config *Config) (*dtl.LabVirtualMachineCreationParameter, error)
- type AdditionalDiskArtifact
- type Artifact
- type ArtifactParameter
- type AzureClient
- type Builder
- type CaptureBootDiagnostics
- type CaptureDiagnosticProfile
- type CaptureDisk
- type CaptureHardwareProfile
- type CaptureNetworkInterface
- type CaptureNetworkProfile
- type CaptureOSProfile
- type CaptureOperation
- type CaptureOperationProperties
- type CaptureProperties
- type CaptureResources
- type CaptureStorageProfile
- type CaptureTemplate
- type CaptureTemplateParameter
- type CaptureUri
- type Config
- type DtlArtifact
- type FlatArtifactParameter
- type FlatConfig
- type FlatDtlArtifact
- type FlatSharedImageGallery
- type FlatSharedImageGalleryDestination
- type OpenSshKeyPair
- type SharedImageGallery
- type SharedImageGalleryDestination
- type StepCaptureImage
- type StepDeleteVirtualMachine
- type StepDeployTemplate
- type StepPowerOffCompute
- type StepPublishToSharedImageGallery
- type StepSaveWinRMPassword
- type TempName
Constants ¶
const ( DefaultSasBlobContainer = "system/Microsoft.Compute" DefaultSecretName = "packerKeyVaultSecret" )
const ( DefaultImageVersion = "latest" DefaultUserName = "packer" DefaultPrivateVirtualNetworkWithPublicIp = false DefaultVMSize = "Standard_A1" DefaultCustomImageCaptureTimeout = 30 * time.Minute )
const (
BuilderId = "Azure.ResourceManagement.VMImage"
)
const (
EnvPackerLogAzureMaxLen = "PACKER_LOG_AZURE_MAXLEN"
)
const (
KeySize = 2048
)
Variables ¶
var TemplateFuncs = template.FuncMap{ "clean_resource_name": templateCleanImageName, "clean_image_name": packertpl.DeprecatedTemplateFunc("clean_image_name", "clean_resource_name", templateCleanImageName), }
Functions ¶
func GetVirtualMachineDeployment ¶
func GetVirtualMachineDeployment(config *Config) (*dtl.LabVirtualMachineCreationParameter, error)
Types ¶
type AdditionalDiskArtifact ¶
type Artifact ¶
type Artifact struct { // OS type: Linux, Windows OSType string // VHD StorageAccountLocation string OSDiskUri string TemplateUri string OSDiskUriReadOnlySas string TemplateUriReadOnlySas string // Managed Image ManagedImageResourceGroupName string ManagedImageName string ManagedImageLocation string ManagedImageId string ManagedImageOSDiskSnapshotName string ManagedImageDataDiskSnapshotPrefix string // Additional Disks AdditionalDisks *[]AdditionalDiskArtifact }
func NewArtifact ¶
func NewManagedImageArtifact ¶
type ArtifactParameter ¶
type ArtifactParameter struct { Name string `mapstructure:"name"` Value string `mapstructure:"value"` Type string `mapstructure:"type"` }
func (*ArtifactParameter) FlatMapstructure ¶
func (*ArtifactParameter) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatArtifactParameter. FlatArtifactParameter is an auto-generated flat version of ArtifactParameter. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type AzureClient ¶
type AzureClient struct { storage.BlobStorageClient resources.DeploymentsClient resources.DeploymentOperationsClient resources.GroupsClient network.PublicIPAddressesClient network.InterfacesClient network.SubnetsClient network.VirtualNetworksClient compute.ImagesClient compute.VirtualMachinesClient common.VaultClient armStorage.AccountsClient compute.DisksClient compute.SnapshotsClient newCompute.GalleryImageVersionsClient newCompute.GalleryImagesClient InspectorMaxLength int Template *CaptureTemplate LastError azureErrorResponse VaultClientDelete common.VaultClient DtlLabsClient dtl.LabsClient DtlVirtualMachineClient dtl.VirtualMachinesClient DtlEnvironmentsClient dtl.EnvironmentsClient DtlCustomImageClient dtl.CustomImagesClient DtlVirtualNetworksClient dtl.VirtualNetworksClient }
func NewAzureClient ¶
func NewAzureClient(subscriptionID, resourceGroupName string, cloud *azure.Environment, SharedGalleryTimeout time.Duration, CustomImageCaptureTimeout time.Duration, PollingDuration time.Duration, servicePrincipalToken *adal.ServicePrincipalToken) (*AzureClient, error)
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) ConfigSpec ¶
func (b *Builder) ConfigSpec() hcldec.ObjectSpec
type CaptureBootDiagnostics ¶
type CaptureBootDiagnostics struct {
Enabled bool `json:"enabled"`
}
type CaptureDiagnosticProfile ¶
type CaptureDiagnosticProfile struct {
BootDiagnostics CaptureBootDiagnostics `json:"bootDiagnostics"`
}
type CaptureDisk ¶
type CaptureDisk struct { OSType string `json:"osType"` Name string `json:"name"` Image CaptureUri `json:"image"` Vhd CaptureUri `json:"vhd"` CreateOption string `json:"createOption"` Caching string `json:"caching"` }
type CaptureHardwareProfile ¶
type CaptureHardwareProfile struct {
VMSize string `json:"vmSize"`
}
type CaptureNetworkInterface ¶
type CaptureNetworkInterface struct {
Id string `json:"id"`
}
type CaptureNetworkProfile ¶
type CaptureNetworkProfile struct {
NetworkInterfaces []CaptureNetworkInterface `json:"networkInterfaces"`
}
type CaptureOSProfile ¶
type CaptureOperation ¶
type CaptureOperation struct { OperationId string `json:"operationId"` Status string `json:"status"` Properties *CaptureOperationProperties `json:"properties"` }
type CaptureOperationProperties ¶
type CaptureOperationProperties struct {
Output *CaptureTemplate `json:"output"`
}
type CaptureProperties ¶
type CaptureProperties struct { HardwareProfile CaptureHardwareProfile `json:"hardwareProfile"` StorageProfile CaptureStorageProfile `json:"storageProfile"` OSProfile CaptureOSProfile `json:"osProfile"` NetworkProfile CaptureNetworkProfile `json:"networkProfile"` DiagnosticsProfile CaptureDiagnosticProfile `json:"diagnosticsProfile"` ProvisioningState int `json:"provisioningState"` }
type CaptureResources ¶
type CaptureResources struct { ApiVersion string `json:"apiVersion"` Name string `json:"name"` Type string `json:"type"` Location string `json:"location"` Properties CaptureProperties `json:"properties"` }
type CaptureStorageProfile ¶
type CaptureStorageProfile struct { OSDisk CaptureDisk `json:"osDisk"` DataDisks []CaptureDisk `json:"dataDisks"` }
type CaptureTemplate ¶
type CaptureTemplate struct { Schema string `json:"$schema"` ContentVersion string `json:"contentVersion"` Parameters map[string]CaptureTemplateParameter `json:"parameters"` Resources []CaptureResources `json:"resources"` }
type CaptureUri ¶
type CaptureUri struct {
Uri string `json:"uri"`
}
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` // Authentication via OAUTH ClientConfig client.Config `mapstructure:",squash"` // Capture CaptureNamePrefix string `mapstructure:"capture_name_prefix"` CaptureContainerName string `mapstructure:"capture_container_name"` // image](https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-of-shared-image-gallery/) // as the source for this build. *VHD targets are incompatible with this // build type* - the target must be a *Managed Image*. // SharedGallery SharedImageGallery `mapstructure:"shared_image_gallery"` // // Following is an example. // SharedGalleryDestination SharedImageGalleryDestination `mapstructure:"shared_image_gallery_destination"` // gallery before timing out. If your Packer build is failing on the // Publishing to Shared Image Gallery step with the error `Original Error: // context deadline exceeded`, but the image is present when you check your // Azure dashboard, then you probably need to increase this timeout from // its default of "60m" (valid time units include `s` for seconds, `m` for // minutes, and `h` for hours.) SharedGalleryTimeout time.Duration `mapstructure:"shared_image_gallery_timeout"` // How long to wait for an image to be captured before timing out // If your Packer build is failing on the Capture Image step with the // error `Original Error: context deadline exceeded`, but the image is // present when you check your custom image repository, then you probably // need to increase this timeout from its default of "30m" (valid time units // include `s` for seconds, `m` for minutes, and `h` for hours.) CustomImageCaptureTimeout time.Duration `mapstructure:"custom_image_capture_timeout"` // PublisherName for your base image. See // [documentation](https://docs.microsoft.com/en-us/cli/azure/vm/image) // for details. // // CLI example `az vm image list-publishers --location westus` ImagePublisher string `mapstructure:"image_publisher"` // Offer for your base image. See // [documentation](https://docs.microsoft.com/en-us/cli/azure/vm/image) // for details. // // CLI example // `az vm image list-offers --location westus --publisher Canonical` ImageOffer string `mapstructure:"image_offer"` // SKU for your base image. See // [documentation](https://docs.microsoft.com/en-us/cli/azure/vm/image) // for details. // // CLI example // `az vm image list-skus --location westus --publisher Canonical --offer UbuntuServer` ImageSku string `mapstructure:"image_sku"` // Specify a specific version of an OS to boot from. // Defaults to `latest`. There may be a difference in versions available // across regions due to image synchronization latency. To ensure a consistent // version across regions set this value to one that is available in all // regions where you are deploying. // // CLI example // `az vm image list --location westus --publisher Canonical --offer UbuntuServer --sku 16.04.0-LTS --all` ImageVersion string `mapstructure:"image_version"` // Specify a custom VHD to use. If this value is set, do // not set image_publisher, image_offer, image_sku, or image_version. ImageUrl string `mapstructure:"image_url"` // Specify the source managed image's resource group used to use. If this // value is set, do not set image\_publisher, image\_offer, image\_sku, or // image\_version. If this value is set, the value // `custom_managed_image_name` must also be set. See // [documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images) // to learn more about managed images. CustomManagedImageResourceGroupName string `mapstructure:"custom_managed_image_resource_group_name"` // Specify the source managed image's name to use. If this value is set, do // not set image\_publisher, image\_offer, image\_sku, or image\_version. // If this value is set, the value // `custom_managed_image_resource_group_name` must also be set. See // [documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images) // to learn more about managed images. CustomManagedImageName string `mapstructure:"custom_managed_image_name"` Location string `mapstructure:"location"` // Size of the VM used for building. This can be changed when you deploy a // VM from your VHD. See // [pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/) // information. Defaults to `Standard_A1`. // // CLI example `az vm list-sizes --location westus` VMSize string `mapstructure:"vm_size"` // Specify the managed image resource group name where the result of the // Packer build will be saved. The resource group must already exist. If // this value is set, the value managed_image_name must also be set. See // documentation to learn more about managed images. ManagedImageResourceGroupName string `mapstructure:"managed_image_resource_group_name" required:"true"` // Specify the managed image name where the result of the Packer build will // be saved. The image name must not exist ahead of time, and will not be // overwritten. If this value is set, the value // managed_image_resource_group_name must also be set. See documentation to // learn more about managed images. ManagedImageName string `mapstructure:"managed_image_name" required:"true"` // Specify the storage account // type for a managed image. Valid values are Standard_LRS and Premium_LRS. // The default is Standard_LRS. ManagedImageStorageAccountType string `mapstructure:"managed_image_storage_account_type" required:"false"` // the user can define up to 15 // tags. Tag names cannot exceed 512 characters, and tag values cannot exceed // 256 characters. Tags are applied to every resource deployed by a Packer // build, i.e. Resource Group, VM, NIC, VNET, Public IP, KeyVault, etc. AzureTags map[string]*string `mapstructure:"azure_tags" required:"false"` // Used for creating images from Marketplace images. Please refer to // [Deploy an image with Marketplace // terms](https://aka.ms/azuremarketplaceapideployment) for more details. // Not all Marketplace images support programmatic deployment, and support // is controlled by the image publisher. // Plan_id is a string with unique identifier for the plan associated with images. // Ex plan_id="1-12ab" PlanID string `mapstructure:"plan_id" required:"false"` // The default PollingDuration for azure is 15mins, this property will override // that value. See [Azure DefaultPollingDuration](https://godoc.org/github.com/Azure/go-autorest/autorest#pkg-constants) // If your Packer build is failing on the // ARM deployment step with the error `Original Error: // context deadline exceeded`, then you probably need to increase this timeout from // its default of "15m" (valid time units include `s` for seconds, `m` for // minutes, and `h` for hours.) PollingDurationTimeout time.Duration `mapstructure:"polling_duration_timeout" required:"false"` // If either Linux or Windows is specified Packer will // automatically configure authentication credentials for the provisioned // machine. For Linux this configures an SSH authorized key. For Windows // this configures a WinRM certificate. OSType string `mapstructure:"os_type" required:"false"` // Specify the size of the OS disk in GB // (gigabytes). Values of zero or less than zero are ignored. OSDiskSizeGB int32 `mapstructure:"os_disk_size_gb" required:"false"` // For Managed build the final artifacts are included in the managed image. // The additional disk will have the same storage account type as the OS // disk, as specified with the `managed_image_storage_account_type` // setting. AdditionalDiskSize []int32 `mapstructure:"disk_additional_size" required:"false"` // Specify the disk caching type. Valid values // are None, ReadOnly, and ReadWrite. The default value is ReadWrite. DiskCachingType string `mapstructure:"disk_caching_type" required:"false"` // DTL values StorageType string `mapstructure:"storage_type"` // Name of the virtual network used for communicating with the lab vms. LabVirtualNetworkName string `mapstructure:"lab_virtual_network_name"` // Name of the existing lab where the virtual machine will be created. LabName string `mapstructure:"lab_name" required:"true"` // Name of the subnet being used in the lab, if not the default. LabSubnetName string `mapstructure:"lab_subnet_name" required:"true"` // Name of the resource group where the lab exist. LabResourceGroupName string `mapstructure:"lab_resource_group_name" required:"true"` //One or more Artifacts that should be added to the VM at start. DtlArtifacts []DtlArtifact `mapstructure:"dtl_artifacts"` // Name for the virtual machine within the DevTest lab. VMName string `mapstructure:"vm_name"` // DisallowPublicIPAddress - Indicates whether the virtual machine is to be created without a public IP address. DisallowPublicIP bool `mapstructure:"disallow_public_ip" required:"false"` // SkipSysprep - Indicates whether SysPrep is to be requested to the DTL or if it should be skipped because it has already been applied. Defaults to false. SkipSysprep bool `mapstructure:"skip_sysprep" required:"false"` // Runtime Values UserName string `mapstructure-to-hcl2:",skip"` Password string VMCreationResourceGroup string `mapstructure-to-hcl2:",skip"` Comm communicator.Config `mapstructure:",squash"` // contains filtered or unexported fields }
func (*Config) FlatMapstructure ¶
FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type DtlArtifact ¶
type DtlArtifact struct { ArtifactName string `mapstructure:"artifact_name"` RepositoryName string `mapstructure:"repository_name"` ArtifactId string `mapstructure:"artifact_id"` Parameters []ArtifactParameter `mapstructure:"parameters"` }
An existing artifact that can be added to the virtual machine being provisioned. At a minimum the `artifact_name` attribute must be set.
func (*DtlArtifact) FlatMapstructure ¶
func (*DtlArtifact) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatDtlArtifact. FlatDtlArtifact is an auto-generated flat version of DtlArtifact. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type FlatArtifactParameter ¶
type FlatArtifactParameter struct { Name *string `mapstructure:"name" cty:"name" hcl:"name"` Value *string `mapstructure:"value" cty:"value" hcl:"value"` Type *string `mapstructure:"type" cty:"type" hcl:"type"` }
FlatArtifactParameter is an auto-generated flat version of ArtifactParameter. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatArtifactParameter) HCL2Spec ¶
func (*FlatArtifactParameter) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a ArtifactParameter. This spec is used by HCL to read the fields of ArtifactParameter. The decoded values from this spec will then be applied to a FlatArtifactParameter.
type FlatConfig ¶
type FlatConfig struct { PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"` PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"` PackerCoreVersion *string `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"` PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"` PackerForce *bool `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"` PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"` PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"` PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"` CloudEnvironmentName *string `mapstructure:"cloud_environment_name" required:"false" cty:"cloud_environment_name" hcl:"cloud_environment_name"` MetadataHost *string `mapstructure:"metadata_host" required:"false" cty:"metadata_host" hcl:"metadata_host"` ClientID *string `mapstructure:"client_id" cty:"client_id" hcl:"client_id"` ClientSecret *string `mapstructure:"client_secret" cty:"client_secret" hcl:"client_secret"` ClientCertPath *string `mapstructure:"client_cert_path" cty:"client_cert_path" hcl:"client_cert_path"` ClientCertExpireTimeout *string `mapstructure:"client_cert_token_timeout" required:"false" cty:"client_cert_token_timeout" hcl:"client_cert_token_timeout"` ClientJWT *string `mapstructure:"client_jwt" cty:"client_jwt" hcl:"client_jwt"` ObjectID *string `mapstructure:"object_id" cty:"object_id" hcl:"object_id"` TenantID *string `mapstructure:"tenant_id" required:"false" cty:"tenant_id" hcl:"tenant_id"` SubscriptionID *string `mapstructure:"subscription_id" cty:"subscription_id" hcl:"subscription_id"` UseAzureCLIAuth *bool `mapstructure:"use_azure_cli_auth" required:"false" cty:"use_azure_cli_auth" hcl:"use_azure_cli_auth"` CaptureNamePrefix *string `mapstructure:"capture_name_prefix" cty:"capture_name_prefix" hcl:"capture_name_prefix"` CaptureContainerName *string `mapstructure:"capture_container_name" cty:"capture_container_name" hcl:"capture_container_name"` CustomImageCaptureTimeout *string `mapstructure:"custom_image_capture_timeout" cty:"custom_image_capture_timeout" hcl:"custom_image_capture_timeout"` ImagePublisher *string `mapstructure:"image_publisher" cty:"image_publisher" hcl:"image_publisher"` ImageOffer *string `mapstructure:"image_offer" cty:"image_offer" hcl:"image_offer"` ImageSku *string `mapstructure:"image_sku" cty:"image_sku" hcl:"image_sku"` ImageVersion *string `mapstructure:"image_version" cty:"image_version" hcl:"image_version"` ImageUrl *string `mapstructure:"image_url" cty:"image_url" hcl:"image_url"` CustomManagedImageResourceGroupName *string `` /* 149-byte string literal not displayed */ CustomManagedImageName *string `mapstructure:"custom_managed_image_name" cty:"custom_managed_image_name" hcl:"custom_managed_image_name"` Location *string `mapstructure:"location" cty:"location" hcl:"location"` VMSize *string `mapstructure:"vm_size" cty:"vm_size" hcl:"vm_size"` ManagedImageResourceGroupName *string `` /* 144-byte string literal not displayed */ ManagedImageName *string `mapstructure:"managed_image_name" required:"true" cty:"managed_image_name" hcl:"managed_image_name"` ManagedImageStorageAccountType *string `` /* 148-byte string literal not displayed */ AzureTags map[string]*string `mapstructure:"azure_tags" required:"false" cty:"azure_tags" hcl:"azure_tags"` PlanID *string `mapstructure:"plan_id" required:"false" cty:"plan_id" hcl:"plan_id"` PollingDurationTimeout *string `mapstructure:"polling_duration_timeout" required:"false" cty:"polling_duration_timeout" hcl:"polling_duration_timeout"` OSType *string `mapstructure:"os_type" required:"false" cty:"os_type" hcl:"os_type"` OSDiskSizeGB *int32 `mapstructure:"os_disk_size_gb" required:"false" cty:"os_disk_size_gb" hcl:"os_disk_size_gb"` AdditionalDiskSize []int32 `mapstructure:"disk_additional_size" required:"false" cty:"disk_additional_size" hcl:"disk_additional_size"` DiskCachingType *string `mapstructure:"disk_caching_type" required:"false" cty:"disk_caching_type" hcl:"disk_caching_type"` StorageType *string `mapstructure:"storage_type" cty:"storage_type" hcl:"storage_type"` LabVirtualNetworkName *string `mapstructure:"lab_virtual_network_name" cty:"lab_virtual_network_name" hcl:"lab_virtual_network_name"` LabName *string `mapstructure:"lab_name" required:"true" cty:"lab_name" hcl:"lab_name"` LabSubnetName *string `mapstructure:"lab_subnet_name" required:"true" cty:"lab_subnet_name" hcl:"lab_subnet_name"` LabResourceGroupName *string `mapstructure:"lab_resource_group_name" required:"true" cty:"lab_resource_group_name" hcl:"lab_resource_group_name"` DtlArtifacts []FlatDtlArtifact `mapstructure:"dtl_artifacts" cty:"dtl_artifacts" hcl:"dtl_artifacts"` VMName *string `mapstructure:"vm_name" cty:"vm_name" hcl:"vm_name"` DisallowPublicIP *bool `mapstructure:"disallow_public_ip" required:"false" cty:"disallow_public_ip" hcl:"disallow_public_ip"` SkipSysprep *bool `mapstructure:"skip_sysprep" required:"false" cty:"skip_sysprep" hcl:"skip_sysprep"` Password *string `cty:"password" hcl:"password"` Type *string `mapstructure:"communicator" cty:"communicator" hcl:"communicator"` PauseBeforeConnect *string `mapstructure:"pause_before_connecting" cty:"pause_before_connecting" hcl:"pause_before_connecting"` SSHHost *string `mapstructure:"ssh_host" cty:"ssh_host" hcl:"ssh_host"` SSHPort *int `mapstructure:"ssh_port" cty:"ssh_port" hcl:"ssh_port"` SSHUsername *string `mapstructure:"ssh_username" cty:"ssh_username" hcl:"ssh_username"` SSHPassword *string `mapstructure:"ssh_password" cty:"ssh_password" hcl:"ssh_password"` SSHKeyPairName *string `mapstructure:"ssh_keypair_name" undocumented:"true" cty:"ssh_keypair_name" hcl:"ssh_keypair_name"` SSHTemporaryKeyPairName *string `mapstructure:"temporary_key_pair_name" undocumented:"true" cty:"temporary_key_pair_name" hcl:"temporary_key_pair_name"` SSHTemporaryKeyPairType *string `mapstructure:"temporary_key_pair_type" cty:"temporary_key_pair_type" hcl:"temporary_key_pair_type"` SSHTemporaryKeyPairBits *int `mapstructure:"temporary_key_pair_bits" cty:"temporary_key_pair_bits" hcl:"temporary_key_pair_bits"` SSHCiphers []string `mapstructure:"ssh_ciphers" cty:"ssh_ciphers" hcl:"ssh_ciphers"` SSHClearAuthorizedKeys *bool `mapstructure:"ssh_clear_authorized_keys" cty:"ssh_clear_authorized_keys" hcl:"ssh_clear_authorized_keys"` SSHKEXAlgos []string `mapstructure:"ssh_key_exchange_algorithms" cty:"ssh_key_exchange_algorithms" hcl:"ssh_key_exchange_algorithms"` SSHPrivateKeyFile *string `mapstructure:"ssh_private_key_file" undocumented:"true" cty:"ssh_private_key_file" hcl:"ssh_private_key_file"` SSHCertificateFile *string `mapstructure:"ssh_certificate_file" cty:"ssh_certificate_file" hcl:"ssh_certificate_file"` SSHPty *bool `mapstructure:"ssh_pty" cty:"ssh_pty" hcl:"ssh_pty"` SSHTimeout *string `mapstructure:"ssh_timeout" cty:"ssh_timeout" hcl:"ssh_timeout"` SSHWaitTimeout *string `mapstructure:"ssh_wait_timeout" undocumented:"true" cty:"ssh_wait_timeout" hcl:"ssh_wait_timeout"` SSHAgentAuth *bool `mapstructure:"ssh_agent_auth" undocumented:"true" cty:"ssh_agent_auth" hcl:"ssh_agent_auth"` SSHDisableAgentForwarding *bool `mapstructure:"ssh_disable_agent_forwarding" cty:"ssh_disable_agent_forwarding" hcl:"ssh_disable_agent_forwarding"` SSHHandshakeAttempts *int `mapstructure:"ssh_handshake_attempts" cty:"ssh_handshake_attempts" hcl:"ssh_handshake_attempts"` SSHBastionHost *string `mapstructure:"ssh_bastion_host" cty:"ssh_bastion_host" hcl:"ssh_bastion_host"` SSHBastionPort *int `mapstructure:"ssh_bastion_port" cty:"ssh_bastion_port" hcl:"ssh_bastion_port"` SSHBastionAgentAuth *bool `mapstructure:"ssh_bastion_agent_auth" cty:"ssh_bastion_agent_auth" hcl:"ssh_bastion_agent_auth"` SSHBastionUsername *string `mapstructure:"ssh_bastion_username" cty:"ssh_bastion_username" hcl:"ssh_bastion_username"` SSHBastionPassword *string `mapstructure:"ssh_bastion_password" cty:"ssh_bastion_password" hcl:"ssh_bastion_password"` SSHBastionInteractive *bool `mapstructure:"ssh_bastion_interactive" cty:"ssh_bastion_interactive" hcl:"ssh_bastion_interactive"` SSHBastionPrivateKeyFile *string `mapstructure:"ssh_bastion_private_key_file" cty:"ssh_bastion_private_key_file" hcl:"ssh_bastion_private_key_file"` SSHBastionCertificateFile *string `mapstructure:"ssh_bastion_certificate_file" cty:"ssh_bastion_certificate_file" hcl:"ssh_bastion_certificate_file"` SSHFileTransferMethod *string `mapstructure:"ssh_file_transfer_method" cty:"ssh_file_transfer_method" hcl:"ssh_file_transfer_method"` SSHProxyHost *string `mapstructure:"ssh_proxy_host" cty:"ssh_proxy_host" hcl:"ssh_proxy_host"` SSHProxyPort *int `mapstructure:"ssh_proxy_port" cty:"ssh_proxy_port" hcl:"ssh_proxy_port"` SSHProxyUsername *string `mapstructure:"ssh_proxy_username" cty:"ssh_proxy_username" hcl:"ssh_proxy_username"` SSHProxyPassword *string `mapstructure:"ssh_proxy_password" cty:"ssh_proxy_password" hcl:"ssh_proxy_password"` SSHKeepAliveInterval *string `mapstructure:"ssh_keep_alive_interval" cty:"ssh_keep_alive_interval" hcl:"ssh_keep_alive_interval"` SSHReadWriteTimeout *string `mapstructure:"ssh_read_write_timeout" cty:"ssh_read_write_timeout" hcl:"ssh_read_write_timeout"` SSHRemoteTunnels []string `mapstructure:"ssh_remote_tunnels" cty:"ssh_remote_tunnels" hcl:"ssh_remote_tunnels"` SSHLocalTunnels []string `mapstructure:"ssh_local_tunnels" cty:"ssh_local_tunnels" hcl:"ssh_local_tunnels"` SSHPublicKey []byte `mapstructure:"ssh_public_key" undocumented:"true" cty:"ssh_public_key" hcl:"ssh_public_key"` SSHPrivateKey []byte `mapstructure:"ssh_private_key" undocumented:"true" cty:"ssh_private_key" hcl:"ssh_private_key"` WinRMUser *string `mapstructure:"winrm_username" cty:"winrm_username" hcl:"winrm_username"` WinRMPassword *string `mapstructure:"winrm_password" cty:"winrm_password" hcl:"winrm_password"` WinRMHost *string `mapstructure:"winrm_host" cty:"winrm_host" hcl:"winrm_host"` WinRMNoProxy *bool `mapstructure:"winrm_no_proxy" cty:"winrm_no_proxy" hcl:"winrm_no_proxy"` WinRMPort *int `mapstructure:"winrm_port" cty:"winrm_port" hcl:"winrm_port"` WinRMTimeout *string `mapstructure:"winrm_timeout" cty:"winrm_timeout" hcl:"winrm_timeout"` WinRMUseSSL *bool `mapstructure:"winrm_use_ssl" cty:"winrm_use_ssl" hcl:"winrm_use_ssl"` WinRMInsecure *bool `mapstructure:"winrm_insecure" cty:"winrm_insecure" hcl:"winrm_insecure"` WinRMUseNTLM *bool `mapstructure:"winrm_use_ntlm" cty:"winrm_use_ntlm" hcl:"winrm_use_ntlm"` }
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatDtlArtifact ¶
type FlatDtlArtifact struct { ArtifactName *string `mapstructure:"artifact_name" cty:"artifact_name" hcl:"artifact_name"` RepositoryName *string `mapstructure:"repository_name" cty:"repository_name" hcl:"repository_name"` ArtifactId *string `mapstructure:"artifact_id" cty:"artifact_id" hcl:"artifact_id"` Parameters []FlatArtifactParameter `mapstructure:"parameters" cty:"parameters" hcl:"parameters"` }
FlatDtlArtifact is an auto-generated flat version of DtlArtifact. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatSharedImageGallery ¶
type FlatSharedImageGallery struct {}
FlatSharedImageGallery is an auto-generated flat version of SharedImageGallery. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatSharedImageGallery) HCL2Spec ¶
func (*FlatSharedImageGallery) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a SharedImageGallery. This spec is used by HCL to read the fields of SharedImageGallery. The decoded values from this spec will then be applied to a FlatSharedImageGallery.
type FlatSharedImageGalleryDestination ¶
type FlatSharedImageGalleryDestination struct {}
FlatSharedImageGalleryDestination is an auto-generated flat version of SharedImageGalleryDestination. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatSharedImageGalleryDestination) HCL2Spec ¶
func (*FlatSharedImageGalleryDestination) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a SharedImageGalleryDestination. This spec is used by HCL to read the fields of SharedImageGalleryDestination. The decoded values from this spec will then be applied to a FlatSharedImageGalleryDestination.
type OpenSshKeyPair ¶
type OpenSshKeyPair struct {
// contains filtered or unexported fields
}
func NewOpenSshKeyPair ¶
func NewOpenSshKeyPair() (*OpenSshKeyPair, error)
func NewOpenSshKeyPairWithSize ¶
func NewOpenSshKeyPairWithSize(keySize int) (*OpenSshKeyPair, error)
func (*OpenSshKeyPair) AuthorizedKey ¶
func (s *OpenSshKeyPair) AuthorizedKey() string
func (*OpenSshKeyPair) PrivateKey ¶
func (s *OpenSshKeyPair) PrivateKey() []byte
type SharedImageGallery ¶
type SharedImageGallery struct {}
func (*SharedImageGallery) FlatMapstructure ¶
func (*SharedImageGallery) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatSharedImageGallery. FlatSharedImageGallery is an auto-generated flat version of SharedImageGallery. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type SharedImageGalleryDestination ¶
type SharedImageGalleryDestination struct {}
func (*SharedImageGalleryDestination) FlatMapstructure ¶
func (*SharedImageGalleryDestination) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatSharedImageGalleryDestination. FlatSharedImageGalleryDestination is an auto-generated flat version of SharedImageGalleryDestination. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type StepCaptureImage ¶
type StepCaptureImage struct {
// contains filtered or unexported fields
}
func NewStepCaptureImage ¶
func NewStepCaptureImage(client *AzureClient, ui packersdk.Ui, config *Config) *StepCaptureImage
func (*StepCaptureImage) Cleanup ¶
func (*StepCaptureImage) Cleanup(multistep.StateBag)
func (*StepCaptureImage) Run ¶
func (s *StepCaptureImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepDeleteVirtualMachine ¶
type StepDeleteVirtualMachine struct {
// contains filtered or unexported fields
}
func NewStepDeleteVirtualMachine ¶
func NewStepDeleteVirtualMachine(client *AzureClient, ui packersdk.Ui, config *Config) *StepDeleteVirtualMachine
func (*StepDeleteVirtualMachine) Cleanup ¶
func (*StepDeleteVirtualMachine) Cleanup(multistep.StateBag)
func (*StepDeleteVirtualMachine) Run ¶
func (s *StepDeleteVirtualMachine) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepDeployTemplate ¶
type StepDeployTemplate struct {
// contains filtered or unexported fields
}
func NewStepDeployTemplate ¶
func NewStepDeployTemplate(client *AzureClient, ui packersdk.Ui, config *Config, deploymentName string, factory templateFactoryFuncDtl) *StepDeployTemplate
func (*StepDeployTemplate) Cleanup ¶
func (s *StepDeployTemplate) Cleanup(state multistep.StateBag)
func (*StepDeployTemplate) Run ¶
func (s *StepDeployTemplate) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPowerOffCompute ¶
type StepPowerOffCompute struct {
// contains filtered or unexported fields
}
func NewStepPowerOffCompute ¶
func NewStepPowerOffCompute(client *AzureClient, ui packersdk.Ui, config *Config) *StepPowerOffCompute
func (*StepPowerOffCompute) Cleanup ¶
func (*StepPowerOffCompute) Cleanup(multistep.StateBag)
func (*StepPowerOffCompute) Run ¶
func (s *StepPowerOffCompute) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPublishToSharedImageGallery ¶
type StepPublishToSharedImageGallery struct {
// contains filtered or unexported fields
}
func NewStepPublishToSharedImageGallery ¶
func NewStepPublishToSharedImageGallery(client *AzureClient, ui packersdk.Ui, config *Config) *StepPublishToSharedImageGallery
func (*StepPublishToSharedImageGallery) Cleanup ¶
func (*StepPublishToSharedImageGallery) Cleanup(multistep.StateBag)
func (*StepPublishToSharedImageGallery) Run ¶
func (s *StepPublishToSharedImageGallery) Run(ctx context.Context, stateBag multistep.StateBag) multistep.StepAction
type StepSaveWinRMPassword ¶
func (*StepSaveWinRMPassword) Cleanup ¶
func (s *StepSaveWinRMPassword) Cleanup(multistep.StateBag)
func (*StepSaveWinRMPassword) Run ¶
func (s *StepSaveWinRMPassword) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Source Files ¶
- artifact.go
- azure_client.go
- azure_error_response.go
- builder.go
- capture_template.go
- config.go
- config.hcl2spec.go
- inspector.go
- openssh_key_pair.go
- resource_resolver.go
- step.go
- step_capture_image.go
- step_delete_virtual_machine.go
- step_deploy_template.go
- step_power_off_compute.go
- step_publish_to_shared_image_gallery.go
- step_save_winrm_password.go
- template_factory.go
- template_funcs.go
- tempname.go