Class: TerraBoi::TfCertGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/terra_boi/tf_cert_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#application_nameObject

Returns the value of attribute application_name.



5
6
7
# File 'lib/generators/terra_boi/tf_cert_generator.rb', line 5

def application_name
  @application_name
end

#class_optionsObject

Returns the value of attribute class_options.



5
6
7
# File 'lib/generators/terra_boi/tf_cert_generator.rb', line 5

def class_options
  @class_options
end

Instance Method Details

#create_certObject



23
24
25
26
# File 'lib/generators/terra_boi/tf_cert_generator.rb', line 23

def create_cert
	template "cert/main.tf.erb", "terraform/cert/main.tf"
	template "cert/var.tf.erb", "terraform/cert/var.tf"
end

#initObject



17
18
19
20
21
# File 'lib/generators/terra_boi/tf_cert_generator.rb', line 17

def init
	# defined in lib/generators/extensions
	self.application_name = generate_application_name
	self.class_options = options
end