mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
fis: updates to remove Terraform Provider reserved word collisions
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -183,7 +183,7 @@ func CreateCluster(db *gorm.DB) http.HandlerFunc {
|
||||
c := models.Cluster{
|
||||
OrganizationID: orgID,
|
||||
Name: in.Name,
|
||||
Provider: in.Provider,
|
||||
Provider: in.ClusterProvider,
|
||||
Region: in.Region,
|
||||
Status: models.ClusterStatusPrePending,
|
||||
LastError: "",
|
||||
@@ -255,8 +255,8 @@ func UpdateCluster(db *gorm.DB) http.HandlerFunc {
|
||||
if in.Name != nil {
|
||||
cluster.Name = *in.Name
|
||||
}
|
||||
if in.Provider != nil {
|
||||
cluster.Provider = *in.Provider
|
||||
if in.ClusterProvider != nil {
|
||||
cluster.Provider = *in.ClusterProvider
|
||||
}
|
||||
if in.Region != nil {
|
||||
cluster.Region = *in.Region
|
||||
@@ -1508,6 +1508,12 @@ func clusterToDTO(c models.Cluster) dto.ClusterResponse {
|
||||
controlPlane = &rr
|
||||
}
|
||||
|
||||
var cfqdn *string
|
||||
if captainDomain != nil && controlPlane != nil {
|
||||
fq := fmt.Sprintf("%s.%s", controlPlane.Name, captainDomain.DomainName)
|
||||
cfqdn = &fq
|
||||
}
|
||||
|
||||
var appsLB *dto.LoadBalancerResponse
|
||||
if c.AppsLoadBalancer != nil {
|
||||
lr := loadBalancerToDTO(*c.AppsLoadBalancer)
|
||||
@@ -1530,6 +1536,7 @@ func clusterToDTO(c models.Cluster) dto.ClusterResponse {
|
||||
Name: c.Name,
|
||||
CaptainDomain: captainDomain,
|
||||
ControlPlaneRecordSet: controlPlane,
|
||||
ControlPlaneFQDN: cfqdn,
|
||||
AppsLoadBalancer: appsLB,
|
||||
GlueOpsLoadBalancer: glueOpsLB,
|
||||
BastionServer: bastion,
|
||||
|
||||
Reference in New Issue
Block a user