Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 9added4

Browse files
authored
include template_ids in library variable set datasource (#651)
1 parent 8f74d1c commit 9added4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

octopusdeploy/schema_library_variable_set.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,21 @@ func flattenLibraryVariableSet(libraryVariableSet *variables.LibraryVariableSet)
3939
return nil
4040
}
4141

42+
templateIds := map[string]string{}
43+
if libraryVariableSet.Templates != nil {
44+
for _, template := range libraryVariableSet.Templates {
45+
templateIds[template.Name] = template.GetID()
46+
}
47+
}
48+
4249
return map[string]interface{}{
4350
"description": libraryVariableSet.Description,
4451
"id": libraryVariableSet.GetID(),
4552
"name": libraryVariableSet.Name,
4653
"space_id": libraryVariableSet.SpaceID,
4754
"template": flattenActionTemplateParameters(libraryVariableSet.Templates),
4855
"variable_set_id": libraryVariableSet.VariableSetID,
56+
"template_ids": templateIds,
4957
}
5058
}
5159

0 commit comments

Comments
 (0)