Skip to content

Commit

Permalink
include template_ids in library variable set datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
benPearce1 committed Jun 20, 2024
1 parent 8f74d1c commit a225cf2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions octopusdeploy/schema_library_variable_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ func flattenLibraryVariableSet(libraryVariableSet *variables.LibraryVariableSet)
return nil
}

templateIds := map[string]string{}
if libraryVariableSet.Templates != nil {
for _, template := range libraryVariableSet.Templates {
templateIds[template.Name] = template.GetID()
}
}

return map[string]interface{}{
"description": libraryVariableSet.Description,
"id": libraryVariableSet.GetID(),
"name": libraryVariableSet.Name,
"space_id": libraryVariableSet.SpaceID,
"template": flattenActionTemplateParameters(libraryVariableSet.Templates),
"variable_set_id": libraryVariableSet.VariableSetID,
"template_ids": templateIds,
}
}

Expand Down

0 comments on commit a225cf2

Please sign in to comment.