Merge pull request #20339 from hashicorp/td-UnsafeSetFieldRaw-deprecation

helper/schema: Add deprecation to ResourceData.UnsafeSetFieldRaw
This commit is contained in:
Brian Flad 2019-02-14 12:51:21 -05:00 committed by GitHub
commit 58eba8fe9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,8 @@ type getResult struct {
// UnsafeSetFieldRaw allows setting arbitrary values in state to arbitrary // UnsafeSetFieldRaw allows setting arbitrary values in state to arbitrary
// values, bypassing schema. This MUST NOT be used in normal circumstances - // values, bypassing schema. This MUST NOT be used in normal circumstances -
// it exists only to support the remote_state data source. // it exists only to support the remote_state data source.
//
// Deprecated: Fully define schema attributes and use Set() instead.
func (d *ResourceData) UnsafeSetFieldRaw(key string, value string) { func (d *ResourceData) UnsafeSetFieldRaw(key string, value string) {
d.once.Do(d.init) d.once.Do(d.init)