-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update modules #65
Update modules #65
Conversation
} | ||
|
||
if len(c.Config.Stacks.NamePattern) < 1 { | ||
return nil, errors.New("stack name pattern must be provided in 'stacks.name_pattern' config or 'ATMOS_STACKS_NAME_PATTERN' ENV variable") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 50 is the same as this line
It would be nice to have an errors.go module that housed each of these error messages so could call upon them using errors.stack_pattern_mismatch
or similar to keep it DRY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, common modules would be nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are the same since the functions are used at diff times, and they both need NamePattern
so they check if it exists
} | ||
} else if part == "{stage}" { | ||
if len(stage) == 0 { | ||
return nil, errors.New(fmt.Sprintf("stack name pattern '%s' includes '{stage}', but stage is not provided", c.Config.Stacks.NamePattern)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dupe line from 159
what
why
atmos
code but was modified in Update the provider to use latest stacks and components features. Improve examples and tests terraform-provider-utils#62 - syncatmos
andutils
provider