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
cloudflare_argo_tunnel: add tunnel token to state #1590
cloudflare_argo_tunnel: add tunnel token to state #1590
Conversation
i'm going to put this one on the back burner until we land the changes from cloudflare/cloudflare-go#866 and update the methods internally. as is, this won't work because the tunnel secret is only available on the |
the upstream changes landed this morning if you'd like to incorporate them into this PR and we can get it merged. |
Nice, I'll take a stab at refactoring this tomorrow or the next day. Looking at #1439 (comment), it seems we will expect errors setting the token state for older tunnels. Is there any example I can lean on for how the provider would handle that? aka leave the token field empty, return a message, etc? |
for older tunnels that return the 404, let's leave it empty. we can issue a |
Updated to use the upstream |
b3d4d76
to
e5c751f
Compare
@bradleyglover this is ready for you to pick back up and test now. |
@jacobbednarz thanks! all tests passed for me locally (with the exception of some existing lint failures) |
This functionality has been released in v3.16.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
The
cloudflared
service supports passing in a token to allow a connector to authenticate and run a tunnel. This token is a base64 encoded string made up of the account ID, tunnel ID, and secret ID. Since these items are already stored in state, this PR represents a nice quality of life improvement by constructing, encoding, and storing the token in state too.Closes #1439