Skip to content

Commit

Permalink
[TF] Create Designate RecordSet for VIP LB
Browse files Browse the repository at this point in the history
Related: PRODX-44783
Change-Id: I6009ff00a9b7e29d3ef290968b401752f2e08ad5
  • Loading branch information
ibumarskov committed Sep 19, 2024
1 parent a851b4c commit 2550787
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions heat-templates/tf/fragments/AppInstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ parameters:
type: string
description: Protocol for App loadbalancer
default: HTTP
designate_app_dns_zone_id:
type: string

conditions:
deploy_additional_app_listener:
Expand Down Expand Up @@ -378,6 +380,14 @@ resources:
floating_network_id: {get_param: public_network_id}
port_id: {get_attr: [lb, vip_port_id]}

designate_app_vip_recordset:
type: OS::Designate::RecordSet
properties:
name: app-vip
records: [ { get_attr: [ lb_floating, floating_ip_address ] } ]
type: A
zone: { get_param: designate_app_dns_zone_id }

outputs:
app_private_ips:
description: Private IP addresses of app nodes
Expand Down
17 changes: 17 additions & 0 deletions heat-templates/tf/fragments/Network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ resources:
}
]

designate_app_zone_name:
type: OS::Heat::Value
properties:
value:
list_join: [ '', [ { get_param: app_dns_zone_name }, '.' ] ]
type: string

designate_app_zone:
type: OS::Designate::Zone
properties:
name: { get_attr: [ designate_app_zone_name, value ] }
description: String
email: [email protected]

outputs:
database_network_id:
description: The uuid of database network
Expand All @@ -145,3 +159,6 @@ outputs:
app_dns_zone_id:
description: The uuid of refapp APP DNS zone
value: { get_resource: app_vdns }
designate_app_dns_zone_id:
description: The uuid of refapp APP DNS zone
value: { get_resource: designate_app_zone }
1 change: 1 addition & 0 deletions heat-templates/tf/top.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ resources:
instance_02_az: { get_param: app_instance_02_az }
instance_03_az: { get_param: app_instance_03_az }
instance_04_az: { get_param: app_instance_04_az }
designate_app_dns_zone_id: { get_attr: [ network, designate_app_dns_zone_id ] }

app_floatings:
type: ./fragments/AppFloatings.yaml
Expand Down

0 comments on commit 2550787

Please sign in to comment.