Skip to content

Commit 776f727

Browse files
alexng-canuckccushing
authored andcommitted
Fix versionDate setting in SetData
This needs to be converted to string before setting it in state.
1 parent 631c4a2 commit 776f727

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

oci/identity_policies_data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (s *IdentityPoliciesDataSourceCrud) SetData() error {
122122

123123
// TODO: see comment "pending spec/sdk versionDate solution" in identity_policy_resource.go
124124
if r.VersionDate != nil {
125-
policy["version_date"] = *r.VersionDate
125+
policy["version_date"] = r.VersionDate.String()
126126
}
127127

128128
resources = append(resources, policy)

oci/identity_policy_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func (s *PolicyResourceCrud) SetData() error {
376376
}
377377

378378
if s.Res.VersionDate != nil {
379-
s.D.Set("version_date", *s.Res.VersionDate)
379+
s.D.Set("version_date", s.Res.VersionDate.String())
380380
}
381381

382382
return nil

0 commit comments

Comments
 (0)