GithubHelp home page GithubHelp logo

kolosovpetro / packer-azure-windows-image Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 46 KB

Example of how to create and deploy Azure Windows VM with preinstalled chocolatey and other software

Home Page: https://dev.azure.com/PetroKolosovProjects/packer-azure-windows-image

License: GNU General Public License v2.0

HCL 79.70% PowerShell 18.54% Shell 1.76%
packer packer-provisioner packer-template terraform

packer-azure-windows-image's Introduction

Packer Azure Windows Image

Example of how to create and deploy Azure Windows VM with preinstalled chocolatey and other software

To install Packer

  • choco install packer -y

Packer commands

  • packer init windows-server2019-v1.pkr.hcl
  • packer validate -var-file="windows.variables.json" windows-server2019-v1.pkr.hcl
  • packer build -var-file="windows.variables.json" windows-server2019-v1.pkr.hcl

Pre-commit configuration

  • Install python3 via windows store
  • pip install --upgrade pip
  • pip install pre-commit
  • Update PATH variable
  • pre-commit install

Install terraform docs

  • choco install terraform-docs

Install tflint

  • choco install tflint

Documentation

Storage account configuration file

storage_account_name = "storage_account_name"
container_name       = "container_name"
key                  = "terraform.tfstate"
sas_token            = "sas_token"

Deploy storage account for terraform state

Module documentation

Requirements

Name Version
azurerm =3.71.0

Providers

Name Version
azurerm 3.71.0

Modules

Name Source Version
custom_script_extension ./modules/custom-script-extension n/a
key_vault ./modules/keyvault n/a
key_vault_secrets ./modules/keyvault-secrets n/a
keyvault_access_policy ./modules/keyvault-access-policy n/a
network ./modules/network n/a
storage ./modules/storage n/a
virtual_machine ./modules/vm n/a

Resources

Name Type
azurerm_resource_group.public resource
azurerm_client_config.current data source

Inputs

Name Description Type Default Required
azure-client-id n/a string n/a yes
azure-client-secret n/a string n/a yes
azure-region n/a string n/a yes
azure-resource-group n/a string n/a yes
azure-subscription-id n/a string n/a yes
azure-tenant-id n/a string n/a yes
custom_script_extension_enabled Specifies whether the extension should be enabled or disabled. bool n/a yes
image-name n/a string n/a yes
image_resource_group_name Specifies the name of the resource group that contains the image to use to create the virtual machine. string n/a yes
os_profile_admin_password Specifies the password of the administrator account. string n/a yes
os_profile_admin_username Specifies the name of the administrator account. string n/a yes
prefix Resources name prefix string n/a yes
resource_group_location Location of the resource group. string n/a yes
storage_account_replication Specifies the replication type for this storage account. string n/a yes
storage_account_tier Specifies the tier to use for this storage account. string n/a yes
storage_image_reference_offer Specifies the offer of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_publisher The publisher of the image used to create the virtual machine. string n/a yes
storage_image_reference_sku Specifies the SKU of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_version Specifies the version of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_os_disk_caching Specifies the caching requirements for the OS disk. string n/a yes
storage_os_disk_create_option Specifies how the virtual machine should be created. string n/a yes
storage_os_disk_managed_disk_type Specifies the storage account type for the managed disk. string n/a yes
vm-size n/a string n/a yes
vm_size The size of the virtual machine. string n/a yes

Outputs

Name Description
public_ip n/a
username n/a

packer-azure-windows-image's People

Contributors

kolosovpetro avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

meruguvikram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.