Module: Glb::Lb::Names
- Included in:
- Resource
- Defined in:
- lib/glb/lb/names.rb
Instance Method Summary collapse
- #backend_service_name ⇒ Object
- #build_name(name, type, infix = nil) ⇒ Object
- #firewall_rule_name ⇒ Object
-
#forwarding_rule_https_name ⇒ Object
Note: forwarding rules for https must be differently named from the http one Google considers them the type of resources.
- #forwarding_rule_name ⇒ Object
- #health_check_name ⇒ Object
-
#network ⇒ Object
firewall_rule_name network method to be defined in the class defined here to make easier to follow.
- #target_http_proxy_name ⇒ Object
-
#target_https_proxy_name ⇒ Object
Note: target_https_proxy name can be the same as target_http_proxy name Google considers them different types of resources.
- #url_map_name ⇒ Object
Instance Method Details
#backend_service_name ⇒ Object
17 18 19 |
# File 'lib/glb/lb/names.rb', line 17 def backend_service_name build_name(@name, 'backend-service') # IE: demo-backend-service-dev end |
#build_name(name, type, infix = nil) ⇒ Object
45 46 47 48 |
# File 'lib/glb/lb/names.rb', line 45 def build_name(name, type, infix=nil) type = nil unless config.naming.include_type [name, type, infix, Glb.env, Glb.extra].compact.join('-') # IE: demo-health-check-dev end |
#firewall_rule_name ⇒ Object
3 4 5 |
# File 'lib/glb/lb/names.rb', line 3 def firewall_rule_name build_name("#{network}-#{@name}", 'firewall-rule') # IE: dev-demo-dev end |
#forwarding_rule_https_name ⇒ Object
Note: forwarding rules for https must be differently named from the http one Google considers them the type of resources.
41 42 43 |
# File 'lib/glb/lb/names.rb', line 41 def forwarding_rule_https_name build_name(@name, 'forwarding-rule', 'https') # IE: demo-forwarding-rule-https-dev end |
#forwarding_rule_name ⇒ Object
29 30 31 |
# File 'lib/glb/lb/names.rb', line 29 def forwarding_rule_name build_name(@name, 'forwarding-rule') end |
#health_check_name ⇒ Object
13 14 15 |
# File 'lib/glb/lb/names.rb', line 13 def health_check_name build_name(@name, 'health-check') # IE: demo-health-check-dev end |
#network ⇒ Object
firewall_rule_name network method to be defined in the class defined here to make easier to follow
9 10 11 |
# File 'lib/glb/lb/names.rb', line 9 def network Glb.config.firewall_rule.network end |
#target_http_proxy_name ⇒ Object
25 26 27 |
# File 'lib/glb/lb/names.rb', line 25 def target_http_proxy_name build_name(@name, 'target-http-proxy') # IE: demo-target-http-proxy-dev end |
#target_https_proxy_name ⇒ Object
Note: target_https_proxy name can be the same as target_http_proxy name Google considers them different types of resources.
35 36 37 |
# File 'lib/glb/lb/names.rb', line 35 def target_https_proxy_name build_name(@name, 'target-https-proxy') # IE: demo-target-https-proxy-dev end |
#url_map_name ⇒ Object
21 22 23 |
# File 'lib/glb/lb/names.rb', line 21 def url_map_name build_name(@name, 'url-map') # IE: demo-url-map-dev end |