You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Cannot set value for this attribute as the provider has marked it as read-only. Remove the configuration line setting the value.\n\n"+
114
-
"Refer to the provider documentation or contact the provider developers for additional information about configurable and read-only attributes that are supported.",
115
-
)
116
-
}
104
+
// Dynamic values need to perform more logic to check the config value for null/unknown-ness
"Cannot set value for this attribute as the provider has marked it as read-only. Remove the configuration line setting the value.\n\n"+
123
+
"Refer to the provider documentation or contact the provider developers for additional information about configurable and read-only attributes that are supported.",
124
+
)
125
+
}
131
126
132
-
// If the client doesn't support write-only attributes (first supported in Terraform v1.11.0), then we raise an early validation error
133
-
// to avoid a confusing data consistency error when the provider attempts to return "null" for a write-only attribute in the planned/final state.
134
-
//
135
-
// Write-only attributes can only be successfully used with a supporting client, so the only option for a practitoner to utilize a write-only attribute
136
-
// is to upgrade their Terraform CLI version to v1.11.0 or later.
fmt.Sprintf("The resource contains a non-null value for WriteOnly attribute %s. Write-only attributes are only supported in Terraform 1.11 and later.", req.AttributePath.String()),
142
-
)
143
-
}
127
+
// Terraform CLI does not automatically perform certain configuration
128
+
// checks yet. If it eventually does, this logic should remain at least
129
+
// until Terraform CLI versions 0.12 through the release containing the
fmt.Sprintf("Must set a configuration value for the %s attribute as the provider has marked it as required.\n\n", req.AttributePath.String())+
137
+
"Refer to the provider documentation or contact the provider developers for additional information about configurable attributes that are required.",
138
+
)
139
+
}
140
+
141
+
// If the client doesn't support write-only attributes (first supported in Terraform v1.11.0), then we raise an early validation error
142
+
// to avoid a confusing data consistency error when the provider attempts to return "null" for a write-only attribute in the planned/final state.
143
+
//
144
+
// Write-only attributes can only be successfully used with a supporting client, so the only option for a practitoner to utilize a write-only attribute
145
+
// is to upgrade their Terraform CLI version to v1.11.0 or later.
fmt.Sprintf("The resource contains a non-null value for WriteOnly attribute %s. Write-only attributes are only supported in Terraform 1.11 and later.", req.AttributePath.String()),
151
+
)
152
+
}
153
+
} else {
154
+
// Terraform CLI does not automatically perform certain configuration
155
+
// checks yet. If it eventually does, this logic should remain at least
156
+
// until Terraform CLI versions 0.12 through the release containing the
"Cannot set value for this attribute as the provider has marked it as read-only. Remove the configuration line setting the value.\n\n"+
164
+
"Refer to the provider documentation or contact the provider developers for additional information about configurable and read-only attributes that are supported.",
165
+
)
166
+
}
167
+
168
+
// Terraform CLI does not automatically perform certain configuration
169
+
// checks yet. If it eventually does, this logic should remain at least
170
+
// until Terraform CLI versions 0.12 through the release containing the
fmt.Sprintf("Must set a configuration value for the %s attribute as the provider has marked it as required.\n\n", req.AttributePath.String())+
178
+
"Refer to the provider documentation or contact the provider developers for additional information about configurable attributes that are required.",
179
+
)
180
+
}
144
181
182
+
// If the client doesn't support write-only attributes (first supported in Terraform v1.11.0), then we raise an early validation error
183
+
// to avoid a confusing data consistency error when the provider attempts to return "null" for a write-only attribute in the planned/final state.
184
+
//
185
+
// Write-only attributes can only be successfully used with a supporting client, so the only option for a practitoner to utilize a write-only attribute
186
+
// is to upgrade their Terraform CLI version to v1.11.0 or later.
fmt.Sprintf("The resource contains a non-null value for WriteOnly attribute %s. Write-only attributes are only supported in Terraform 1.11 and later.", req.AttributePath.String()),
0 commit comments