Skip to content

Commit

Permalink
Handling a null response for certain values from Private Cloud Applia…
Browse files Browse the repository at this point in the history
…nce Engineered Systems

Signed-off-by: Cameron McLaren <[email protected]>
  • Loading branch information
Cameron McLaren committed Jul 11, 2024
1 parent 7cac9d9 commit 4f67ed5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/service/core/core_instance_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,9 @@ func (s *CoreInstanceResourceCrud) SetData() error {

if s.Res.ExtendedMetadata != nil {
s.D.Set("extended_metadata", tfresource.GenericMapToJsonMap(s.Res.ExtendedMetadata))
} else {
extended_metadata := map[string]interface{}{}
s.D.Set("extended_metadata", extended_metadata)
}

if s.Res.FaultDomain != nil {
Expand Down Expand Up @@ -1728,6 +1731,9 @@ func (s *CoreInstanceResourceCrud) SetData() error {

if s.Res.SystemTags != nil {
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
} else {
system_tags := map[string]interface{}{}
s.D.Set("system_tags", system_tags)
}

if s.Res.TimeCreated != nil {
Expand Down
3 changes: 3 additions & 0 deletions internal/service/core/core_volume_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ func (s *CoreVolumeResourceCrud) SetData() error {

if s.Res.SystemTags != nil {
s.D.Set("system_tags", tfresource.SystemTagsToMap(s.Res.SystemTags))
} else {
system_tags := map[string]interface{}{}
s.D.Set("system_tags", system_tags)
}

if s.Res.TimeCreated != nil {
Expand Down

0 comments on commit 4f67ed5

Please sign in to comment.