packer-cn/builder/azure/dtl
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
..
TestVirtualMachineDeployment05.approved.txt Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
WindowsMixAndMatch.json Updating the credentials to be picked up from environment variables. 2020-04-02 17:18:00 -07:00
WindowsSimple.json Updating the credentials to be picked up from environment variables. 2020-04-02 17:18:00 -07:00
acceptancetest.json Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
artifact.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
azure_client.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
azure_error_response.go Fixing the linting errors now required for merging 2020-04-02 17:22:16 -07:00
azure_error_response_test.TestAzureErrorNestedShouldFormat.approved.txt Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
azure_error_response_test.TestAzureErrorSimpleShouldFormat.approved.txt Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
azure_error_response_test.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
builder.go [builder/azure-arm] Use VM/build location for image location (#9068) 2020-04-17 05:43:03 -04:00
builder_acc_test.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
builder_test.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
capture_template.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
capture_template_test.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
config.go update generated pages after rebase 2020-04-07 17:53:26 -04:00
config.hcl2spec.go HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
config_test.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
inspector.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
openssh_key_pair.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
openssh_key_pair_test.go Fixing the linting errors now required for merging 2020-04-02 17:22:16 -07:00
resource_resolver.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
step.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
step_capture_image.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
step_delete_virtual_machine.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
step_deploy_template.go Fixing issues due to merge. 2020-04-02 17:25:41 -07:00
step_power_off_compute.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
step_publish_to_shared_image_gallery.go Fixing the linting errors now required for merging 2020-04-02 17:22:16 -07:00
step_save_winrm_password.go Replace file shared state by statebag (#9238) 2020-05-19 11:49:48 +02:00
step_test.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
template_factory.go Added acceptance tests for DTL. Fixed couple of issues with DTL root resource group not set to new directory 2020-04-02 17:23:21 -07:00
template_funcs.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
template_funcs_test.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00
tempname.go Updating the modules to include update to autorest 12.4 2020-04-02 17:13:36 -07:00