File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ package provider
44
55import (
66 "context"
7+ "time"
78
89 "github.com/hashicorp/terraform/helper/schema"
910
@@ -117,6 +118,10 @@ func (s *ConfigurationResourceCrud) Update() error {
117118 return err
118119 }
119120
121+ // Workaround: Sleep for some time before polling the configuration. Because update happens asynchronously, polling too
122+ // soon may result in service returning stale configuration values.
123+ time .Sleep (time .Second * 5 )
124+
120125 // Requests to update the retention policy may succeed instantly but may not see the actual update take effect
121126 // until minutes later. Add polling here to return only when the change has taken effect.
122127 retentionPolicyFunc := func () bool { return * s .Res .RetentionPeriodDays == * request .RetentionPeriodDays }
You can’t perform that action at this time.
0 commit comments