Skip to content

feat: use cloud secret for DNS token in scaletest TF #19466

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

Merged

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Aug 21, 2025

Removes the requirement to obtain a Cloudflare DNS token from our scaletest/terraform/action builds. Instead, by default, we pull the token from Google Secrets Manager and use the scaletest.dev DNS domain.

Removes cloudflare_email as this was unneeded.

Removes the cloudflare_zone_id and instead pulls it from a data source via the Cloudflare API.

closes coder/internal#839

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis marked this pull request as ready for review August 21, 2025 12:19
@spikecurtis spikecurtis force-pushed the 08-21-feat_use_cloud_secret_for_dns_token_in_scaletest_tf branch from bf1837e to d160d09 Compare August 21, 2025 12:30
Copy link
Member

@ethanndickson ethanndickson left a comment

Choose a reason for hiding this comment

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

I actually had this in #19412, but mine doesn't let you override with a var, and uses a slightly different* data source to pull the token, i'll update mine to match and we can merge this.

*

This is similar to the google_secret_manager_secret_version datasource, but it only requires the Secret Manager Secret Accessor role


variable "cloudflare_zone_id" {
description = "Cloudflare zone ID."
default = "scaletest.dev"
Copy link
Member

@ethanndickson ethanndickson Aug 22, 2025

Choose a reason for hiding this comment

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

We haven't mentioned this domain publicly anywhere else, could omit it here?

Copy link
Member

@ethanndickson ethanndickson Aug 22, 2025

Choose a reason for hiding this comment

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

Also, just realising, we should probably not use a hardcoded password on these coder deployments, now that they're accessible on the public web.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They've always been accessible on the public web.

I agree we shouldn't use a hardcoded password; didn't realize we did. coder/internal#932

Beyond the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We haven't mentioned this domain publicly anywhere else, could omit it here?

If we're cagey about leaking details like this, we should move all this terraform into a private repo. We have an obvious choice in coder/scaletest

WDYT @deansheather @jdomeracki-coder

Copy link
Member

Choose a reason for hiding this comment

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

I do think we should move it to a private repo. I haven't heard of any customers using it, and a lot of it was clickops'd anyways so I don't see the point of keeping the Terraform public

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we definitely should move it 💯

ethanndickson added a commit that referenced this pull request Aug 22, 2025
@spikecurtis spikecurtis merged commit b90bc7c into main Aug 22, 2025
33 checks passed
@spikecurtis spikecurtis deleted the 08-21-feat_use_cloud_secret_for_dns_token_in_scaletest_tf branch August 22, 2025 05:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get a multi-region scaletest cluster & Coder deployment up using Terraform
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy