(ctx context.Context, resource *schema.Resource)
| 135 | } |
| 136 | |
| 137 | func (tl *transactionEventLogger) UpdateContext(ctx context.Context, resource *schema.Resource) error { |
| 138 | err := tl.Transaction.UpdateContext(ctx, resource) |
| 139 | if err != nil { |
| 140 | return err |
| 141 | } |
| 142 | if !resource.Schema().StateVersioning() { |
| 143 | return tl.logEvent(ctx, "update", resource, 0) |
| 144 | } |
| 145 | state, err := tl.StateFetch(resource.Schema(), transaction.IDFilter(resource.ID())) |
| 146 | if err != nil { |
| 147 | return err |
| 148 | } |
| 149 | return tl.logEvent(ctx, "update", resource, state.ConfigVersion) |
| 150 | } |
| 151 | |
| 152 | func (tl *transactionEventLogger) Resync(resource *schema.Resource) error { |
| 153 | if !resource.Schema().StateVersioning() { |
no test coverage detected