great-sundown-78827
02/22/2024, 5:49 PMTeam
component resource that creates a PagerDuty team and a Grafana Team. Can I create a function addMember(email: string)
that is callable to add members to the team,, and do some kind of lazy instantiation of the underlying PD and Grafana resources?hundreds-gpu-71155
02/22/2024, 5:56 PMhundreds-gpu-71155
02/22/2024, 5:58 PMlittle-cartoon-10569
02/22/2024, 6:33 PMbuild()
method or similar, to construct the actual resource. The constructor won't be able to do it.
And of course, your resource will have to be optional or at least not readonly
, since it won't be set in the constructor.hundreds-gpu-71155
02/22/2024, 6:34 PMlittle-cartoon-10569
02/22/2024, 6:35 PMhundreds-gpu-71155
02/22/2024, 6:35 PMbuild()
is calledlittle-cartoon-10569
02/22/2024, 6:35 PMlittle-cartoon-10569
02/22/2024, 6:36 PMlittle-cartoon-10569
02/22/2024, 6:36 PMlittle-cartoon-10569
02/22/2024, 6:37 PMbuild()
function creates the NACL with all the rules that were prepared by calls to the addRule()
member.hundreds-gpu-71155
02/22/2024, 6:37 PMlittle-cartoon-10569
02/22/2024, 6:38 PMGroup
and User
, you can create the Group in the connstructor, and create Users and UserGroupMappings (or whatever they're called) in an addUser()
method.little-cartoon-10569
02/22/2024, 6:38 PMbuild()
.little-cartoon-10569
02/22/2024, 6:40 PMlittle-cartoon-10569
02/22/2024, 6:40 PMgreat-sundown-78827
02/23/2024, 8:51 PM