mirror of https://github.com/kubernetes/kops.git
Remove redundant literal function. LiteralFromStringValue is more commonly used.
This commit is contained in:
parent
e4ca5a000d
commit
7d845e5c38
|
|
@ -479,9 +479,7 @@ func addNetworks(network *Network, subnet *Subnet, networkInterfaces []*compute.
|
|||
for _, gac := range g.AccessConfigs {
|
||||
tac := &terraformAccessConfig{}
|
||||
natIP := gac.NatIP
|
||||
if strings.HasPrefix(natIP, "${") {
|
||||
tac.NatIP = terraform.LiteralExpression(natIP)
|
||||
} else if natIP != "" {
|
||||
if natIP != "" {
|
||||
tac.NatIP = terraform.LiteralFromStringValue(natIP)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,6 @@ func (l *Literal) MarshalJSON() ([]byte, error) {
|
|||
return json.Marshal(&l.Value)
|
||||
}
|
||||
|
||||
func LiteralExpression(s string) *Literal {
|
||||
return &Literal{Value: s}
|
||||
}
|
||||
|
||||
func LiteralFileExpression(modulePath string) *Literal {
|
||||
return &Literal{
|
||||
Value: fmt.Sprintf("${file(%q)}", modulePath),
|
||||
|
|
|
|||
Loading…
Reference in New Issue