Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-rodrigues committed Jul 13, 2022
1 parent 7e9468c commit 5466a75
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions resources/types/aws/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (r AwsDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseReso
SubnetId: r.Args.SubnetId,
Host: host,
ConnectionUsername: r.Args.Username,
GcpOverride: r.Args.GcpOverride,
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions resources/types/azure/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (r AzureDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseRe
SubnetId: r.Args.SubnetId,
Host: host,
ConnectionUsername: fmt.Sprintf("%s@%s", r.Args.Username, host),
GcpOverride: r.Args.GcpOverride,
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions resources/types/gcp/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (r GcpDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseReso
SubnetId: r.Args.SubnetId,
Host: host,
ConnectionUsername: r.Args.Username,
GcpOverride: r.Args.GcpOverride,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion resources/types/gcp/kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r GcpKubernetesCluster) Translate(ctx resources.MultyContext) ([]output.Tf
}

func (r GcpKubernetesCluster) getServiceAccountId() string {
return common.UniqueId(r.Args.Name, "-sa-", common.LowercaseAlphanumericAndDashFormatFunc)
return common.UniqueId(fmt.Sprintf("%s-%s", r.Args.Name, r.ResourceId), "-sa-", common.LowercaseAlphanumericAndDashFormatFunc)
}

func (r GcpKubernetesCluster) GetMainResourceName() (string, error) {
Expand Down

0 comments on commit 5466a75

Please sign in to comment.