(vv map[string]backend.UnparsedVariableValue, decls map[string]*configs.Variable)
| 192 | } |
| 193 | |
| 194 | func stubAllVariables(vv map[string]backend.UnparsedVariableValue, decls map[string]*configs.Variable) tofu.InputValues { |
| 195 | ret := make(tofu.InputValues, len(decls)) |
| 196 | |
| 197 | for name, cfg := range decls { |
| 198 | raw, exists := vv[name] |
| 199 | if !exists { |
| 200 | ret[name] = &tofu.InputValue{ |
| 201 | Value: cty.UnknownVal(cfg.Type), |
| 202 | SourceType: tofu.ValueFromConfig, |
| 203 | } |
| 204 | continue |
| 205 | } |
| 206 | |
| 207 | val, diags := raw.ParseVariableValue(cfg.ParsingMode) |
| 208 | if diags.HasErrors() { |
| 209 | ret[name] = &tofu.InputValue{ |
| 210 | Value: cty.UnknownVal(cfg.Type), |
| 211 | SourceType: tofu.ValueFromConfig, |
| 212 | } |
| 213 | continue |
| 214 | } |
| 215 | ret[name] = val |
| 216 | } |
| 217 | |
| 218 | return ret |
| 219 | } |
| 220 | |
| 221 | // remoteStoredVariableValue is a backend.UnparsedVariableValue implementation |
| 222 | // that translates from the go-tfe representation of stored variables into |
no test coverage detected