Skip to content

Commit

Permalink
Fix trailing comma in data source conf DNS
Browse files Browse the repository at this point in the history
Fixes #2.

Any config data source with at least one DNS value set was affected.
  • Loading branch information
OJFord committed Mar 31, 2021
1 parent 58ef3d8 commit 735daa0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/data-sources/config_document.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ data "wireguard_config_document" "peer1" {
]
}
}
output "peer1" {
value = data.wireguard_config_document.peer1.conf
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ data "wireguard_config_document" "peer1" {
]
}
}

output "peer1" {
value = data.wireguard_config_document.peer1.conf
}
2 changes: 1 addition & 1 deletion provider/data_source_wireguard_config_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Address = {{ . }}
{{- end }}
{{- if .DNS }}
DNS = {{ range .DNS }}{{ . }},{{ end }}
DNS = {{ range $i, $d := .DNS }}{{ if $i }},{{ end }}{{ $d }}{{ end }}
{{- end }}
{{- if .MTU }}
Expand Down

0 comments on commit 735daa0

Please sign in to comment.