packer-cn/builder/azure/chroot
Adrien Delorme 40947c2bf6
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:

```go
package main

import (
	"fmt"

	"github.com/hashicorp/hcl/v2/gohcl"
	"github.com/hashicorp/hcl/v2/hclwrite"
	"github.com/hashicorp/packer/builder/alicloud/ecs"
)

func main() {
	name := "name"
	app := ecs.FlatConfig{
		AlicloudImageName: &name,
		ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
			DiskName: &name,
		},
	}

	f := hclwrite.NewEmptyFile()
	block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
	f.Body().AppendBlock(block)
	fmt.Printf("%s", f.Bytes())
}

```

Will output:

```
source "something" "something" {
  packer_user_variables      = null
  packer_sensitive_variables = null
  image_name                 = "name"
  image_share_account        = null
  image_unshare_account      = null
  image_copy_regions         = null
  image_copy_names           = null
  tags                       = null
  tag                        = null
  system_disk_mapping        = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
  image_disk_mappings        = null
  ssh_remote_tunnels         = null
  ssh_local_tunnels          = null
  ssh_public_key             = null
  ssh_private_key            = null
}
```

This is a good first step for #9015 and #9282 

fix #9304
2020-05-28 11:19:00 +02:00
..
builder.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
builder.hcl2spec.go HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
builder_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
const.go Add more tests 2020-04-08 21:05:26 +00:00
diskattacher.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
diskattacher_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
metadatastub_test.go Stub metadata service for builder tests 2020-04-07 22:49:21 +00:00
packerui_test.go Extract testUI func 2020-04-07 22:49:20 +00:00
shared_image_gallery_destination.go generated & docs 2020-04-07 23:05:09 +00:00
shared_image_gallery_destination.hcl2spec.go HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
shared_image_gallery_destination_test.go Add more tests 2020-04-08 21:05:26 +00:00
step_attach_disk.go Use const for statebag key 2020-04-07 22:49:24 +00:00
step_attach_disk_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_image.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_new_disk.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_new_disk_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_shared_image_version.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_shared_image_version_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_snapshot.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_create_snapshot_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_mount_device.go Move CommandWrapper & ShellCommand to common 2019-10-24 04:06:29 +00:00
step_resolve_plaform_image_version.go Move PIR :latest resolution to step 2020-04-07 22:49:21 +00:00
step_resolve_plaform_image_version_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_verify_shared_image_destination.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_verify_shared_image_destination_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_verify_shared_image_source.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_verify_shared_image_source_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
step_verify_source_disk.go Use subscription id from client set 2020-04-07 22:49:24 +00:00
step_verify_source_disk_test.go [builder/azure-chroot] Shared image source (#9070) 2020-04-23 11:03:17 +02:00
template_funcs.go Add 'vm' template function 2019-10-15 21:14:20 +00:00