-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow running without cluster.yml when tf_json present #1418
base: master
Are you sure you want to change the base?
Conversation
@@ -45,8 +45,8 @@ def default_config_yaml | |||
Pharos::YamlFile.new($stdin, force_erb: true, override_filename: '<stdin>') | |||
else | |||
cluster_config = Dir.glob('cluster.{yml,yml.erb}').first | |||
signal_usage_error 'File does not exist: cluster.yml' if cluster_config.nil? | |||
Pharos::YamlFile.new(cluster_config) | |||
signal_usage_error 'File does not exist: cluster.yml' if cluster_config.nil? && !tf_json |
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.
Is tf_json
always available?
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.
Now it checks .nil?
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.
I meant: will self.respond_to?(:tf_json)
always?
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.
Not in terraform apply
, it only has --config
.
With TF 0.12 it's possible to generate the full config from TF, no need to provider cluster.yml then.