Module: GClouder::Resources::DNS::Zone

Includes:
Config::Project
Defined in:
lib/gclouder/resources/dns.rb

Class Method Summary collapse

Methods included from Config::Project

load, #project, project

Methods included from Helpers

#hash_to_args, included, #module_exists?, #to_arg, #to_deep_merge_hash, #valid_json?

Methods included from Logging

#add, #bad, #change, #debug, #error, #fatal, #good, included, #info, log, loggers, #remove, report, #resource_state, setup, #warn, #warning

Class Method Details

.ensure(project_id, name, zone) ⇒ Object



197
198
199
200
201
202
# File 'lib/gclouder/resources/dns.rb', line 197

def self.ensure(project_id, name, zone)
  extra_info = (project_id != project["project_id"]) ? "[#{project_id}]" : ""

  Resource.ensure :"dns managed-zones", name,
    "--dns-name=#{zone} --description='Created by GClouder'", project_id: project_id, extra_info: extra_info
end