|
|
|
|
@ -110,6 +110,12 @@ func TestConvertSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: []byte(`"number"`),
|
|
|
|
|
Required: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "write_only",
|
|
|
|
|
Type: []byte(`"string"`),
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Computed: true,
|
|
|
|
|
@ -230,6 +236,11 @@ func TestConvertSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: cty.Number,
|
|
|
|
|
Required: true,
|
|
|
|
|
},
|
|
|
|
|
"write_only": {
|
|
|
|
|
Type: cty.String,
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Computed: true,
|
|
|
|
|
@ -410,6 +421,25 @@ func TestConvertProtoSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: []byte(`["list","bool"]`),
|
|
|
|
|
Computed: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "object",
|
|
|
|
|
NestedType: &proto.Schema_Object{
|
|
|
|
|
Nesting: proto.Schema_Object_SINGLE,
|
|
|
|
|
Attributes: []*proto.Schema_Attribute{
|
|
|
|
|
{
|
|
|
|
|
Name: "optional",
|
|
|
|
|
Type: []byte(`"string"`),
|
|
|
|
|
Optional: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "write_only",
|
|
|
|
|
Type: []byte(`"string"`),
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "optional",
|
|
|
|
|
Type: []byte(`"string"`),
|
|
|
|
|
@ -426,6 +456,12 @@ func TestConvertProtoSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: []byte(`"number"`),
|
|
|
|
|
Required: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "write_only",
|
|
|
|
|
Type: []byte(`"string"`),
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
&configschema.Block{
|
|
|
|
|
@ -434,6 +470,22 @@ func TestConvertProtoSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: cty.List(cty.Bool),
|
|
|
|
|
Computed: true,
|
|
|
|
|
},
|
|
|
|
|
"object": {
|
|
|
|
|
NestedType: &configschema.Object{
|
|
|
|
|
Nesting: configschema.NestingSingle,
|
|
|
|
|
Attributes: map[string]*configschema.Attribute{
|
|
|
|
|
"optional": {
|
|
|
|
|
Type: cty.String,
|
|
|
|
|
Optional: true,
|
|
|
|
|
},
|
|
|
|
|
"write_only": {
|
|
|
|
|
Type: cty.String,
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"optional": {
|
|
|
|
|
Type: cty.String,
|
|
|
|
|
Optional: true,
|
|
|
|
|
@ -447,6 +499,11 @@ func TestConvertProtoSchemaBlocks(t *testing.T) {
|
|
|
|
|
Type: cty.Number,
|
|
|
|
|
Required: true,
|
|
|
|
|
},
|
|
|
|
|
"write_only": {
|
|
|
|
|
Type: cty.String,
|
|
|
|
|
Optional: true,
|
|
|
|
|
WriteOnly: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|