S035

SchemasStandard

check for Schema with invalid AtLeastOneOf attribute references

The S035 analyzer reports cases of Schemas which include AtLeastOneOf and have invalid schema attribute references.

Note

This only verifies the syntax of attribute references. The Terraform Plugin SDK can unit test attribute references to verify the references against the full schema.

Examples

&schema.Schema{
    AtLeastOneOf: []string{"config_block_attr.nested_attr"},
}
&schema.Schema{
    AtLeastOneOf: []string{"config_block_attr.0.nested_attr"},
}

Ignoring reports

Singular reports can be ignored by adding a //lintignore:S035 Go code comment at the end of the offending line or on the line immediately preceding, e.g.

//lintignore:S035
&schema.Schema{
    AtLeastOneOf: []string{"config_block_attr.nested_attr"},
}

This page is generated from passes/S035/README.md, which lives beside the analyzer.