Skip to content

Commit

Permalink
TO BE REBASED: from hcl-lang nested stage 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Jan 12, 2023
1 parent 69b507e commit 7dd453d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/schema/0.12/connection_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ func connectionBlock(v *version.Version) *schema.BlockSchema {
Attributes: map[string]*schema.AttributeSchema{
"type": {
Expr: schema.ExprConstraints{
schema.LiteralValue{
schema.LegacyLiteralValue{
Val: cty.StringVal("ssh"),
Description: lang.Markdown("Use SSH to connect and provision the instance"),
},
schema.LiteralValue{
schema.LegacyLiteralValue{
Val: cty.StringVal("winrm"),
Description: lang.Markdown("Use WinRM to connect and provision the instance"),
},
Expand Down
4 changes: 2 additions & 2 deletions internal/schema/0.15/connection_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func ConnectionDependentBodies(v *version.Version) map[schema.SchemaKey]*schema.
// See https://github.com/hashicorp/terraform/commit/5b99a56f
bodies[ssh].Attributes["target_platform"] = &schema.AttributeSchema{
Expr: schema.ExprConstraints{
schema.LiteralValue{Val: cty.StringVal("windows")},
schema.LiteralValue{Val: cty.StringVal("unix")},
schema.LegacyLiteralValue{Val: cty.StringVal("windows")},
schema.LegacyLiteralValue{Val: cty.StringVal("unix")},
},
IsOptional: true,
Description: lang.Markdown("The target platform to connect to. " +
Expand Down
6 changes: 3 additions & 3 deletions internal/schema/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func BackendTypesAsExprConstraints(tfVersion *version.Version) schema.ExprConstr
ec := make(schema.ExprConstraints, 0)

for backendType, bs := range backendBodySchemas(tfVersion) {
lv := schema.LiteralValue{
lv := schema.LegacyLiteralValue{
Val: cty.StringVal(backendType),
IsDeprecated: bs.IsDeprecated,
}
Expand All @@ -38,8 +38,8 @@ func BackendTypesAsExprConstraints(tfVersion *version.Version) schema.ExprConstr
}

sort.SliceStable(ec, func(i, j int) bool {
leftVal := ec[i].(schema.LiteralValue)
rightVal := ec[j].(schema.LiteralValue)
leftVal := ec[i].(schema.LegacyLiteralValue)
rightVal := ec[j].(schema.LegacyLiteralValue)
return leftVal.Val.AsString() < rightVal.Val.AsString()
})

Expand Down

0 comments on commit 7dd453d

Please sign in to comment.