We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35eed83 commit e771f41Copy full SHA for e771f41
oci/core_instance_resource.go
@@ -557,6 +557,16 @@ func (s *InstanceResourceCrud) Update() error {
557
558
response, err := s.Client.UpdateInstance(context.Background(), request)
559
if err != nil {
560
+ if response.RawResponse.StatusCode == 400 &&
561
+ strings.Contains(err.Error(), "metadata field cannot be updated") {
562
+ return fmt.Errorf(`%s
563
+
564
+To change 'ssh_authorized_keys' or 'user_data' properties in the
565
+'metadata' field, the resource must be tainted and recreated.
566
+Use the terraform "taint" command to target this resource then
567
+run apply again.`, err)
568
+ }
569
570
return err
571
}
572
0 commit comments