builder/azure/common/template: remove unused TemplateBuilder.getResourceByType2() (#8419)

builder/azure/common/template: remove unused TemplateBuilder.toKeyVaultID()
This commit is contained in:
Lars Lehtonen 2019-12-02 09:09:42 -08:00 committed by Adrien Delorme
parent 2c22b9f721
commit df031db9da
1 changed files with 0 additions and 15 deletions

View File

@ -375,25 +375,10 @@ func (s *TemplateBuilder) getResourceByType(t string) (*Resource, error) {
return nil, fmt.Errorf("template: could not find a resource of type %s", t)
}
func (s *TemplateBuilder) getResourceByType2(t string) (**Resource, error) {
for _, x := range *s.template.Resources {
if strings.EqualFold(*x.Type, t) {
p := &x
return &p, nil
}
}
return nil, fmt.Errorf("template: could not find a resource of type %s", t)
}
func (s *TemplateBuilder) setVariable(name string, value string) {
(*s.template.Variables)[name] = value
}
func (s *TemplateBuilder) toKeyVaultID(name string) string {
return s.toResourceID(resourceKeyVaults, name)
}
func (s *TemplateBuilder) toResourceID(id, name string) string {
return fmt.Sprintf("[resourceId(resourceGroup().name, '%s', '%s')]", id, name)
}