Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 632 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 632 Bytes

R017

The R017 analyzer reports (*schema.ResourceData).SetId() usage with unstable time.Now() value. Schema attributes should be stable across Terraform runs.

Flagged Code

d.SetId(time.Now().Format(time.RFC3339))

Passing Code

d.SetId("stablestring")

Ignoring Reports

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

//lintignore:R017
d.SetId(time.Now().Format(time.RFC3339))