Skip to content

Commit eaa33db

Browse files
fix: include provisioner tags when creating template version (#125)
This was unfortunately missed. There's not a great way to assert that the provisioner tags are even being included in the request. They're stored in the database for each template version, but we don't expose a way to retrieve them and verify they were sent. Treating as hotfix and merging.
1 parent 9321b39 commit eaa33db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/provider/template_resource.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,13 +1087,18 @@ func newVersion(ctx context.Context, client *codersdk.Client, req newVersionRequ
10871087
Value: variable.Value.ValueString(),
10881088
})
10891089
}
1090+
provTags := make(map[string]string, len(req.Version.ProvisionerTags))
1091+
for _, provisionerTag := range req.Version.ProvisionerTags {
1092+
provTags[provisionerTag.Name.ValueString()] = provisionerTag.Value.ValueString()
1093+
}
10901094
tmplVerReq := codersdk.CreateTemplateVersionRequest{
10911095
Name: req.Version.Name.ValueString(),
10921096
Message: req.Version.Message.ValueString(),
10931097
StorageMethod: codersdk.ProvisionerStorageMethodFile,
10941098
Provisioner: codersdk.ProvisionerTypeTerraform,
10951099
FileID: uploadResp.ID,
10961100
UserVariableValues: vars,
1101+
ProvisionerTags: provTags,
10971102
}
10981103
if req.TemplateID != nil {
10991104
tmplVerReq.TemplateID = *req.TemplateID

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy