Commit Graph

552 Commits

Author SHA1 Message Date
Megan Marsh 1cb9aea752 change markdown references to new pathing 2021-01-15 11:59:36 -08:00
Wilken Rivera 04dbbe2d8e Fix broken links detected by link checker
- Fix broken example links
- Fix broken provisioner links
- Ignore linode.com because of DDOS protection settings
2021-01-06 16:27:12 -05:00
Megan Marsh 28245ec143
Merge pull request #10134 from borancar/feat/azure_pfx_support
Add Azure PFX certificate support
2020-12-18 12:09:17 -08:00
Megan Marsh 88b7b0e14a remove sdk 2020-12-17 13:29:25 -08:00
Megan Marsh 5f34bbd56e add extra line before package declaration so this line does not become the synopsis of a package for godoc 2020-12-16 15:14:43 -08:00
Megan Marsh becf7723e6 move builder/testing to acctest inside sdk 2020-12-03 11:57:06 -08:00
Megan Marsh 8558d1241f move TestUi func to sdk 2020-12-03 10:15:30 -08:00
Megan Marsh 863e20ad65 move builder/testing framework into sdk; it imports the core but I think we just need to accept that. It doesn't expose the core directly to the SDK. 2020-12-02 09:46:42 -08:00
Megan Marsh 39354f64e5 move helper/communicator dir into packer-plugin-sdk
fix imports; fix website and generated partials
2020-12-02 08:41:32 -08:00
Megan Marsh faa3832537 extract builder interface to sdk 2020-12-02 08:41:31 -08:00
Megan Marsh 0eff73293a fix imports, vendoring, and linting 2020-11-30 14:30:30 -08:00
Megan Marsh d5971ca25e fix tests by moving mock hooks and communicators, and BasicUi definition, into SDK 2020-11-30 14:30:30 -08:00
Megan Marsh 56a45b04ab Move hook and communicator definitions to packer-plugin-sdk 2020-11-30 14:30:30 -08:00
Megan Marsh a6fdeca099 move logsecretfilter into packer sdk 2020-11-30 14:30:30 -08:00
Megan Marsh 14bdb9516c move Artifact and artifact mock to the sdk 2020-11-30 14:29:52 -08:00
Megan Marsh c70870cb83 move multierror and multierrorappend into sdk 2020-11-30 14:29:06 -08:00
Megan Marsh 001886670d move Ui definition into the packer plugin sdk. 2020-11-30 14:26:54 -08:00
Megan Marsh ea1ac530b0 move hcl2template kv types into the config/custom_types with trilean definitions 2020-11-18 15:46:59 -08:00
Megan Marsh f8f1ebf0c7 move version and useragent definitions into sdk 2020-11-18 11:42:02 -08:00
Megan Marsh 9e47696dff move helper/config to bundle with the other template definitions 2020-11-18 10:34:59 -08:00
Megan Marsh 3f6deb8828 move multistep into the plugin sdk 2020-11-17 16:31:03 -08:00
Megan Marsh 7d658149ea update tests and website and generated partials to reflect new package format 2020-11-17 10:36:01 -08:00
Megan Marsh e04eaa89e6 move steps and step configs from packer/common to packer/common/commonsteps 2020-11-13 11:15:04 -08:00
Megan Marsh 6402362018 create packer-plugin-sdk directory and begin moving the relevant folders into it. 2020-11-13 10:47:36 -08:00
Megan Marsh 3db40194af version files 2020-11-10 14:48:06 -08:00
Megan Marsh 8ecd16db81 regenerate code 2020-11-10 08:16:59 -08:00
Megan Marsh 1ecd715221 refactor code so that packer/version is not a dependency of sdk code or plugin code 2020-11-09 17:20:42 -08:00
Megan Marsh 88e03280b6
Extract plugin-specific examples to plugin directories (#10228)
* move alicloud examples from common example directory to alicloud builder

* move amazon examples to amazon builder dir

* move examples into ansible provisioner directory

* move azure examples to builder dir

* move hyperone examples into builder directory

* move jdcloud builder examples into builder directory

* move tencent cloud examples into the builder directory

* move ucloud examples into ucloud builder directory
2020-11-09 12:17:41 +01:00
Paul Meyer 5ea90fea5b
Merge pull request #10210 from sumit-kalra/master
[builder/azure-arm] Create keyvaults with SoftDelete enabled
2020-11-06 14:07:41 -08:00
Simon Gottschlag 65b7d3b604
Add Azure CLI authentication (#10157)
Adds the ability to use an active `az login` session for authenticating the Azure builder
2020-11-06 14:24:16 -05:00
Sumit Kalra 2b69a5f496 azure-arm builder: Create keyvaults with SoftDelete enabled 2020-11-02 20:42:55 -08:00
Megan Marsh 72fd763207 fix crash 2020-10-29 14:29:16 -07:00
Adrien Delorme f5e037e8b4 Merge remote-tracking branch 'origin/master' into azr_selectable_temp_keygen_type_gcp 2020-10-26 15:47:29 +01:00
Wilken Rivera a1d69bfe91 Fix liniting issues 2020-10-23 13:52:05 -04:00
Wilken Rivera afd33679f5 builder/azure_arm: Fix build failures due to the deletion of attached managed disks
Previously (prior to v1.6.2) the Azure ARM builder had two delete functions
one that would run before any of the StepDelete* types, and one on deployment template
cleanup. The refactored coded re-introduces the logic from the previously removed
step in v1.6.1 as the main delete logic for the whole deployment
template. Ensuring that all deployed items are deleted before trying to
remove any managed disks.

This change moves all the deletion logic into the
step_deployment_template#Cleanup function to ensure that dependent steps
are only called once the created deployment items (i.e
StepDelateAdditionalDisks) have been deleted.

Test results before change
```

    compute.DisksClient#Delete: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="OperationNotAllowed" Message="Disk pkrdd02e9rzzu5k-1 is attached to VM /subscriptions/1f90521a-24f6-4758-ac3d-88d869fb0bf5/resourceGroups/packer-acceptance-test/providers/Microsoft.Compute/virtualMachines/pkrvm02e9rzzu5k."
--- FAIL: TestBuilderAcc_ManagedDisk_Windows_Build_Resource_Group_Additional_Disk (454.00s)
FAIL
FAIL    github.com/hashicorp/packer/builder/azure/arm   454.008s

```

Test results after change
```
--- PASS: TestBuilderAcc_ManagedDisk_Windows_Build_Resource_Group_Additional_Disk (563.56s)

```

Closes #10070
2020-10-23 13:44:27 -04:00
Megan Marsh 70cb4097e1 review comments, add plugin type for a few missing builders 2020-10-21 16:17:32 -07:00
Megan Marsh c0ce8a9414 rework fixer deprecation code so we know what plugins they relate to 2020-10-21 15:28:59 -07:00
Wilken Rivera a2ba700ac0 Remove deprecated object ids from configs 2020-10-21 13:56:22 -04:00
Adrien Delorme 522d122858 regen all code 2020-10-21 12:04:10 +02:00
Wilken Rivera 1621ab59d8
tests/azure/arm: Update test image name (#10133)
I've run into a few cases where running the full test suite for the ARM
builder would fail because of conflicting image names. This is a
workaround for now the bigger fix is to have the acceptance clean up any
created images.

Results before change
```
the managed image named testBuilderAccManagedDiskWindows-1603151855 already exists in the resource group packer-acceptance-test, use the -force option to automatically delete it.
--- FAIL: TestBuilderAcc_ManagedDisk_Windows_Build_Resource_Group (0.66s)
```

Results after change
```
PASS
ok      github.com/hashicorp/packer/builder/azure/arm   2431.115s

```
2020-10-21 11:12:50 +02:00
Boran Car 9b89439ec2 Rearrange cert add after err check for idiomatic 2020-10-20 22:20:57 +02:00
Boran Car 1082bffddd Add Azure PFX certificate support
Azure typically uses pfx files for service principal authentication.
These are PKCS#12 files so just try and read a cert file as such if we
can't already read it as PEM.
2020-10-20 22:15:38 +02:00
Adrien Delorme 54032d6c11 gen code and docs 2020-10-15 16:51:23 +02:00
Wilken Rivera c7ba5c9a14
Fix line ending issues for test files (#10096) 2020-10-14 11:03:43 +02:00
Megan Marsh d6aa172edc remove typo'd option from docs 2020-10-07 16:14:13 -07:00
Ricardo Rosales 809f38be3a
[azure-chroot] Updating parameter `exlude_from_latest` to `exclude_from_latest` (#10034) 2020-10-07 11:08:33 +02:00
Braunson b2047bd938
Put the correct AzureTags type in StateBag (#10014)
Azure expects the tags format to use a pointer to the string for the map value.
The configuration from the builder is not a pointer so when storing in the state bag for
reference in later execution we convert it when creating the StateBag.

Fixes #10012 and #10013.

* Use the MapToAzureTags helper and error check in resource group creation

* Added test case for tag values not using a pointer

* test/azure/arm: Add test to verify tags stored in state

* test/azure/arm: Add azure_tags to existing acceptance test for Linux

Test Before Fix
```
--- FAIL: TestBuilderAcc_ManagedDisk_Linux (1.81s)
panic: interface conversion: interface {} is map[string]string, not map[string]*string [recovered]
        panic: interface conversion: interface {} is map[string]string, not map[string]*string
FAIL    github.com/hashicorp/packer/builder/azure/arm   1.822s

```

Test After Fix
```
2020/09/29 17:23:03 ui: ==> test: Resource group has been deleted.
--- PASS: TestBuilderAcc_ManagedDisk_Linux (517.41s)
    PASS
    ok      github.com/hashicorp/packer/builder/azure/arm   517.426s
```

Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
2020-09-30 09:55:46 -04:00
Adrien Delorme 654fade0a9
azure arm: make map[string]*string => map[string]string to simplify things (#9985)
* azure arm: make map[string]*string => map[string]string to simplify things
* go generate ./builder/azure/...
* tests !

fix #9984
2020-09-24 12:19:26 +02:00
Sylvia Moss ba74602d63
Allows publishing to a Shared Image Gallery with a different subscription id (#9875) 2020-09-03 17:13:32 +02:00
Megan Marsh e97c56dc72
Merge pull request #9559 from hashicorp/fix_9482
builder/azure-arm: Remove duplicate resource deletion steps
2020-08-12 12:43:09 -07:00