Skip to content

Commit

Permalink
Add requires replace attribute option
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Jan 22, 2024
1 parent 2c9d8d2 commit 954b4ee
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ type YamlConfigAttribute struct {
StringPatterns []string `yaml:"string_patterns"`
StringMinLength int64 `yaml:"string_min_length"`
StringMaxLength int64 `yaml:"string_max_length"`
RequiresReplace bool `yaml:"requires_replace"`
DefaultValue string `yaml:"default_value"`
Value string `yaml:"value"`
TestValue string `yaml:"test_value"`
Expand Down
1 change: 1 addition & 0 deletions gen/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ attribute:
string_patterns: list(str(), required=False) # List of regular expressions that the string must match, only relevant if type is "String"
string_min_length: int(required=False) # Minimum length of a string, only relevant if type is "String"
string_max_length: int(required=False) # Maximum length of a string, only relevant if type is "String"
requires_replace: bool(required=False) # Set to true if the attribute requires a replace operation
default_value: any(str(), int(), bool(), required=False) # Default value for the attribute
value: any(str(), int(), bool(), required=False) # Hardcoded value for the attribute
test_value: str(required=False) # Value used for acceptance test
Expand Down
37 changes: 36 additions & 1 deletion gen/templates/resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 954b4ee

Please sign in to comment.