packer-cn/builder/azure
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
..
arm Put the correct AzureTags type in StateBag (#10014) 2020-09-30 09:55:46 -04:00
chroot Revert inadvertently-changed import. 2020-08-09 14:31:54 -07:00
common azure arm: make map[string]*string => map[string]string to simplify things (#9985) 2020-09-24 12:19:26 +02:00
dtl ci/tech-debt: Fix vmware acceptance tests (#9636) 2020-07-23 09:40:57 +02:00
pkcs12 spelling: unmarshalling 2018-03-14 03:27:22 +00:00
LICENSE Added MIT license 2016-03-14 20:08:35 -07:00
TODO.md Miscellaneous doc improvements 2018-10-18 19:09:49 -04:00