Skip to content

Commit 505f74f

Browse files
committed
Fix: Update number of allowed resource tags
1 parent 0d07e87 commit 505f74f

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

.web-docs/components/builder/arm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Providing `temp_resource_group_name` or `location` in combination with
312312

313313
- `azure_tags` (map[string]string) - Name/value pair tags to apply to every resource deployed i.e. Resource
314314
Group, VM, NIC, VNET, Public IP, KeyVault, etc. The user can define up
315-
to 15 tags. Tag names cannot exceed 512 characters, and tag values
315+
to 50 tags. Tag names cannot exceed 512 characters, and tag values
316316
cannot exceed 256 characters.
317317

318318
- `azure_tag` ([]{name string, value string}) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block

.web-docs/components/builder/dtl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ options. In addition to the options listed here, a [communicator](/packer/docs/t
127127
type for a managed image. Valid values are Standard_LRS and Premium_LRS.
128128
The default is Standard_LRS.
129129

130-
- `azure_tags` (map[string]string) - the user can define up to 15
130+
- `azure_tags` (map[string]string) - the user can define up to 50
131131
tags. Tag names cannot exceed 512 characters, and tag values cannot exceed
132132
256 characters. Tags are applied to every resource deployed by a Packer
133133
build, i.e. Resource Group, VM, NIC, VNET, Public IP, KeyVault, etc.

builder/azure/arm/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ type Config struct {
389389
ManagedImageZoneResilient bool `mapstructure:"managed_image_zone_resilient" required:"false"`
390390
// Name/value pair tags to apply to every resource deployed i.e. Resource
391391
// Group, VM, NIC, VNET, Public IP, KeyVault, etc. The user can define up
392-
// to 15 tags. Tag names cannot exceed 512 characters, and tag values
392+
// to 50 tags. Tag names cannot exceed 512 characters, and tag values
393393
// cannot exceed 256 characters.
394394
AzureTags map[string]string `mapstructure:"azure_tags" required:"false"`
395395
// Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
@@ -1128,8 +1128,8 @@ func provideDefaultValues(c *Config) {
11281128
}
11291129

11301130
func assertTagProperties(c *Config, errs *packersdk.MultiError) {
1131-
if len(c.AzureTags) > 15 {
1132-
errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("a max of 15 tags are supported, but %d were provided", len(c.AzureTags)))
1131+
if len(c.AzureTags) > 50 {
1132+
errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("a max of 50 tags are supported, but %d were provided", len(c.AzureTags)))
11331133
}
11341134

11351135
for k, v := range c.AzureTags {

builder/azure/arm/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ func TestPlanInfoPromotionCode(t *testing.T) {
20962096
// exceeds the max tag amount, the builder should reject the configuration.
20972097
func TestPlanInfoTooManyTagsErrors(t *testing.T) {
20982098
exactMaxNumberOfTags := map[string]string{}
2099-
for i := 0; i < 15; i++ {
2099+
for i := 0; i < 50; i++ {
21002100
exactMaxNumberOfTags[fmt.Sprintf("tag%.2d", i)] = "ignored"
21012101
}
21022102

builder/azure/dtl/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ func provideDefaultValues(c *Config) error {
573573
}
574574

575575
func assertTagProperties(c *Config, errs *packersdk.MultiError) {
576-
if len(c.AzureTags) > 15 {
577-
errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("a max of 15 tags are supported, but %d were provided", len(c.AzureTags)))
576+
if len(c.AzureTags) > 50 {
577+
errs = packersdk.MultiErrorAppend(errs, fmt.Errorf("a max of 50 tags are supported, but %d were provided", len(c.AzureTags)))
578578
}
579579

580580
for k, v := range c.AzureTags {

docs-partials/builder/azure/arm/Config-not-required.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174

175175
- `azure_tags` (map[string]string) - Name/value pair tags to apply to every resource deployed i.e. Resource
176176
Group, VM, NIC, VNET, Public IP, KeyVault, etc. The user can define up
177-
to 15 tags. Tag names cannot exceed 512 characters, and tag values
177+
to 50 tags. Tag names cannot exceed 512 characters, and tag values
178178
cannot exceed 256 characters.
179179

180180
- `azure_tag` ([]{name string, value string}) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block

0 commit comments

Comments
 (0)