Skip to content

Commit 400a048

Browse files
committed
initial
0 parents  commit 400a048

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7962
-0
lines changed

.copywrite.hcl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "BSD-2-Clause"
5+
copyright_holder = "Florian Maury"
6+
copyright_year = 2025
7+
8+
header_ignore = [
9+
"vendor/**",
10+
"tools/**",
11+
"docs/**",
12+
"examples/**",
13+
]
14+
}

.goreleaser.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
version: 2
4+
before:
5+
hooks:
6+
# this is just an example and not a requirement for provider building/publishing
7+
- go mod tidy
8+
builds:
9+
- env:
10+
# goreleaser does not work with CGO, it could also complicate
11+
# usage by users in CI/CD systems like HCP Terraform where
12+
# they are unable to install libraries.
13+
- CGO_ENABLED=0
14+
mod_timestamp: '{{ .CommitTimestamp }}'
15+
flags:
16+
- -trimpath
17+
ldflags:
18+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19+
goos:
20+
- freebsd
21+
- windows
22+
- linux
23+
- darwin
24+
goarch:
25+
- amd64
26+
- '386'
27+
- arm
28+
- arm64
29+
ignore:
30+
- goos: darwin
31+
goarch: '386'
32+
binary: '{{ .ProjectName }}_v{{ .Version }}'
33+
archives:
34+
- format: zip
35+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
36+
checksum:
37+
extra_files:
38+
- glob: 'terraform-registry-manifest.json'
39+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
40+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
41+
algorithm: sha256
42+
signs:
43+
- artifacts: checksum
44+
args:
45+
# if you are using this in a GitHub action or some other automated pipeline, you
46+
# need to pass the batch flag to indicate its not interactive.
47+
- "--batch"
48+
- "--local-user"
49+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
50+
- "--output"
51+
- "${signature}"
52+
- "--detach-sign"
53+
- "${artifact}"
54+
release:
55+
extra_files:
56+
- glob: 'terraform-registry-manifest.json'
57+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
58+
# If you want to manually examine the release before its live, uncomment this line:
59+
# draft: true
60+
changelog:
61+
disable: true

LICENCE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2025, Florian Maury
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# SSH2VSock Terraform Provider
2+
3+
The ssh2vsock provider enables practitioners to reach virtual machines over SSH
4+
via their hypervisor using [AF_VSOCK
5+
sockets](https://www.man7.org/linux/man-pages/man7/vsock.7.html).
6+
7+
As opposed to most SSH-related Terraform providers, this one goes a long way in
8+
order to secure the SSH connections, by verifying the host keys using a list of
9+
known host entries, a classic known host file or
10+
[SSHFP](https://www.rfc-editor.org/rfc/rfc4255) records. It is compatible with
11+
both hashed and non-hashed known host entries.
12+
13+
The ssh2vsock provider enables practitioners to reach virtual machines over SSH
14+
via their hypervisor using AF_VSOCK sockets.
15+
16+
As opposed to most SSH-related Terraform providers, this one goes a long way in
17+
order to secure the SSH connections by verifying the host keys using a list of
18+
known host entries, a classic known host file or SSHFP records. It is compatible
19+
with both hashed and non-hashed known host entries.
20+
21+
This provider can also be used to secure SSH connections of other insecure SSH
22+
connections by tunneling their insecure communications over a secure series of
23+
tunnels.
24+
25+
It also provides utility functions to generate known host entries and structured
26+
SSHFP records to insert into the DNS.
27+
28+
SSHFP fingerprints must be signed with DNSSEC and verified (AD bit set) to be
29+
trusted, and the provider offers optional support of DNS-over-TLS with
30+
certificate verification to transport the result of the DNSSEC signature
31+
verification.
32+
33+
This provider only negotiates host key algorithms for which it has a known host
34+
entry or a SSHFP fingerprint. That is to say that if the only known host entry
35+
configured uses ssh-ed25519, then only ssh-ed25519 will be proposed during the
36+
handshake as an acceptable host key algorithm. If you get an error about a
37+
handshake failure because of the lack of common host key algorithms, please
38+
consider adding some known host entries with an algorithm that is currently
39+
accepted by the server.
40+
41+
This provider requires the guest VMs SSH service to listen on the AF_VSOCK
42+
address family. This is generally achieved thanks to systemd socket activation
43+
and systemd ssh configuration generator that automatically detects the virtual
44+
machine environment.
45+
46+
This provider also requires that the VM is configured with a AF_VSOCK context
47+
ID. With KVM, this is generally done by adding an argument, such as "-device
48+
vhost-vsock-pci,guest-cid=3". See QEMU documentation for more information.
49+
50+
Finally, this provider requires that socat binary is installed on the
51+
hypervisor.
52+
53+
More documentation can be found in the docs/ directory of this repository

0 commit comments

Comments
 (0)