chore(terraform): use a util func to build internal terraform id (#869)
This commit is contained in:
parent
801ef6033d
commit
b313ef6a39
72 changed files with 205 additions and 538 deletions
|
|
@ -415,14 +415,9 @@ func mapFields(schedule *serverupdate.UpdateSchedule, model *Model, region strin
|
|||
}
|
||||
|
||||
model.UpdateScheduleId = types.Int64PointerValue(schedule.Id)
|
||||
idParts := []string{
|
||||
model.ProjectId.ValueString(),
|
||||
region,
|
||||
model.ServerId.ValueString(),
|
||||
model.ID = utils.BuildInternalTerraformId(
|
||||
model.ProjectId.ValueString(), region, model.ServerId.ValueString(),
|
||||
strconv.FormatInt(model.UpdateScheduleId.ValueInt64(), 10),
|
||||
}
|
||||
model.ID = types.StringValue(
|
||||
strings.Join(idParts, core.Separator),
|
||||
)
|
||||
model.Name = types.StringPointerValue(schedule.Name)
|
||||
model.Rrule = types.StringPointerValue(schedule.Rrule)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue