Skip to content

Commit

Permalink
Fix image output
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Schwarz <[email protected]>
  • Loading branch information
rswrz committed Sep 20, 2024
1 parent 9aec2a3 commit 29f59a9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,12 +799,15 @@ Attributes:

Attribute | Description
-- | --
`publisher` | The publisher of the image.
`offer` | The offer of the image.
`sku` | The SKU of the image.
`version` | The version of the image.
`architecture` | The virtual machine achitecture. Can be `x86` or `arm64`.
`operating_system` | The operating system. Can be `Windows` or `Linux`.
`architecture` | The image architecture.
`offer` | The image offer.
`operating_system` | The image operating system.
`publisher` | The image publisher.
`sku` | The image Stock Keeping Unit (SKU).
`urn` | The full image URN.
`urnAlias` | The image alias URN.
|| **NOTE**: Only [Azure Image Quick start templates](#azure-image-quick-start-templates) have an alias URN
`version` | The image version.

### <a name="output_key_vault_secret_id"></a> [key\_vault\_secret\_id](#output\_key\_vault\_secret\_id)

Expand Down
18 changes: 10 additions & 8 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,18 @@ output "image" {
Attribute | Description
-- | --
`publisher` | The publisher of the image.
`offer` | The offer of the image.
`sku` | The SKU of the image.
`version` | The version of the image.
`architecture` | The virtual machine achitecture. Can be `x86` or `arm64`.
`operating_system` | The operating system. Can be `Windows` or `Linux`.
`architecture` | The image architecture.
`offer` | The image offer.
`operating_system` | The image operating system.
`publisher` | The image publisher.
`sku` | The image Stock Keeping Unit (SKU).
`urn` | The full image URN.
`urnAlias` | The image alias URN.
|| **NOTE**: Only [Azure Image Quick start templates](#azure-image-quick-start-templates) have an alias URN
`version` | The image version.
EOT

value = local.image_full
value = local.image
}

output "key_vault_secret_id" {
Expand Down
2 changes: 1 addition & 1 deletion tests/local/input_image.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ run "should_image_result_in_expected_output" {
condition = output.image == tomap({
architecture = "x64"
offer = "WindowsServer"
operating_system = "Windows"
publisher = "MicrosoftWindowsServer"
sku = "2022-datacenter-g2"
urn = "MicrosoftWindowsServer:WindowsServer:2022-datacenter-g2:latest"
urnAlias = "Win2022Datacenter"
version = "latest"
operating_system = "Windows"
})
error_message = "Output image not equal to expected value"
}
Expand Down

0 comments on commit 29f59a9

Please sign in to comment.