这是indexloc提供的服务,不要输入任何密码
Skip to content

pre-shared key first attempt #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

pre-shared key first attempt #7

wants to merge 4 commits into from

Conversation

odise
Copy link
Contributor

@odise odise commented Jan 12, 2022

Pre-sharedkey implementation as discussed in #6.

@odise odise mentioned this pull request Jan 12, 2022
Copy link
Owner

@OJFord OJFord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I just have a few comments, and I'll compile & double-check myself, but looks good!

Are you intending also to add support for providing the generated key to a wireguard_asymmetric_key resource?

@odise odise requested a review from OJFord January 12, 2022 15:46
@odise
Copy link
Contributor Author

odise commented Jan 13, 2022

@OJFord is there a chance to get my changes in and released in short term?

@OJFord
Copy link
Owner

OJFord commented Jan 13, 2022

Certainly, but are you also intending to add an optional psk attr to the existing resource?

Or do you have a use-case where you want the PSK generated in terraform but then you're using it with a keypair not from this provider? (Curious what that is?)

@odise
Copy link
Contributor Author

odise commented Jan 13, 2022

Sure I can add it. However I'm not so sure if this attribute makes that much sense. I'm also a bit puzzled about the bind property of wireguard_asymmetric_key. Can you please shed some light here?

Copy link
Owner

@OJFord OJFord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agh, yes right sorry I was thinking of the config document data source which is where it's actually used - and you have already added it there; thanks.

I'm also a bit puzzled about the bind property of wireguard_asymmetric_key. Can you please shed some light here?

That's a bit of a hack around the sort of issue described in hashicorp/terraform#8099 (heh, I'd forgotten I opened that! This wasn't the use-case when I did.) - basically it acts like triggers for null_resource; rolls the key if the value of bind changes.

I think I needed it for my systemd-wireguard module.

@OJFord
Copy link
Owner

OJFord commented Jan 13, 2022

Tests are failing just due to go mod tidy & tfplugindocs not updated, don't worry about that I'll sort it on merge.

Thanks!

OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
OJFord pushed a commit that referenced this pull request Jan 13, 2022
@OJFord
Copy link
Owner

OJFord commented Jan 13, 2022

Closing via 1a01f5f - many thanks!

I've been having some trouble with goreleaser, but it'll be in v0.2.1 when I have that sorted.

@OJFord OJFord closed this Jan 13, 2022
OJFord pushed a commit that referenced this pull request Feb 3, 2022
@OJFord
Copy link
Owner

OJFord commented Feb 8, 2022

Thanks again for this @odise - sorry for the delay releasing, I got it sorted but meant & forgot to draw your attention to it.

v0.2.1 is now available in the Terraform registry with the wireguard_preshared_key resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants